Skip to content

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.

Basic IDE interaction

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.

  1. Client sends messages: {:message-id "uuid-string-123" :code "(do-something)"}.
  2. Server creates a fresh transient session.
  3. Server evaluates the code from the message in the transient session.
  4. Server sends response: {:message-id "uuid-string-123" :value "[:done :something]"}.
  5. Server sends response: {:message-id "uuid-string-123" :status "evaluation finished"}.
  6. Server discards transient session.
Clone this wiki locally