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 + waltz news

13 views

Published on

33rd Tango Users meeting

Published in: Software
  • Be the first to comment

  • Be the first to like this

Tango Rest api + waltz news

  1. 1. Tango REST API newsTango REST API news TangoRestServer newsTangoRestServer news Waltz newsWaltz news
  2. 2. Tango REST APITango REST API
  3. 3. 10/06/19 Igor Khokhriakov 3 new project structure ● 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. 10/06/19 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. 10/06/19 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. 10/06/19 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. 10/06/19 Igor Khokhriakov 9 ● Cache-Control ● Partitioning ● If-Modified-Since ● Improved Errors section ● /subscriptions – new events mechanism based on SSE* ● Security – does not require Oauth anymore * https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events
  9. 9. Tango REST API v1.1 (v1.0 + subscriptions)Tango REST API v1.1 (v1.0 + subscriptions)
  10. 10. 10/06/19 Igor Khokhriakov 11 ● subscriptions → dedicated entry point e.g. http://hzgxenvtest.desy.de:8443/tango/subscriptions ● event-stream – multiplexed stream of native Tango events
  11. 11. Tango REST API rc4Tango REST API rc4
  12. 12. 10/06/19 Igor Khokhriakov 13 ● Back-ports some v1.0 features: – …/subscriptions – …/devices/tree – …/hosts/localhost/10000/devices/tree ● Cache-Control ● Partitioning
  13. 13. HTTP/2.0HTTP/2.0 only server configuration is requiredonly server configuration is required hence is in rc4 & v1.1hence is in rc4 & v1.1
  14. 14. rest-server-1.14*rest-server-1.14* * https://github.com/tango-controls/rest-server/releases/tag/rest-server-1.14
  15. 15. 10/06/19 Igor Khokhriakov 16 ● 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
  16. 16. 10/06/19 Igor Khokhriakov 17 ● ex. mtangorest.server ● transferred to tango-controls GitHub org ● Latest release (as per May'19): 1.14: – full v1.1 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
  17. 17. 10/06/19 Igor Khokhriakov 18 ● Part of TangoSourceDistribution since 9.3.3 ● Apache 2.0 license ● Dockerized!!!
  18. 18. Waltz v0.7.x*Waltz v0.7.x* * https://github.com/tango-controls/waltz/releases
  19. 19. Live Waltz tour @PETRA IIILive Waltz tour @PETRA III after lunchafter lunch -OR--OR- after General Tools sessionafter General Tools session
  20. 20. 10/06/19 Igor Khokhriakov 21 ● UI – Improved/redesigned – Main views for attribute/command/pipe – Manager (Astor like widget) – support await in scripting console ● Platform – JS6 support – Load widgets using JS6 modules – Subscriptions – SVG integration * All requirements are gathered in the passed few months by interviewing beamline scientists, observing and analyzing their work.
  21. 21. TODO:TODO: rest-api: v1.x – high level Tango APIrest-api: v1.x – high level Tango API rest-server: Benchmark testsrest-server: Benchmark tests waltz*: modernize and restructure +waltz*: modernize and restructure + mobile versionmobile version ** basing on requirements gathered in the passed few monthsbasing on requirements gathered in the passed few months by interviewing beamline scientists andby interviewing beamline scientists and observing their workobserving their work
  22. 22. Thank you!Thank you! Questions?Questions?

×