I am neither a network programming expert nor have any experience with MINA before and would need to design & develop a system to communicate with a remote server (passing xml documents using TCP/IP) The requirement is like this: 1. A remote server will open up a TCP/IP socket connection to our server at port 7500. 2. Xml documents will be send to our server. (Xml average size: 4K; Character set: utf-8; Max concurrent requests upto 5000 messages per second). 3. I have to read/parse/construct these xml documents and process them (database look-up and/or updates) The xml documents will not any size or termination characters. I would have to parse it based on the root element end tag. 4. Create an XML response and send it back to the 3rd party server
I am thinking of developing the Server side as follows: 1. Use MINA version 1.1.7 (Since it is stated as the latest stable version.) 2. Extend TextLineDecoder to override doDecode() to determine the completion of a message by looking for the begin and end xml root element tags. 3. From messageReceived() method a) Convert the xml document into Java object using XMLBeans/JiXB. b) Pass the Java object to appropriate Java command processing classes which will return the response object c) Convert the response object to Xml message using XMLBeans/JiXB. d) Send the response back to the client Could any one see any problem with this approach? Any suggestions/ideas/guidance/examples will be truly appreciated. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
