I have recently started working on a new RPC server as part of my OpenWRT project work and you can find it here: https://github.com/mkschreder/jucid.git
This RPC server now handles all backend functionality for upcoming release of JUCI webgui project (https://github.com/mkschreder/juci). (the server is not ready for release yet but I'm working on it. There are a few TODOs left on the list).
Key features of this new server are:
- Fast LUA based RPC backend that makes JSON RPC interface available over a websocket connection to any outside client (you can for example also use lighttpd with websocket proxy module and connect to this rpc through a url like ws://device/websocket/).
- Very small footprint (Application itself 30k + 140k lua scripts).
- New way of doing access control over RPC. (new access lists use the same idea as original openwrt rpcd session object but are much easier to write and understand).
- Easily interfacable with current ubus interface (you can "export" ubus functions through this RPC server using a little lua glue - although in the future it can probably be done even better).
Anyway, even though the server is a work in progress, it is already usable and provides all necessary backend calls for webgui.
Docs for rpc objects here: https://github.com/mkschreder/jucid/blo … rpc-api.md
A few (rather poor) examples here: https://github.com/mkschreder/jucid/tree/master/example
For a proper (and working) example of usage from web app check this javascript interface: https://github.com/mkschreder/juci/blob … /js/rpc.js
Building:
./autogen.sh
./configure
make
(Last edited by mkschreder on 26 Feb 2016, 15:42)