开发者

Copying files from one server to another

We have a JMS server which mainly used to communicate between two boxes.(Tibco) pro开发者_如何学Ccesses which run on both boxes basically read an input XML ,processes it and conevrts them to flat files.Per XML, there will be 30 flat files(Total size of flat files combine varies from 1MB to 10MB). The processes which run on secondary box need to transfer the files to primary server. There are two options i see-

  1. SCP-Secure Copy which will copy 30 flat files by making SCP connection(executed through shell script).
  2. Sending files as JMS Message.On primary, JMS receiver program will read those and merge the flat files with other flat files.

Which option do you think is "better" ? Will SCP a problem if secondary box makes say 500 SCP/hour? In second option, JMS server will have storage of the flat files at some temprary location?

Thanks


I definitly vote for SCP solution. JMS will be an overkill for transferring files. With JMS you need to read file into memory, put it into JMS message, transfer it over the wire in serlialized form (which will probably result in a larger data size), then deserialize that and then save it to file again. Also if your JMS queue is configured to be persistent it will also add perstitent storage overhead to your message processing. All that serialization/deserialization/perstitense will put pressure on your JVM's garbage collector and that may affect performance.

EDIT: With SCP solution you basically stream file data from one server to another. So, almost no memory overhead. Though transfering 30 files of 10MB total size 500 times an hour gives you 5Gb an hour and that is a lot. It gives you approx. 1.3Mb per second. Do you have such a bandwidth?

But an alternative solution can be that you transfer files on demand only. For example, you initiate the transfer only when JMS is recieved. And you can use JSCH library for that to do the real transfer instead of shell script.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜