RESTFul IDEAS

2,111 views
1,920 views

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,111
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

RESTFul IDEAS

  1. 1. RESTful IDEAS: Integrated Documentation Environment for Aircraft Support‏ Originally presented at the XML 2007 Conference by: Joel Amoussou, Founder & CEO, Efasoft [email_address]
  2. 2. Agenda Security 5 IDEAS Use Cases 1 S1000D 2 AtomPub and OpenSearch 3 Getting Started 4
  3. 3. How Information is Distributed Today? <ul><li>Shipping of Physical Products </li></ul><ul><li>Paper, CD-ROM, DVD </li></ul><ul><li>Four revisions a year </li></ul><ul><li>Temporary Revisions </li></ul><ul><li>Online Access </li></ul><ul><li>Hosted by manufacturers </li></ul><ul><li>Boeing MPT </li></ul><ul><li>Airbus|World </li></ul>
  4. 4. Current Digital File Formats S1000D Military Specifications (CALS)‏ ATA iSpec 2200 PDF and Proprietary Formats S1000D
  5. 5. Beyond S1000D: IDEAS IDEAS AtomPub OpenSearch Syndication Federated Search Ex- change Library Services
  6. 6. Maintenance and Flight Operations Airframe Manufacturer Engine Manufacturer Component Manufacturer FAA/Transport Canada Airline Policies & Procedures Feeds Reader Aggregator OpenSearch Client
  7. 7. Distributed Aircraft Manufacturing AtomPub Server Airframer (Systems Integrator)‏ AtomPub Client Partner/Supplier Create content with HTTP POST Get content with HTTP GET Update content with HTTP PUT Delete content with HTTP DELETE
  8. 8. Airline Originated Changes AtomPub Server Airframer/FAA/Suppliers AtomPub Client Airline's Content Repository Create content with HTTP POST Get content with HTTP GET Update content with HTTP PUT Delete content with HTTP DELETE
  9. 9. Syndication-Oriented Architecture (SynOA)‏ <ul><li>ROA and SynOA </li></ul><ul><li>REST </li></ul><ul><li>Atom </li></ul><ul><li>AtomPub </li></ul><ul><li>OpenSearch </li></ul><ul><li>SOA </li></ul><ul><li>XML Schema </li></ul><ul><li>SOAP </li></ul><ul><li>WSDL </li></ul><ul><li>UDDI </li></ul><ul><li>WS-* </li></ul>Web Services
  10. 10. What is S1000D? ASD, AIA, and ATA Military and Civil Aviation Open standards (RDF, Dublin Core, XLink, WebCGM, XML Schema)‏ Common Source DataBase (CSDB) and Reuse Metadata Data Module S1000D
  11. 11. S1000D Data Module Identification and Status (data module code, applicability, issue number, etc.)‏ Content (actual maintenance or operation procedure)‏
  12. 12. Sample S1000D Data Module Metadata <dmodule xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot; xmlns:dc=&quot;http://www.purl.org/dc/elements/1.1/&quot;> <rdf:Description> <dc:title>Hydraulic Tank - Clean by ultrasonic</dc:title> <dc:creator>U8234</dc:creator> <dc:subject>Hydraulic Tank - Clean by ultrasonic </dc:subject> <dc:publisher>U8234</dc:publisher> <dc:contributor>U8234</dc:contributor> <dc:date>2007-07-31</dc:date> <dc:type>text</dc:type> <dc:format>text/xml</dc:format> <dc:identifier>8H-A-29-10-05-01A-253B-C</dc:identifier> <dc:language>en-GB</dc:language> <dc:rights>01</dc:rights> </rdf:Description> ... </dmodule>
  13. 13. Sample S1000D Data Module Content <mainfunc> <step1> <para>Clean by ultrasonic.</para> <step2> <para>Press ON to start.</para> </step2> <step2> <para>Monitor the cleaner during operation.<para> </step2> <step2> <para> The cleaner will stop automatically after running for the specified time. <para> </step2> </step1> <mainfunc>
  14. 14. Data Module Code <ul><li>8H: Model Identification Code </li></ul><ul><li>A: System Difference Code </li></ul><ul><li>29: System (Hydraulic Power)‏ </li></ul><ul><li>10: Subsystem (Main Hydraulic Power)‏ </li></ul><ul><li>05: Unit or Component (Hydraulic Tank)‏ </li></ul><ul><li>01: Disassembly Code (first assembly removed from the tank)‏ </li></ul><ul><li>A: Disassembly Code Variant </li></ul><ul><li>253: Information Code (clean by ultrasonic with equipment X)‏ </li></ul><ul><li>B: Information Code Variant (clean by ultrasonic with equipment Y)‏ </li></ul><ul><li>C: Item Location Code (C = Maintenance on the bench)‏ </li></ul>8H-A-29-10-05-01A-253B-C
  15. 15. S1000D Publication Module (PM)‏ DM Reference DM Reference DM Reference DM Reference DM Reference
  16. 16. S1000D Information Life Cycle DMRL Presentation CSDB Common Source Database Browser-based Interactive Electronic Technical Publication (IETP)‏ Data Modules Requirement List
  17. 17. Sample Atom Feed for S1000D CSDB <ul><li><?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> </li></ul><ul><li><feed xmlns=&quot;http://www.w3.org/2005/Atom&quot;> </li></ul><ul><li><title>Example S1000D Feed</title> </li></ul><ul><li><link rel=&quot;self&quot; type=&quot;application/atom+xml&quot; </li></ul><ul><li>href=&quot;http://xyz-aero.com/csdb/feed.atom&quot;/> </li></ul><ul><li><updated>2007-11-20T19:30:02Z</updated> </li></ul><ul><li><author> </li></ul><ul><li><name>XYZ Aero</name> </li></ul><ul><li></author> </li></ul><ul><li><id>http://xyz-aero.com/csdb</id> </li></ul><ul><li><entry> </li></ul><ul><li><title>Hydraulic Tank - Clean by ultrasonic with equipment X</title> </li></ul><ul><li><link rel=&quot;enclosure&quot; type=&quot;image/png&quot; length=&quot;1337&quot; </li></ul><ul><li>href=&quot;http://xyz-aero.com/csdb/illustration/icn.png&quot;/> </li></ul><ul><li><id>http://xyz-aero.com/csdb/dm/DMC-8H-A-29-10-05-01A-253A-C</id> </li></ul><ul><li><updated>2007-11-20T19:30:02Z</updated> </li></ul><ul><li><content </li></ul><ul><li>src=&quot;http://xyz-aero.com/csdb/dm/DMC-8H-A-29-10-05-01A-253A-C.xml&quot; type=&quot;text/xml&quot;/> </li></ul><ul><li><summary> </li></ul><ul><li>Hydraulic Tank – Clean by ultrasonic with equipment X </li></ul><ul><li></summary> </li></ul><ul><li></entry> </li></ul><ul><li>... </li></ul><ul><li></feed> </li></ul>
  18. 18. AtomPub Service Document for a CSDB <ul><li><?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> </li></ul><ul><li><service xmlns=&quot;http://www.w3.org/2007/app&quot; xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot;> </li></ul><ul><li><workspace> </li></ul><ul><li><atom:title>S1000D CSDB</atom:title> </li></ul><ul><li><collection href=&quot;http://xyz-aero.com/csdb/dm&quot; > </li></ul><ul><li><atom:title>S1000D Data Modules<title> </li></ul><ul><li><categories href=&quot;http://www.s1000d.org/cats/dm.cats&quot; /> </li></ul><ul><li></collection> </li></ul><ul><li><collection href=&quot;http://xyz-aero.com/csdb/illustration&quot; > </li></ul><ul><li><atom:title>S1000D Illustrations</atom:title> </li></ul><ul><li><accept>image/png</accept> </li></ul><ul><li><accept>image/jpeg</accept> </li></ul><ul><li><accept>image/gif</accept> </li></ul><ul><li><accept>image/tif</accept> </li></ul><ul><li><accept>image/cg4</accept> </li></ul><ul><li><accept>image/cgm</accept> </li></ul><ul><li></collection> </li></ul><ul><li></workspace> </li></ul><ul><li></service </li></ul>
  19. 19. Listing Atom Collection <ul><li><feed xmlns=&quot;http://www.w3.org/2005/Atom&quot;> </li></ul><ul><li><link rel=&quot;first&quot; </li></ul><ul><li>href=&quot;http://xyz-aero.com/csdb/dm/amm&quot; /> </li></ul><ul><li><link rel=&quot;next&quot; </li></ul><ul><li>href=&quot;http://xyz-aero.com/csdb/dm/fim&quot; /> </li></ul><ul><li><link rel=&quot;last&quot; </li></ul><ul><li>href=&quot;http://xyz-aero.com/csdb/dm/aipc&quot; /> </li></ul><ul><li>... </li></ul><ul><li></feed> </li></ul>
  20. 20. Posting a Data Module to an Atom Server <ul><li>POST /csdb/dm HTTP/1.1 </li></ul><ul><li>Host: xyz-aero.com </li></ul><ul><li>Authorization: XYZAeroLogin auth={auth token} </li></ul><ul><li>Content-Type: application/atom+xml;type=entry </li></ul><ul><li>Content-Length: nnn </li></ul><ul><li>Slug: First Post </li></ul><ul><li><?xml version=&quot;1.0&quot; ?> </li></ul><ul><li><entry xmlns=&quot;http://www.w3.org/2005/Atom&quot;> </li></ul><ul><li><title>Hydraulic Tank - Clean by ultrasonic with equipment X</title> </li></ul><ul><li><id>http://xyz-aero.com/csdb/dm/DMC-8H-A-29-10-05-01A-253A-C</id> </li></ul><ul><li><updated>2007-11-20T19:30:02Z</updated> </li></ul><ul><li><author> </li></ul><ul><li><name>XYZ Aero</name> </li></ul><ul><li></author> </li></ul><ul><li><content type=&quot;text/xml&quot;> </li></ul><ul><li><dmodule>..</dmodule> </li></ul><ul><li></content> </li></ul><ul><li> <summary> </li></ul><ul><li>Hydraulic Tank – Clean by ultrasonic with equipment X </li></ul><ul><li></summary> </li></ul><ul><li></entry> </li></ul>
  21. 21. Data Module Created by an Atom Server <ul><li>HTTP/1.1 201 Created </li></ul><ul><li>Date: Sun, 11 Nov 2007 19:01:11 GMT </li></ul><ul><li>Content-Length: nnn </li></ul><ul><li>Content-Type: application/atom+xml;type=entry;charset=&quot;utf-8&quot; </li></ul><ul><li>Location: http://xyz-aero.com/csdb/dm/DMC-8H-A-29-10-05-01A-253A-C.atom </li></ul><ul><li>ETag: &quot;cj373d8762369g&quot; </li></ul><ul><li><?xml version=&quot;1.0&quot; ?> </li></ul><ul><li><entry xmlns=&quot;http://www.w3.org/2005/Atom&quot;> </li></ul><ul><li><title>Hydraulic Tank - Clean by ultrasonic with equipment X</title> </li></ul><ul><li><id>http://xyz-aero.com/csdb/dm/DMC-8H-A-29-10-05-01A-253A-C</id> </li></ul><ul><li><updated>2007-11-20T19:30:02Z</updated> </li></ul><ul><li><author> </li></ul><ul><li><name>Aero Tanks</name> </li></ul><ul><li></author> </li></ul><ul><li><content type=&quot;text/xml&quot;> </li></ul><ul><li><dmodule>..</dmodule> </li></ul><ul><li></content> </li></ul><ul><li> <summary> </li></ul><ul><li>Hydraulic Tank – Clean by ultrasonic with equipment X </li></ul><ul><li></summary> </li></ul><ul><li></entry> </li></ul>
  22. 22. OpenSearch Description Document <ul><li><?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> </li></ul><ul><li><OpenSearchDescription </li></ul><ul><li>xmlns=&quot;http://a9.com/-/spec/opensearch/1.1/&quot;> </li></ul><ul><li><ShortName>FAA's ADs Search</ShortName> </li></ul><ul><li><Description> </li></ul><ul><li>Use to search FAA airworthiness directives. </li></ul><ul><li></Description> </li></ul><ul><li><Tags>airworthiness directives</Tags> </li></ul><ul><li><Contact>opensearch.admin@faa.gov</Contact> </li></ul><ul><li><Url type=&quot;application/atom+xml&quot; </li></ul><ul><li>template=&quot;http://faa.gov/ads/ </li></ul><ul><li>?q={searchTerms}&amp;p={startPage?}&amp;format=atom &quot;/> </li></ul><ul><li></OpenSearchDescription> </li></ul>
  23. 23. OpenSearch Atom Search Result <ul><li><feed xmlns=&quot;http://www.w3.org/2005/Atom&quot; </li></ul><ul><li>xmlns:opensearch=&quot;http://a9.com/-/spec/opensearch/1.1/&quot;> </li></ul><ul><li><title>FAA ADs Search: hydraulic tank</title> </li></ul><ul><li><updated>2007-11-20T15:20:02Z</updated> </li></ul><ul><li><id>http://faa.gov/ads/hydraulic+tank</id> </li></ul><ul><li><opensearch:totalResults>1</opensearch:totalResults> </li></ul><ul><li><opensearch:startIndex>1</opensearch:startIndex> </li></ul><ul><li><opensearch:itemsPerPage>20</opensearch:itemsPerPage> </li></ul><ul><li><opensearch:Query role=&quot;request&quot; searchTerms=&quot;hydraulic tank&quot; startPage=&quot;1&quot; /> </li></ul><ul><li><link rel=&quot;alternate&quot; </li></ul><ul><li>href=&quot;http://faa.gov/ads/hydraulic+tank?p=1&quot; type=&quot;text/html&quot;/> </li></ul><ul><li><link rel=&quot;self&quot; </li></ul><ul><li>href=&quot;http://faa.gov/ads/hydraulic+tank?p=1&amp;format=atom&quot; type=&quot;application/atom+xml&quot;/> </li></ul><ul><li><link rel=&quot;search&quot; type=&quot;application/opensearchdescription+xml&quot; href=&quot;http://faa.gov/ads/opensearchdescription.xml&quot;/> </li></ul><ul><li><entry>... </entry> </li></ul><ul><li></feed> </li></ul>
  24. 24. Getting Started IETP Benefits <ul><li>Integrate feeds reader </li></ul><ul><li>Add OpenSearch provider to browser </li></ul><ul><li>Configure feeds aggregator </li></ul><ul><li>Users search multiple repositories </li></ul><ul><li>Users subscribe to feeds </li></ul><ul><li>Up-to-date content is always available </li></ul>CSDB <ul><li>Generate and serve Atom feeds from your CSDB (XSLT, Abdera)‏ </li></ul><ul><li>Turn your search engine into an OpenSearch provider </li></ul>
  25. 25. S1000D Publication Module (PM)‏ <ul><li><pm xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;> </li></ul><ul><li><idstatus>...</idstatus> </li></ul><ul><li><content> </li></ul><ul><li><pmentry> </li></ul><ul><li><title> </li></ul><ul><li>Hydraulic Tank - Clean by ultrasonic with equipment X </li></ul><ul><li></title> </li></ul><ul><li><refdm> </li></ul><ul><li><xlink:locator xlink:label=&quot;Clean&quot; xlink:href=&quot;DMC-8H-A-29-10-05-01A-253A-C.xml&quot;/> </li></ul><ul><li></refdm> </li></ul><ul><li></pmentry> </li></ul><ul><li><pmentry> </li></ul><ul><li><title> </li></ul><ul><li>Hydraulic Tank - Clean by ultrasonic with equipment Y </li></ul><ul><li></title> </li></ul><ul><li><refdm> </li></ul><ul><li><xlink:locator xlink:label=&quot;Clean&quot; xlink:href=&quot;DMC-8H-A-29-10-05-01A-253B-C.xml&quot;/> </li></ul><ul><li></refdm> </li></ul><ul><li></pmentry> </li></ul><ul><li></content> </li></ul><ul><li></pm> </li></ul>
  26. 26. From S1000D PM to Atom Feed with XSLT <ul><li><xsl:for-each select=&quot;s:pmentry&quot;> </li></ul><ul><li><xsl:variable name=&quot;dmc&quot; select=&quot;s:refdm/xlink:locator/@xlink:href&quot;/> </li></ul><ul><li><entry> </li></ul><ul><li><title><xsl:value-of select=&quot;s:title&quot;/></title> </li></ul><ul><li><id> </li></ul><ul><li><xsl:value-of select=&quot;concat </li></ul><ul><li>('http://xyz-aero.com/csdb/dm/', </li></ul><ul><li>substring-before($dmc, '.'))&quot;/> </li></ul><ul><li></id> </li></ul><ul><li><updated> </li></ul><ul><li><xsl:value-of select=&quot;current-dateTime()&quot;/> </li></ul><ul><li></updated> </li></ul><ul><li><content src=&quot;{$dmc}&quot; type=&quot;text/xml&quot;/> </li></ul><ul><li><summary> </li></ul><ul><li><xsl:value-of select=&quot;s:title&quot;/> </li></ul><ul><li></summary> </li></ul><ul><li></entry> </li></ul><ul><li></xsl:for-each> </li></ul>
  27. 27. Posting to an Atom Server with Abdera <ul><li>String csdb = &quot;http://xyz-aero.com/csdb&quot;; </li></ul><ul><li>... </li></ul><ul><li>Document<Service> serviceDoc = client.get(csdb).getDocument(); </li></ul><ul><li>Service service = serviceDoc.getRoot(); </li></ul><ul><li>Collection collection = </li></ul><ul><li>service.getWorkspaces().get(0)‏ </li></ul><ul><li>.getCollections().get(0); </li></ul><ul><li>String uri = collection.getHref().toString(); </li></ul><ul><li>Response response = client. post (uri, entry); </li></ul><ul><li>if (response.getStatus() == 201) </li></ul><ul><li>System.out.println(&quot;Data module successfully uploaded!&quot;); </li></ul><ul><li>else </li></ul><ul><li>System.out.println(&quot;Data module upload failed!&quot;); </li></ul>
  28. 28. AtomPub Security SSL HTTP Authentication WSSE XML Signature /Encryption Others Security
  29. 29. Signing an Atom Feed with Apache Abdera <ul><li>Abdera abdera = new Abdera(); </li></ul><ul><li>AbderaSecurity abderaSecurity = new AbderaSecurity(abdera); </li></ul><ul><li>URL url = new </li></ul><ul><li>URL(&quot;http://xyz-aero.com/csdb/DMC-8H-A-29-10-05-01A-253A-C.atom&quot;); </li></ul><ul><li>Document<Feed> doc = parser.parse(url.openStream(),url); </li></ul><ul><li>Feed feed = doc.getRoot(); </li></ul><ul><li>PrivateKey privateKey = ... </li></ul><ul><li>X509Certificate certificate = ... </li></ul><ul><li>Signature signature = abderaSecurity.getNewSignature(); </li></ul><ul><li>SignatureOptions options = signature.getDefaultSignatureOptions(); </li></ul><ul><li>options.setSigningKey(privateKey); </li></ul><ul><li>options.setCertificate(certificate); </li></ul><ul><li>feed = signature. sign (feed, options); </li></ul>
  30. 30. Verifying a Signature with Apache Abdera <ul><li>ByteArrayInputStream feed = ... </li></ul><ul><li>Document<Entry> doc = abdera.getParser().parse(feed); </li></ul><ul><li>entry = doc.getRoot(); </li></ul><ul><li>System.out.println(&quot;Valid signature?: &quot; + signature. verify (entry, null)); </li></ul>
  31. 31. Standardization with CMIS 1 AtomPub and SOAP bindings Not all deployed CMS will support CMIS. 2 Vanilla AtomPub client and server can be implemented easily with existing tools (e.g. Apache Abdera). 3 Interoperability issues between Vanilla AtomPub client and CMIS AtomPub server.
  32. 32. Thank You ! [email_address]

×