mTango REST API roadmap

Hi,

I am wondering if there are any updates (or roadmap) planned for the mTango REST API. Currently we have the RC3.0.1 version. Is there a final release planned?
Is there any update in the pipe that would break the compatibility of the API?

Another question about the java client for this REST API:
Could you explain the added value compared to standard client APIs (such as Jersey)? Can I just use Jersey as client API?

Thanks
Jerome
Hi Jerome,


jcambon
I am wondering if there are any updates (or roadmap) planned for the mTango REST API. Currently we have the RC3.0.1 version. Is there a final release planned?

Current version seems to be stable so next Tango meeting we will simply rename to it v1.0 and announce as first release of the specification. The roadmap for the specification - is to follow user requests and be consistent with native Tango API (resolve issues).

jcambon
Is there any update in the pipe that would break the compatibility of the API?

I do not see anything like this on the horizon.

jcambon
Another question about the java client for this REST API:
Could you explain the added value compared to standard client APIs (such as Jersey)? Can I just use Jersey as client API?

The goal of the Java client is to provide higher level of abstraction, ideally be the same as TangORB but on top of REST. AFAIK this is not really used so consider it as a proof of the concept. It is not mandatory to use any specific client - you can use whatever you are convenient with if it speaks REST.

Regards,
Edited 7 years ago
Hi Igor,
It looks like only SCALAR and SPECTRUM are implemented in mTango REST API. Do you plan to introduce IMAGE support ?

When I try to read an image from one tango test device, I have the following error:
{"errors":[{"reason":"JsonMappingException","description":"[F cannot be cast to [I (through reference chain: org.tango.rest.[\"value\"])","severity":"ERR","origin":"org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:218)"},{"reason":"ClassCastException","description":"[F cannot be cast to [I","severity":"ERR","origin":"org.tango.web.server.resolvers.JacksonConfiguration$TangoImageSerializer.serialize(JacksonConfiguration.java:258)"}],"quality":"FAILURE","timestamp":1484733868333}

Greg
Hi Greg,

Currently mTangoREST supports UShort images.

Looks like in your case your want to display float image (TIFF?). I will add corresponding feature request.

Regards,
Hi Igor,
I would like to be able to display every image type that you can have on TANGO.
If you can serialize the IMAGE 2D matrix like you do for SPECTRUM, it's ok for me.

Regards,

Greg
Hi Greg,

I have created a feature request. If you can invest any resources into it it would be awesome.

Regards,
Dear Igor,
We have a problem to access a 2D attribute via RestAPI.
We have setup a rest server which answer to the following url
https://mstatus.esrf.fr/tango/rest/rc3/hosts/acudebian7.esrf.fr/10000/devices/sys/mcs/facade/attributes
It works when reading scalar attributes but when I try to read "current_history" which is a 2d table I got the following exception
{
errors: [
{
reason: "JsonMappingException",
description: "[D cannot be cast to [I (through reference chain: org.tango.rest.["value"])",
severity: "ERR",
origin: "org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:218)"
},
{
reason: "ClassCastException",
description: "[D cannot be cast to [I",
severity: "ERR",
origin: "org.tango.web.server.resolvers.JacksonConfiguration$TangoImageSerializer.serialize(JacksonConfiguration.java:258)"
}
],
quality: "FAILURE",
timestamp: 1485881922595
}
looks like a casting error…Any idea?
Cheers
Jean-Michel
Hi Jean-Michel,

Same problem as Greg has since current_history is an image :(

mTangoREST tries to cast double array to ushort array and fails, since Java can not do such operation.


Sorry for this. Honestly we never needed any images except what we get from camera, i.e. ushort. So it is implemented in a very restricted manner. Specifically it gets underlaying array from CORBA layer and wraps it into Java's BufferedImage, hence only ushort images are supported. Plus it converts images into embedded:
"data:/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD…AKKKKACiiigAooooA//"
. Maybe this way is too specific for our needs and must be reconsidered.


Can you use current/history instead for now?

Regards,
Hi All,
At SOLEIL, we LIMA from ESRF for our detectors and the images can be short, ushort, long, ulong, float, ufloat, double, udouble.

I'm thinking about a way to help you Igor in the developpment.
Greg,

this is excellent news!

Andy
 
Register or login to create to post a reply.