The Dilemma FTP or MQ, which one to use?
In order to determine which one to use in a project, many will argue about cost and timeline. Let us factor that out. In any message or file transfer that happens in a system should at least meet the following criteria:
1. That a message should be reliably delivered. 100% successful delivery all the time.2. Messages or files should not be overwritten
3. Messages usually trigger a job for the message to be processed by the receiving system.
MQ supports all of the 3 criteria mentioned above and scales well. It is a full blown messaging infrastructure. It can handle full files and small chunks of messages but it was designed to handle asynchronous small messages between system in order to trigger or alert another system. It is like the Observer pattern mechanism but on a much larger scale.
FTP is a really mature protocol and it has probably been around since when the Turing machine and the ENIAC was used to calculate ballistic charts =) for WWII[1 - Turing and Eniac Link]. FTP is great for transferring files because it is for transferring files. I don't think MQ is such a great infrastructure for transferring files.
Since our project requires as to transfer files i choose FTP. I used the Apache Commons Net [2 - Apache Commons Net Link] which is really an awesome library of thing-a-ma-jigs that can send your thing-a-majigger[3 - Cat in the Hat Link] up up and away. What i mean is that its got all the thing i needed and more. I used the Apache Commons Net library to FTP the files that i needed to send and do an REXEC to trigger the script that will process the files.
Dilemma solved (for now!)
Comments