Hi tangoers,
During the 29th Tango Meeting we announced the possibility to make a standard Tango REST API.
This feature request has been written in a more formal way below as a tentative for helping the discussion.
Please give any feedback about the definition of this TFR and I will update this page as soon as I can.
I will open a new topic in the forum to discuss especially about the API ;-).
Cheers,
Vincent
Code name
Scope
The scope of this feature request is focus on the definition of a REST API for Tango.
This will include the definition of the HTTP request (URL, content, …)
Context
Several web application have been develop for Tango and a REST api has been often used.
Here is a list of different existing implementations:
[*] mtango - https://bitbucket.org/hzgwpn/mtango/wiki/mTango%20REST%20API
mTango REST API allows you to do the following:
- list all devices available through the API
get info about device, its attributes or commands
read/write attributes
execute commands
You can find a very complete description on the wiki of the project
[*] Solaris Tango REST
Generic Tango web server
Please find more about Jive on Android project from Solaris:
Android app:
REST interface:
[*] MAXIV BPM application
Specific Tango web server
(TODO)
[*] Gotan - GitHub - hardion/GoTan: Thought about Control System, REST and groovy
Tango module for Gotan.
The purpose is to access the Tango world through the Gotan REST server
A document describing the api: https://www.dropbox.com/s/9nqeabizxlmj6zp/Gotan%20-%20Tango%20REST.pdf?dl=0
Problem to solve
There are many way to define an API using the architecture REST. Also there are different constraints among them the Stateless is the most important. RESTful is defining a set of rule to guarantee a compatibility between all of the Restful software. How to handle command with RESTful compatibility can be one of the topics among others.
Also Tango already defines a standard API on how to access devices, attributes, properties… That can be matched with a Tango Rest Api.
All the web client application won’t be compatible if all the different Tango REST server have a different interface.
Goal and milestones:
The goal is to collect the different experiences to define a stable first version of the standard.
First of all a proposition with different option will be released then to collect the feedback from the overall community. This will define a alpha version of the TANGO REST API
Finally a document will release before the Tango meeting the 30rd for approval from the board. This will define a beta version of the TANGO REST API.
Output:
The first version of this API is expected to be release with:
- A complete description of the API written in a document, online manual,…
A set of compliance test with a possible automatic test set
(Optional)Some possible reference implementation for the only purpose of education and given as an example. Different language can be proposed.
Release some implementation guidelines, i.e. caching and optimizations advises. For instance, implementation must be clever enough to combine several requests, i.e. several clients read the same attribute. This is implemented in mTangoREST server.
Benefit:
A standard API provide an interoperability between the different implementation of the web server and the client. The leverage of the standard will allow to create an active ecosystem.
The expectation is to grow the web development of Tango in a coherent way for the users.
Possible later improvement:
Performance test: Can be part of the compliance test
Edit:
- added links for the Solaris project (Lukasz)
- added implementation guidelines (Igor)