Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nadir Saghar, Tony Pan, Ashish Sharma REST for Data Services.

Similar presentations


Presentation on theme: "Nadir Saghar, Tony Pan, Ashish Sharma REST for Data Services."— Presentation transcript:

1 Nadir Saghar, Tony Pan, Ashish Sharma REST for Data Services

2

3 Motivation caBIG IMG TCGA Radiology Enterprise Use Case Phase I Pilot Project Multiple Radiologists read MR images from NBIA and make annotation in AIM format. The AIM annotation documents are stored in and retrieved from AIME caGrid Data Service Multiple review client applications (Osirix IPAD on Mac, ClearCanvas on Windows, XIP on Windows/Linux) requiring connectivities to caGrid services (NBIA, AIME)

4 The Language Barrier Problem: –Osirix iPAD is ObjectiveC based –ObjectiveC’s java support is limited –ObjectiveC’s support for SOAP is limited –A native grid service client in ObjectiveC would require investigation, time, and personnel that were not available from the project Solution: –Create a HTTP RESTful service proxy to the AIME caGrid data service –Osirix iPAD (ObjectiveC) then use the RESTful API to access the caGrid service.

5 RESTful Services An architecture style, unlike SOAP (a messaging “standard”) Representational State Transfer –each URL is a representation of an object –Stateless –Content typed via MIME Operations on the objects are performed through standard HTTP methods –get, post, put, delete –May be mapped Create, Retrieve, Update, and Delete operations Leverages ubiquitous support for HTTP, browser compatibility Well known adoptors: Yahoo, eBay, Amazon, Facebook

6 RESTful Service Design Consideration As a style, RESTful API designs vary, and can easily carry different approaches of information modeling and behavioral semantics from application to application Example 1: –http://host/Annotation lists the available annotationshttp://host/Annotation –http://host/Annotation/1 retreives annotation with id=1http://host/Annotation/1 Example 2: –http://hostA/Annotation + HTTP post queries annotationhttp://hostA/Annotation –http://hostB/Annotation + HTTP getqueries annotationhttp://hostB/Annotation Result –non-computable API so no computable interoperability –Higher degree of manual effort to document and adopt API

7 TCGA Radiology Phase 1 RESTful Service Impl SUCCESS! Osirix IPAD can interact with AIME caGrid Data Service through a RESTful Service proxy Manually implemented URLs and HTTP methods to support: –List annotation identifiers (HTTP get) –Retrieve annotation by identifier (HTTP get) –Submit to grid service (HTTP put) –Full CQL query support (HTTP post) Bonus: Web Browsers can access caGrid Data Service content directly –track reader progress in TCGA Radiology Phase II

8 BUT WAIT, THERE IS MORE…

9 Automated RESTful Service Creation? Can we automate the generation of RESTful service from a caGRid data Service? –Is there sufficient information for the automation? –Is there enough expressivity in the RESTful style and HTTP methods to fully proxy caGrid Data Service capabilities, specifically CQL?

10 RESTful Service Generation Tool (RSGT) Can we automate the generation of RESTful service from a caGRid data Service? –Is there sufficient information for the automation? YES –Is there enough expressivity in the RESTful style and HTTP methods to proxy caGrid Data Service capabilities, specifically CQL? PARTLY

11 Architecture of the REST CodeGen Framework

12 Key Features Minimal amount of user intervention –Eclipse IDE plugin to facilitate RESTful service generation and deployment Generation –User supply the grid service source tree, domain model, and where to put the generated code –RSGT does the rest –User can optionally modify the generated code Deployment –User supply the grid service URL, the tomcat container –RSGT does the rest

13 Generated RESTful Service Deployable as.war Two classes of operations are generated –One to One mapping for caGrid Service operations. URL is suffixed with name of operation, e.g. Query Complex objects like CQL xml are passed along using HTTP POST and PUT For advanced operations –One to One mapping for service domain model classes URL is suffixed with name of class, e.g. Patient Retrieve only URL using HTTP GET URL can be appended with attribute filters Retrieve in XML, JSON, CSV, and HTML formats

14 Technologies Used by RSGT Apache Velocity for template-based code generation Apache Ant for scripting Eclipse plugin for user interface JAX-RS for RESTful Introduce generated artifacts caGrid 1.2/1.3

15 USAGE

16 Demo: Add RSGT Plugin to Eclipse http://storage01.cci.emory.edu/mnt/vg1/repos/Drop-Box/caGridRSGTUpdateSite/

17 Demo: Add RSGT Plugin to Eclipse http://storage01.cci.emory.edu/mnt/vg1/repos/Drop-Box/caGridRSGTUpdateSite/

18 Generate RESTFul Service

19 Provide caGrid-Service Location and Domain Model

20 Provide RESTFul Service Information

21 Customize REST Service (optional)

22 Deploy Service

23 Deploy Service: Provide URL of the caGrid Service

24 Food for thought RESTful service API provides a simple and fast way to access data through URLs and web browsers Complex operations/interactions with the service require sending parameters (e.g. CQL) via HTTP Headers –Hard to impossible to formulate a query TREE in URL –Not browser compatible Interpretation of RESTful architecture style results in different API (URL and HTTP operation) patterns and behaviors No formal standard for computable description and documentation of RESTful APIs REST is easy to build, hard to consume programmatically

25 Future Directions Security –Proxy for secure grid services –Integration with WSSO Formal description of RESTful API for computable interoperability RESTful API best practices? More flexible result transform, perhaps through user supplied XSLT –More user and web browser friendly (prettier) “views” of the data Documentation and Eclipse plugin information at https://web.cci.emory.edu/confluence/display/INCUB/RE STful+Interfaces https://web.cci.emory.edu/confluence/display/INCUB/RE STful+Interfaces

26 QUESTIONS


Download ppt "Nadir Saghar, Tony Pan, Ashish Sharma REST for Data Services."

Similar presentations


Ads by Google