database - Finding good ways to transfer big files among Java servers -


there in project major db server, , other servers installed @ different places maintain own local databases. have allow every system update local database version on major db. servers runs java environment.

there seems many ways transfer files: simple web download page, web-service, ftp, socket.. think fits better situation?

the general procedure looks like:

1, client sends string of version server.
2, server generates patch , sends back.
(since patch maybe huge, should separated parts)

and i'm thinking inside procedure 2.
there lot of choices.

1, should @ first count rows fetched , calculate how many parts should divided.

and meet choice, should send number of parts or list of links client, , client uses links request each part if connection based on web request, or can push parts 1 one if servers connected socket, or can following step:

2, can fetch needed records server database part part, each time limited rows, return java list, serialize list file in order empty memory next part, folder of files. , compress files single 1 , send back, avoiding client request second time.

and patch files generated can kept other clients when requesting same version.

i think ways work, think better? or know better way?
let's share.

you can try use netty large file transfer server client.

on netty home page there pretty example how send big files via web.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -