Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How can I write code to start communication between two servers

I want to create two servers that will communicate to each other as well as a client which will communicate with both of them.Can any one please suggest me how to get started...

Comments

  • harryqharryq Posts: 3Member
    That totally depends on what you try to achieve. Are you writing the programs running on these servers yourself? Is it business critical?

    Suppose your applications are written in Java (not really needed, but makes things easier), and the data/communication is somewhat important, I suggest you use some kind of middleware. Using message middleware, you simply put messages with whatever content you want on a queue (hosted by a queue manager), the payload of the message can be XML, serialized java objects, binary or text. The receiver simply picks up the message from the queue with a simple API call. No need for messy TCP/IP code in your projects.

    Active MQ (a queue manager, there are lots of brands) can be found here.
    http://activemq.apache.org/getting-started.html

    Here are some examples on how to use JMS to send and receive messages.
    http://libzter.com/wiki/JMS


    Then, if this does not suite you, then you can always go back to sending TCP/IP messages. That can be hard or easy. You probably want to use some framework if you have somewhat complex communication. Here is one framework, there are others, http://libzter.com/wiki/ACDK
Sign In or Register to comment.