Check out Sente. It meets all your requirements. EDN is used as a transport 
mechanism, with experimental support for Transit -- but these are really 
implementation details. Values sent from the client shows up in tact on the 
server, and vice versa. 

https://github.com/ptaoussanis/sente

* Sente provides a send function and a core.async channel on both the 
Clojure and Clojurescript sides. 
* Any value sent via the client's send function shows up on the server's 
channel intact, and vice versa
* The server keeps an atom of connected clients, and a message from the 
server can target one or all of them
* The excellent core.match is commonly used for pattern matching messages 
on the client and server sides and dispatching functions
* There is robust support for re-connecting
* The software is mature, and terse (~1000 lines). I've used it as a comms 
layer in several production apps with great success.
* Regarding remote function serialization / invocation, assuming you trust 
your client, you could pass a function from client->server as data, and 
invoke it on the server side. No need for serialization, normal 'quoting' 
would work.

- Shaun

On Wednesday, September 10, 2014 1:39:24 AM UTC-4, Mikera wrote:
>
> I've encountered a couple of use cases where it would helpful to have some 
> form of remote function invocation in Clojure/ClojureScript with the 
> following characteristics:
> - Arbitrary functions can be effectively "serialised" and sent to remote 
> machines
> - Remote functions can be invoked either synchronously or asynchronously 
> - Parameters get passed as serialised values, which might in turn be other 
> functions
> - Works across Clojure/ClojureScript boundary
> - Would need to allow for various error conditions (network failure etc.)
>
> Could this be achieved in a reasonably sane way with some combination of 
> Transit and/or core.async? Has anyone tried this?
>

-- 
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/d/optout.

Reply via email to