On Mar 20, 2011, at 9:13 PM, James Reeves wrote:

> On 21 March 2011 00:18, Chas Emerick <cemer...@snowtide.com> wrote:
>> In any case, my objective with nREPL was to get something working well that 
>> had what I thought were the right semantics for the use cases I was 
>> concerned with (i.e. point-to-point Clojure tooling backends).  Lifting 
>> those semantics onto other transports in the future shouldn't be difficult 
>> (I think Rich was pretty unhappy with the protocol as well -- IIRC, he would 
>> have preferred using STOMP directly, but it's important to some users of 
>> nREPL that external dependencies be minimal/nonexistent, and a Clojure STOMP 
>> broker has yet to come along).
> 
> FWIW, my personal preference would be construct a protocol for passing
> around Clojure data-structures securely over a socket, and then build
> your REPL protocol on top of that.
> 
> For instance, you could print your data structure to a string, then
> encode it as a netstring (http://cr.yp.to/proto/netstrings.txt):
> 
>    "12:{:foo \"bar\"},"
>    => {:foo "bar"}
> 
> I'm not sure we need a protocol like STOMP, because there doesn't seem
> to be much streaming involved in a REPL.

The notion of "passing around Clojure data structures" does get watered down 
because of the non-sexpr-nature of e.g. *out* and *err*, and it's all 
message-oriented so as to support asynchronous evaluation from the same client, 
but that's pretty much what nREPL does.  Expressions are sent, results are 
printed and sent back.

STOMP would be valuable in enabling one to separately control routing of the 
messages in question.  The prototypical example of this is sending a message to 
a "broadcast" queue to do some computationally-intensive data processing on N 
Clojure VMs.  Stuff like that is baked into STOMP, but would require some 
nontrivial client orchestration/configuration given how nREPL is designed right 
now.

- Chas

-- 
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

Reply via email to