I would like to ask the wise members of this list for some advice. The system I need to build will be based on several different processes running on one or more machines. Each process will be a SEDA-like server, having an explicit incoming message queue and a processing thread to take care of the messages. I plan on implementing the queue with an appropriate Java data structure and maybe a local SQLite DB if I decide to make the queue persistent.
Q1: Perhaps I should look into some other, more standard implementation of a queue for my processes? The communication between each process will be over connection-oriented TCP/IP sockets. Each process will listen on one (maybe more) ports for connection attempts from other processes, and will also issue active connects to other processes. The messages sent around will probably all inherit from a base class and will be marshaled into UTF-8 text messages with some sort of encoding. XML might be an alternative here, but it is not a must. Q2: Can anybody suggest a marshalling approach? Maybe an existing library or protocol to be used? Q3: How would I go about implementing this model with MINA? What specific classes should I be using for accepting incoming communications and initiating outgoing ones? Could I use these suggested classes even for the case of implementing a process that connects to itself (for testing purposes)? What would be the whole set of classes in the stack, from accepting a connection to receiving a message and making it available for the business logic? Q4: Are there any examples that might be close to these requirements? Seeing some preexisting code would be very helpful. Thanks in advance and best regards. -- Gonzalo Diethelm DCV - Chile
