Asynchronous RPC Behaviour - Outstanding Server Responses

11 views
Skip to first unread message

David Chappelle

unread,
Aug 30, 2014, 9:51:04 AM8/30/14
to msg...@googlegroups.com
    I would like to use messagepack-rpc in a project. However, I want to make sure that it satisfies a specific use case. In particular, I need to have a client call into the server and block until an event occurs. For example, lets say that I implement a cluster service that discovers neighboring nodes in the network. Then I have other services that send rpc requests to the cluster service to retrieve the current list of nodes. I don't really want to poll the list of nodes looking for changes. Instead I would like the server to notify me when a change occurs. So what I want to do is the client send an rpc request to the server and have the server store the response and respond when any change to the list of discovered nodes has occurred. There could be several node discovery changes a minute or even 1 every 2-3 days. It looks like this is possible with an asynchronous server using msgpack::rpc::dispatcher but there is no corresponding documentation that I can find to verify. My main concern is if there are any request timeouts that would prevent this from working. Has anyone had experience with this?

Matt Billenstein

unread,
Aug 31, 2014, 10:19:59 AM8/31/14
to msg...@googlegroups.com
This is not specific to msgpack rpc, but I think you should work keepalives into your protocol - it gives you an idea of which clients are alive above the tcp stack and prevents connection timeouts - you can use something on the order of several minutes and of course no need to send them if your connection is already active with real traffic.

M

--
Matt Billenstein

Sent from my iPhone 5 (this put here so you know I have one)

On Aug 30, 2014, at 9:51 AM, David Chappelle <chap...@gmail.com> wrote:

    I would like to use messagepack-rpc in a project. However, I want to make sure that it satisfies a specific use case. In particular, I need to have a client call into the server and block until an event occurs. For example, lets say that I implement a cluster service that discovers neighboring nodes in the network. Then I have other services that send rpc requests to the cluster service to retrieve the current list of nodes. I don't really want to poll the list of nodes looking for changes. Instead I would like the server to notify me when a change occurs. So what I want to do is the client send an rpc request to the server and have the server store the response and respond when any change to the list of discovered nodes has occurred. There could be several node discovery changes a minute or even 1 every 2-3 days. It looks like this is possible with an asynchronous server using msgpack::rpc::dispatcher but there is no corresponding documentation that I can find to verify. My main concern is if there are any request timeouts that would prevent this from working. Has anyone had experience with this?

--
You received this message because you are subscribed to the Google Groups "MessagePack Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msgpack+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages