Table Of Contents

Previous topic

srcgen

Next topic

Library Mode

RESTful Front-end

Agnos has (currently in beta-phase) a RESTful front-end, which allows one to utilize an Agnos-exposed service through unsupported languages. Since Agnos currently supports only a limited set of target languages, the RESTful front-end by-passes that bottleneck and allows one to consume Agnos-services from any language that has basic URL and XML/JSON libraries.

This front-end is basically a distinct, light-weight web server that serves as a proxy to the back-end, meaning, the Agnos server that’s behind. It is based on the based on the “runtime reflection” that’s built into the Agnos protocol (see INFO_REFLECTION), so no static code generation is required.

The front-end is a simply command-line utility, called restful-agnos, that accepts a python-bindings module (as generated by agnosc) and a connection to the back-end server (either a hostname:port pair or a path to a library mode-server). The front-end then connects to the back-end, and exposes its interface in HTTP-friendly fashion. Note that both XML and JSON can be used as the encoding formats, which allows application writers to choose what’s easiest for them. Once you set up a RESTful front-end server, all you need to access it is a library that can fetch URLs.

Command-line Utility

TDB

Format

Since REST is not a well-defined standard, Agnos uses a rather simple format that will be described here.

TDB

Example Usage

We’ll assume you have a service called MyService that is implemented by the program RealServer.

TDB