From: "João Távora" <joaotavora@gmail.com>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: jsonrpc.el closer to merging
Date: Sun, 10 Jun 2018 23:36:58 +0100 [thread overview]
Message-ID: <87k1r6uv3p.fsf@gmail.com> (raw)
In-Reply-To: <be84a346-0adc-8fa5-b294-7db6ab593e23@gmail.com> ("Clément Pit-Claudel"'s message of "Sun, 10 Jun 2018 13:56:00 -0400")
Clément Pit-Claudel <cpitclaudel@gmail.com> writes:
> On 2018-06-10 11:56, João Távora wrote:
>> The last few weeks, I've been getting jsonrpc.el ready for integration
>> into core (master/26.2) and/or ELPA.git.
> It would be nice if you hosted this on ELPA, so that others could take
> a dependency on that package without having to wait for new releases
> of Emacs :)
Yes ELPA is my plan too. As far as I understand, that isn't
incompatible with also having it in core.
> How closely does it follow JSON-RPC?
Pretty closely, but JSONRPC is pretty lax :-)
> For example, does it allow for servers to send notifications to
> clients?
Yes. Both endpoints can send requests that wait for responses, and
notifications that don't. JSONRPC doesn't distinguish between clients
and servers, though the application may do so (eglot.el does, for
example).
> Does it allow more than one response per query?
Not sure I follow. In JSONRPC (and in most connection-oriented
protocols) a response, by definition, something that a request waits on.
Once it occurs the request is considered completed. jsonrpc.el has two
ways to model this: jsonrpc-request, blocking and jsonrpc-async-request,
a non-blocking.
The remote endpoint can send more notifications after responding. Or
the client can trigger more requests after it get its first response.
> If the server is killed, what does it do with pending queries?
Depends on the underlying transport. Currently the only concrete
transport implementation, jsonrpc-process-connection, cancels all
pending queries and calls their error handler. This means either a
blocking jsonrpc-request will exit non-locally or you will get an error
in the process sentinel.
> Thanks again for this work!
You're very welcome.
João
next prev parent reply other threads:[~2018-06-10 22:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-10 15:56 jsonrpc.el closer to merging João Távora
2018-06-10 17:56 ` Clément Pit-Claudel
2018-06-10 22:36 ` João Távora [this message]
2018-06-11 13:08 ` Clément Pit-Claudel
2018-06-11 14:42 ` João Távora
2018-06-11 22:26 ` João Távora
2018-06-11 23:13 ` Clément Pit-Claudel
2018-06-13 10:19 ` João Távora
2018-06-11 1:46 ` Stefan Monnier
2018-06-11 6:34 ` João Távora
2018-06-11 12:30 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1r6uv3p.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=cpitclaudel@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.