[REST API] shortcut for the default tango host/port
|
|
---|---|
The REST API defines the tango host and port in the url. Thinking about micro service the url is bit complex when one serves one control system per REST server. Would it be possible to add in the spec a default url for the default database? Also do we really need to expose the name of the computer and the port? this is not a useful information for the client of the REST API since the server act as a gateway. Let me know what you think about that proposition.
Vincent Hardion
Control System MAX IV Laboratory |
|
|
---|---|
@hardion,hardion The idea currently is that REST is a container of tango hosts, each tango host in turn is a container for devices. One REST may export a considerable number of tango hosts. In our installation we have single REST for all beamlines (currently there are only three beamlines though, but the number will increase after the workshop, hopefully :) ) and each beamline has 2-3 tango hosts. hardion I think there is no clear way to define default tango host in REST API, on the other hand you can define default tango host on a client side, as it is done in TangoWebapp. I think it is OK that defining tango host is the responsibility of a client. In rc5 it is planned to remove port from URL and make it optional matrix parameter with 10000 by default. hardion I plan to implement tango host alias in TangoWebapp, so host/port may be hidden from the end user on a client side. I think Tango does not provide this out of the box (there is alias for tango device, but this is different) |
|
|
---|---|
IngvordCross finger IngvordYes finally I implemented a quick check of the /tango/rest/hosts response. I just hope that the first element will be always the same following the implementation. IngvordCool hardion IngvordYes an alias system is a good idea. Thanks for your feedback.
Vincent Hardion
Control System MAX IV Laboratory |