4

is there any thing for providing remote procedure call in emacs to the outside world ? is there anyone working on a bert, messagepack, thrift, even xml-rpc server in emacs ?

here is my work in progress using json to communicate with emacs. https://github.com/tinku99/elisp_rpc

i wonder if json-rpc is used for cross language work out of the box... it seems like the specification stops short of managing the connection... which seems like half the battle.

3 Answers 3

5

Elnode works as an HTTP server.

It shouldn't be too hard to build a handler that receives JSON or XML or whatever you like, unpacks it and does something interesting.

Elnode includes an example handler called "insideout" that publishes the buffer list of the emacs instance via http. If you browse to http://localhost:8028/ you get an HTML page that gives an itemized list of the active buffers.

Starting with that you could do something interesting I suppose. For example, you could build a handler that slurps in and emits json, using Edward O'Connor's json.el

Sign up to request clarification or add additional context in comments.

2 Comments

thanks I guess this combined with emacswiki.org/emacs/UrlPackage for the client part will work...
it's great to see people recommending Elnode! I hope to add an implementation of JSON-RPC to Elnode soon.
4

One issue with using Emacs as an rpc server would be the lack of threading in Emacs. The Distel library "extends Emacs Lisp with Erlang-style processes and message passing"; so, you can use it to provide an rpc mechanism. A while back, I wrote a number of blog posts on Distel:

  1. Distel = Erlang-like Concurrency in Emacs
  2. Distel = Emacs erlang-mode++
  3. Concurrent/Parallel Programming - The Next Generation - Part 2 (the bottom of that post)

They will give you a bit of a "feel" for what it's like to use Distel in Emacs.

1 Comment

links are broken
1

I found this stompl implementation also https://github.com/jwhitlark/Stompem/blob/master/stompem.el I wonder how hard it would be to write a zeromq or rabbitmq implementation in emacs.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.