Index of /xraylarch/downloads/xraylarch-2023-10_docs-examples/examples/rpc
This directory shows examples of using larch by Remote Procedure Call.
This has several important possible use cases:
1. Larch can be run on a separate machine
2. Multiple larch process can be running simultaneously,
and a client can switch between them.
3. A client can exit, but the underlying larch process
can be persistent, and so re-joined later.
To start a larch RPC server, you can use either
larch -r
or
larch_server -r start
You can specify a port with
larch -r -p 4966
or
larch_server -p 4966 start
The larch_server program also takes commands of
stop to stop a server
restart to stop and restart a server (on the same port)
status to tell whether a server is running
report to give a brief report about a running server
next to start a server on the next unused port
The examples here shows a simple client that simply runs some larch
commands and retrieves some data (which is transferred with json).