Client to Handle Conversation, Presence and Heartbeats

Replicator webakaunt at gmail.com
Tue Sep 13 10:11:44 EDT 2011


@Johnny,

    Great. That is what I was looking for.
    So the model is to use a SINGLE netty client that will talk back and
forth to the alien server via different handlers. Where a single handler
would represent a single action/message of the protocol ( just to decouple
and map protocol to netty )?

Thanks for "IdleStateAwareChannelHandler" btw!

On Mon, Sep 12, 2011 at 9:50 PM, Johnny Luong-2 [via Netty Forums and
Mailing Lists] <ml-node+s685743n6785901h30 at n2.nabble.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 09/12/2011 11:40 AM, Replicator wrote:
>
> > We need to have a client that is consuming messages from from the server
> (
> > that we don't control ), and occasionally send messages to the server.
> For
> > example:
> >
> >      1. client sends "I am up" message to the server
> >      2. server sends "I know that you are up. Starting to send you stuff"
>
> > message back to the client
> >      3. server sends massive number of messages to the client
> >      4. meanwhile client and server send each other heartbeats ( on the
> same
> > port ) every second.
> >
> > Which messaging pattern can we use for this client? Or is it just as
> simple
> > as having a client with registered upstream and downstream handlers that
> > handle heartbeats, presence, etc.. messages?
> >
> > Thank you!
> >
> > --
> > View this message in context:
> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Client-to-Handle-Conversation-Presence-and-Heartbeats-tp6784800p6784800.html
> > Sent from the Netty User Group mailing list archive at Nabble.com.
> > _______________________________________________
> > netty-users mailing list
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=6785901&i=0>
> > https://lists.jboss.org/mailman/listinfo/netty-users
> >
> >
>
> You can use handlers for pretty much all of that.  The examples cover
> upstream and downstream handlers; you might also look at
> SimpleChannelHandler if you are interested in a specific event.  For
> heartbeats, the IdleStateAwareChannelHandler is a useful class to work
> with.
>
> - -Johnny
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.14 (GNU/Linux)
> Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org/
>
> iQIcBAEBCAAGBQJObraBAAoJENQfv1FjsMMv//kP/AkhgtqysmiaahWSTpeW5v/u
> 0xYgxwkaFGnig69DyQnwoBUy45BJWT2bZSJNCVgrCUESdHMh6UDOUyYbfHRyEVaC
> GkamJpJf9CbV/SWm1JiuhiPz+9R39kw1/Q9UNvqYumtR4XGZOEWXgjpCm/QgvzI4
> l9A5lmJVVrS0vOz/gHjJVkUnX39LJyc3s4Iew8j68fYTBQ9RWTuJh64BalnghDLG
> Q0I3S9guN9FCgBRjYfOh6hBCMrGugMhLz90Ia48R5uYGFi1gM/sZNJcDKNmUZIe7
> sn5Xt2dxqSVKSirL6AZkHEPfd2SG2STNF4Ao/6HfE2bf2Yf9EDC1HVfzMiTH7fI6
> OJ1syIQCcmyurOwJNv4fV7ll6EdIjxcdC0QOhYkAYK9r3quPc7nHokA7oP3zshAa
> RtXx4CsS4jgoB/XgYM9UnuZ4G/Mu49pYvLMJlBpdAgNunRkNLU9dcX/Pi7PzLVei
> IhcwErlF5c6lp0Is8OgqP+pL5CGyWdVhVGjfLF0/GtSKEDhNzk3xJLhsD/vuNd23
> /qrBBUl6owLOgwZ+InRvedv2//6GJKid/yfDVGjYK1hiRh0b+5MqYdhTu8tUso3b
> 2Uxu6N4bTGXrPdd948UdWyjYWouNacpvUMFSUODh/L7hpKWT8JFLA+WSC/zfltl9
> MQPxnyDWTMiHp10jLa+I
> =OQi3
> -----END PGP SIGNATURE-----
> _______________________________________________
> netty-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=6785901&i=1>
> https://lists.jboss.org/mailman/listinfo/netty-users
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Client-to-Handle-Conversation-Presence-and-Heartbeats-tp6784800p6785901.html
>  To unsubscribe from Client to Handle Conversation, Presence and
> Heartbeats, click here<http://netty-forums-and-mailing-lists.685743.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6784800&code=d2ViYWthdW50QGdtYWlsLmNvbXw2Nzg0ODAwfC0xODA0ODQ0MTcz>.
>
>


--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Client-to-Handle-Conversation-Presence-and-Heartbeats-tp6784800p6787681.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list