1 / 10

Joint Institute for Nuclear Research, Dubna , Russia

Joint Institute for Nuclear Research, Dubna , Russia. RestDS – C++ Tango REST API implementation. Georgy Sedykh , Evgeny Gorbachev. TANGO Workshop @ ICALEPCS 2017. Web clients. 1. Web technologies progress. 2. Advantages:. Universal Flixible Well-looking Convenient.

mitchellm
Download Presentation

Joint Institute for Nuclear Research, Dubna , Russia

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Joint Institute for Nuclear Research, Dubna, Russia RestDS – C++ Tango REST API implementation Georgy Sedykh, Evgeny Gorbachev TANGO Workshop @ ICALEPCS 2017

  2. Web clients 1. Web technologies progress 2. Advantages: • Universal • Flixible • Well-looking • Convenient Universal tools for communication betweenTango Controls and Web clientsare required

  3. REST REST (Representational State Transfer) – architectural principles to design web services that focus on system’s resources. • Global identification of resources (URL); • Manipulation of resources through the standard protocol (HTTP); • Stateless;

  4. Tango REST API RC4 * Describes how to: • Operate with different tango hosts; • Browse Tango units (devices, attributes, properties, commands, pipes); • Write/Read attributes; • Execute commands; • Write/Read pipes; • Get/Set properties; • Use authentication mechanisms; • Transmit arguments as http parameters; • Parse Response JSON; • Use Error codes; http://tangodevel.jinr.ru:8080/tango/rest/rc3/nuclotango.jinr.ru/20000/devices/sys/tg_test/1/attributes/DevDouble/value • Attribute • Command • Pipe • Property Tango host REST Service URL REST API Version Tango device ID * http://tango-rest-api.readthedocs.io/en/latest/

  5. RestDS – Tango module, designed to provide access to tango control system units through http requests; Features: • Developed in C++ with Boost and OpenSSL; • Windows and Linux supported; • Lightweight; • Tango device server; • Both http and https protocols supported; • Basic http authentication supported; • Uses server-side role-based Tango access control and logging system (More info: TUPHA171 – Development of NICA Control System: Access Control and Logging); • Git:http://tangodevel.jinr.ru/git/tango/web/RestDS.git; • Tango REST API RC4 partial support (so far without pipes);

  6. RestDS :: Examples To read attribute: GEThttp(s)://host:port/tango/rest/rc4/devices/domain/family/member/attributes/name/value To write attribute: POST / PUThttp(s)://host:port/tango/rest/rc4/devices/domain/family/member/attributes/name + arguments as POST parameters. To execute command without arguments: POST / PUThttp(s)://host:port/tango/rest/rc4/devices/domain/family/member/commands/name To execute command with arguments: POST / PUThttp(s)://host:port/tango/rest/rc4/devices/domain/family/member/commands/name + arguments as POST parameters.

  7. RestDS :: Operation diagram http://host:port/tango/rest/rc4/devices/thermo/shoulder/1/attributes/T56/value RestDS HTTP code 200 - OK Response as JSON object if success • Host:port • Threads number • Authentication • Security (SSL) { “name”: “T56”, “quality”: “VALID”, “timestamp”: 1473348563, “value”: 273.12, } Web Client Or http error code if failed.. 400 – Bad request 403 – Forbidden 401 – Unauthorized 404 – Not found

  8. Web client examples :: Thermometry

  9. Web client examples :: Satellite refrigerators control

  10. Summary: • Web client applications are cross-platform, well-looking and convenient; • Web clients will be widely distributed within the NICA Control system. • RestDS Tango module was developed to provide universal way to communicate between web client and Tango-based control system.

More Related