Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Tango REST API news

11 views

Published on

describes new developments in Tango REST API as per Nov'18

Published in: Software
  • Be the first to comment

  • Be the first to like this

Tango REST API news

  1. 1. Tango REST API newsTango REST API news
  2. 2. Tango REST APITango REST API new project structurenew project structure
  3. 3. 26.11.2018 Igor Khokhriakov 3 ● tango-controls – rest-api: only docs + lists all other known related repos – rest-api-java: Java reference stub classes – rest-test-suite: specification compatibility tests – rest-server (ex. mtangorest.server): Java implementation
  4. 4. Tango REST API v1.0 (rc5&rc6)Tango REST API v1.0 (rc5&rc6)
  5. 5. 26.11.2018 Igor Khokhriakov 6 ● Tango device model – Tango host port is now optional matrix param: /hosts/localhost[;port=10000] – id field: {tango_host}/{device_name}/{member_name} – host & device fields (attributes/commands/pipes etc) – GET …/hosts is removed – Bulk operations entry points: ● attributes & commands & pipes & devices – /devices/tree?host=x&wildcard=*/*/* – /{attribute}/info is now embedded in /{attribute}
  6. 6. 26.11.2018 Igor Khokhriakov 7 ● Wildcards – GET /attributes/value? wildcard=localhost/sys/tg_test/*/* – GET /attributes/value? wildcard=localhost/sys/tg_test/*/State& wildcard=localhost/sys/tg_test/*/Status – GET /attributes/value? wildcard=localhost/sys/tg_test/1/State& wildcard=localhost/sys/tg_test/1/Status
  7. 7. 26.11.2018 Igor Khokhriakov 8 ● Bulk write/execute – PUT /attributes/value [ { “name”:”double_scalar_w”, “device”:..., “host”:..., “value”: 3.14 } ] – PUT /commands [ { “name”:”DevDouble”, “device”:..., “host”:..., “input”: 3.14 } ]
  8. 8. 26.11.2018 Igor Khokhriakov 9 ● Cache-Control ● Partitioning ● If-Modified-Since ● Improved Errors section ● /subscriptions – new events mechanism based on SSE* ● Securtity – does not require Oauth anymore * https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events
  9. 9. Tango REST API rc4Tango REST API rc4
  10. 10. 26.11.2018 Igor Khokhriakov 11 ● Back-ports some v1.0 features: – /subscriptions – /devices/tree – …/hosts/localhost/10000/devices/tree ● Cache-Control ● Partitioning
  11. 11. HTTP/2.0HTTP/2.0 only server configuration is requiredonly server configuration is required hence is in rc4 & v1.0hence is in rc4 & v1.0
  12. 12. rest-server-1.2*rest-server-1.2* * https://github.com/tango-controls/rest-server/releases/tag/rest-server-1.2
  13. 13. 26.11.2018 Igor Khokhriakov 14 ● Supports rc4 & v1.0 – evolution strategy: single server artifact → multiple REST versions ● Integration tests → proper coverage data ● Deployment strategy: prefer .war – .jar http/2.0 configuration is tricky: ApacheTomcat 9 & Java 9 (Oops... Jtango) ApacheTomcat 8.5 & native connector library – Standard enterprise infrastructure: load balancing
  14. 14. 26.11.2018 Igor Khokhriakov 15 ● ex. mtangorest.server ● under tango-controls GitHub org ● Latest release (as per Nov'18): 1.2: – full v1.0 and rc4 support – Multi level cache strategy: binary response cache; ResponseCache (Partitioning); Tango attribute value cache – rc4 events using async response from Servlet 4.0
  15. 15. TODO:TODO: rest-api: v1.1 – high level Tango APIrest-api: v1.1 – high level Tango API rest-server: Benchmark testsrest-server: Benchmark tests
  16. 16. Thank you!Thank you! Questions?Questions?

×