Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 A Proposal of NSI CS Client REST I/F Atsuko Takefusa National Institute of Advanced Industrial Science and Technology (AIST)

Similar presentations


Presentation on theme: "1 A Proposal of NSI CS Client REST I/F Atsuko Takefusa National Institute of Advanced Industrial Science and Technology (AIST)"— Presentation transcript:

1 1 A Proposal of NSI CS Client REST I/F Atsuko Takefusa National Institute of Advanced Industrial Science and Technology (AIST)

2 Lessons Learned NSI Tutorial at TIP2013@Hawaii has been succeeded –20+ students, each installed one of the NSI requester implementations on his/her own PC However, NSI requester packages were not easy-to- install/use –Each student had to download and install a client package because of SOAP –Some students could not receive notification messages because of their firewall settings on PC –Global IP address was required for each student PC AIST used a Portal at SC12 demo and was very useful – The portal uses an ad-hoc REST I/F 2

3 NSI CS “Client” REST I/F No package settings required in advance User (/uRA) can use: –Potals developed using the REST I/F –“curl” command via REST I/F Provides a polling-based REST protocol, based on NSI CS XSD schemas The implementation can –Convert REST to SOAP –Support XML and JSON –Manage “status” of each request / correlationId 3 uPA Aggregator NSI CS Client REST I/F NSI CS Client REST I/F Private or global address REST messaging SOAP messaging Global address RA uR User

4 How to “reserve” via NSI CS Client REST I/F NSI CS SOAP messaging 1.Requester  Provider: Send a reserve request and receive its ack 2.Provider  Requester: Send a notification message, reserveConfirmed or reserveFailed, when the requested reservation has confirmed or failed NSI CS Client REST I/F 1. Requester  Provider: POST /reserve Send a reserve request and receive a notification URL E.g., /reserve/notification/ 2. Requester  Provider: GET notification URL Receive a notification message periodically, until the request has confirmed or failed, in a polling manner 4

5 Test Implementation We have been developing a test implementation using Apache CXF, which supports JAX-RS –JAX-RS is a specification to support RESTful service implementations –JAX-RS compliant frameworks marshal and unmarshal HTTP messages, written in XML or JSON. Service developers do not need to care data representation –JAX-RS annotations realize RESTful services 5 @POST // bind “POST /reserve” to reserve() @Path(“/reserve/”) // specify the path public NSIAck reserve(InputStream is); // read HTML message body from “is” @GET // bind “GET /reserve/notification/{correlationId}/” to getNotification() @Path(“/reserve/notification/{correlationId}/”) // read path parameters public NSIResponse getNotification(@PathParam("correlationId") String correlationId); server-side pseudocode

6 Example: Send a reserve request using “curl” XML version % curl -H “content-type:application/xml” -d @rsvreq.xml ¥ http:// : /nsi2/reserve content-type:application/xml : send an XML request rsvreq.xml : file name of the request, written in XML JSON version % curl -H “content-type:application/json” ¥ -H “Accept:application/json” -d @rsvreq.json ¥ http:// : /nsi2/reserve content-type:application/json : send a JSON request Accept:application/json : receive a JSON response (default is XML) rsvreq.json : file name of the request, written in JSON 6

7 Example: rsvreq.xml 7 http://schemas.ogf.org/nsi/2012/03/connection/provider urn:uuid:4e0048fc-c9bf-44ea-b06e-fef454c2bc88.. global description urn:uuid:9118d3cb-75aa-45be-b9b0-1e9de31b8faa...... 200 Bidirectional true...  NSI SOAP header  NSI SOAP body

8 Example: rsvreq.json 8 { "nsiRequest": { "nsiHeader": { "correlationId": "urn:uuid:4e0048fc-c9bf-44ea-b06e-fef454c2bc88", "protocolVersion": "http://schemas.ogf.org/nsi/2012/03/connection/provider",.. }, ”reserve": { "globalReservationId": "global”, "description": "description", "connectionId": "urn:uuid:9118d3cb-75aa-45be-b9b0-1e9de31b8faa”, "criteria": { "@version": "0", <== attribute "bandwidth": 200, "schedule": {"endTime": ”..", "startTime": ”.." }, "path": { "directionality": "Bidirectional", "sourceSTP": {..}, "destSTP": {..}, }} }  NSI SOAP header  NSI SOAP body

9 DEMO 9

10 Summary Propose NSI CS “Client” REST I/F –Easy-to-use –Provide a polling-based REST protocol, based on NSI CS XSD schemas –There are many RESTful service frameworks support both XML and JSON Needs common REST I/F –Helpful for portal developers –Dissemination of NSI 10


Download ppt "1 A Proposal of NSI CS Client REST I/F Atsuko Takefusa National Institute of Advanced Industrial Science and Technology (AIST)"

Similar presentations


Ads by Google