Saturnin SDK milestone 1 release (v0.2)

18 views
Skip to first unread message

Pavel Cisar

unread,
Mar 15, 2019, 4:32:57 AM3/15/19
to Saturnin SDK
We are pleased to announce the first tangible results - Saturnin SDK milestone 1 release (v0.2). Available in both saturnin-sdk GIT repository and PyPI (saturnin-sdk and saturnin-sdk-examples distributions).

Milestone 1 provides basic infrastructure for creating classic services and clients (for running in separate threads or processes). FBSP implementation is at the current specification level (only without direct support for SVC_ABILITIES). So far, the developer documentation is only in the form of very carefully commented source codes.

This release laso includes a command-line tool for running and testing services (runner script) and two sample services with clients (ECHO and ROMAN).

Roman is a very simple standalone service that returns sent text data in which Arabic numerals are exchanged for Roman numerals.

Echo is a classic service that returns the sent data. Its protocol includes several variations for demonstrating the various procedures for passing data between a client and a service, as described in Appendix A. of FBSP Specification. One of the ECHO protocol services also performs Roman data filtering and is used to demonstrate the creation of services that use other services. There are also tests for both services, such as RAW tests that use "raw" FBSP client-side communication, and CLIENT tests that use a specific service client.

You can run both services and tests with the "runner" tool. Services can be deployed in various combinations and communication protocols.

Parameters:

-s|--service <svcname> [<protocol / addr> [<protocol / addr> ...]

Start the svcname service listening on the listed addresses (see ZMQ documentation for details). You can also use just protocol names and runner will pick up a default address suitable for service. Default is "inproc" protocol. Option could be repeated. If --test is not specified, it runs these services until terminated (by ^C for example)

-t|--test <svcname> [--raw]

Runs test for specified service. With --raw runs FBSP messaging tests that also print details about messages exchanged. Without --raw runs client test with "client level" information printout.

If option is used, runner stops started services and ends after test runs completes.

-r|--remote <svcname> [<protocol / addr> [<protocol / addr> ...]

Same as --service, but only defines remote service without actually running it. Necessary to pass information about required services to service started with --service.

Examples:

> runner --service echo --test echo raw

Launches ECHO and runs RAW tests on it (without optional ROMAN).

> runner -s echo -s roman -t echo

Launches both services in the same process (separate threads) and runs client tests on ECHO.

> runner -s roman tcp://127.0.0.1:5001

Runs ROMAN service until terminated.

> runner -s echo -r roman tcp://127.0.0.1:5001 -t echo --raw

Runs ECHO service connected to remote ROMAN service (see above) and runs raw test on echo.

> runner -s echo inproc tcp://127.0.0.1:5000 -s roman inproc tcp://127.0.0.1:5001

Runs both services listening on two addresses, ECHO uses ROMAN (best available option is used automatically, inproc in this case).

> runner -r echo tcp://127.0.0.1:500 -t echo

Run tests on remote ECHO service

Although the code, tools and examples are still rough, they are a fully functional demonstration of the concept (in classic version, version that will use coroutines & asyncio will internally operate in different way).


best regards
Pavel Cisar

Reply all
Reply to author
Forward
0 new messages