-
Notifications
You must be signed in to change notification settings - Fork 80
Nrepl.next: Use Cases
kotarak edited this page Dec 16, 2011
·
4 revisions
NOTE: Details about message and response content as well as I/O handling to clarified.
This is the most simple case! The client simply sends some command to the server for evaluation and expects back some result. Examples would be completion information, docstrings, etc. This corresponds to one shot messages where we are only interested in the result and not in the environment. After the evaluation of the message is finished the evaluation environment is discarded.
- Client sends messages:
{:message-id "uuid-string-123" :code "(do-something)"}
. - Server creates a fresh transient session.
- Server evaluates the code from the message in the transient session.
- Server sends response:
{:message-id "uuid-string-123" :value "[:done :something]"}
. - Server sends response:
{:message-id "uuid-string-123" :status "evaluation finished"}
. - Server discards transient session.