With core.async, cljzmq <https://github.com/zeromq/cljzmq>, and now zmq-async <https://github.com/lynaghk/zmq-async>, there's an opportunity to link RPC to channels and be free of the underlying transport system. I'm proposing an RPC library that sends and receives data over channels.
The idea is to have a two-way communication context as a map with a send-channel, receive-channel, serializer, and deserializer. The user would be responsible for the transport mechanism between the "client" and the "server". When a user makes a request, the library would create a map to follow the JSON-RPC <http://www.jsonrpc.org/specification> and attach a UUID to it then send it down the send-channel. This UUID could be used in conjunction with pulling items off of the receive-channel to handle responses. The data flow would be: user-request -> wrap-in-specification -> client-serializer -> client-send-channel -> transport-provider -> server deserializer -> server-receive-channel -> user-function -> server-serializer -> server-send-channel -> transport-provider -> client-deserializer -> unwrap-specification -> client-receive-channel -> user-response-handling. The library would be responsible for wrapping the requests and responses according to the specification, but not the serialization mechanism nor the transport, since those could be very different depending on the problem. Utilities could be provided for a "blocking call" and managing cycling through responses on the receive-channel in order to find a specific response that has not yet been processed. As an example, the above workflow should be able to work seamlessly with the channels provided by zmq-async. The send-channels provided would be used as is, and the receive-channels would be used with an additional channel outside of it to take the responses off and deserialize them before returning to the user. The transport provider, of course, would be ZeroMQ. Are there any projects already doing this? Would people be interested? Any feedback? -ToBeReplaced -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.