package for one-server-many-clients network comms?

Discussion in 'Java' started by Andrew E, Dec 4, 2005.

  1. Andrew E

    Andrew E Guest

    Hi all,

    The app I'm working on needs to have some simple network comms in it.
    I've got a basic thing going where every connection gets a thread, etc, and it
    works ok with some simple IO.

    But what I want is a bit of handshaking at the front (login, etc), then
    broadcast of update events.

    I'm thinking messages will look something like:

    [length] [typecode] [payload]

    where
    - length might be a 4 byte integer
    - typecode might be 'S' for serialized java object, 'a' for a
    string, 'x' for xml etc

    I'd like to use nio even though I probably won't need the scalability.


    There *must* be some good ready-to-run code out there for a reactor pattern with
    some basic protocol handling stuff, ready to go, out of the box.

    Some googling turned up lots of echo servers, but nothing a bit higher level
    like this. This would be a bit like the python 'twisted' package but for Java.

    Any tips warmly appreciated :)

    Andrew
     
    Andrew E, Dec 4, 2005
    #1
    1. Advertising

  2. Andrew E

    Guest

    Hello, Andrew -

    Why not start with RMI? It seems that it will allow for any of your
    requirements, and additionally you can build with it an application
    that can be easily maintained and extended. AFAIK you can use RMI with
    SSL if security is an issue.

    Another option might be JMS - the server publishes a single message to
    a "topic", and multiple clients read the message from the topic. This
    is probably the most extensible solution for your problem. It involves
    some learning and setup, but relatively little coding.
    A noteworthy feature of JMS is that it is scalable, it has an open,
    widely accepted API, and you can replace the implementation of JMS with
    a more powerful one at any time, if needed.

    Regards,

    Bartek
     
    , Dec 5, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim McCoy

    single wire serial comms module

    Tim McCoy, Jun 12, 2005, in forum: VHDL
    Replies:
    5
    Views:
    1,183
    info_
    Jun 23, 2005
  2. Multicoder4002
    Replies:
    3
    Views:
    624
    Multicoder4002
    Feb 11, 2004
  3. Dave Brown

    Cross Platform Comms

    Dave Brown, Jul 8, 2005, in forum: Java
    Replies:
    10
    Views:
    761
    Thomas Weidenfeller
    Jul 18, 2005
  4. Fraggle69

    Firewire comms using Python?

    Fraggle69, Aug 27, 2006, in forum: Python
    Replies:
    4
    Views:
    460
    Tim Roberts
    Aug 30, 2006
  5. Francesco
    Replies:
    1
    Views:
    548
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Dec 27, 2006
Loading...

Share This Page