Your SlideShare is downloading. ×
0
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
RestFS: Resources and Services are Filesystems, Too
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

RestFS: Resources and Services are Filesystems, Too

730

Published on

WS-REST 2011. …

WS-REST 2011.
Second International Workshop on RESTful Design.
Chairs: Cesare Pautasso, Erik Wilde, Rosa Alarcon.
<br>
Frameworks Session. Joseph Kaylor, Konstantin Laufer and George Thiruvathukal.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
730
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. RestFS: Resources andServices are Filesystems, Too Joe Kaylor, Konstantin L&#xE4;ufer, George K. Thiruvathukal
  • 2. Presentation OutlineMotivationWeb service compositionLocal machine software compositionInter Process CommunicationBridging the Gap: RestFSThe Filesystem as a Connector LayerExamples and exploration
  • 3. MotivationCurrently, web services can be accessed through HTTPclients and HTTP libraries over network socketsWhile some web services are accessible over filesysteminterfaces, there is no general support or uniform filesysteminterfaceRestFSs goal is to provide a general filesystem interface tomanage configuration, authentication, and interaction withRESTful web services
  • 4. Service CompositionMashups / RemixesWS-BPEL - Web Services Business Process ExecutionLanguageCORBA - Common Object Request Broker Architecture
  • 5. Local Software CompositionLibrariesShared filesPipesDomain SocketsShared memory pages / memory mapped files
  • 6. Filesystems That Abstract a Web ServiceGmailFS - stores data in a GMail webmail accountFlickrFS - abstracts the Flickr photo service as a filesystem(available on Ubuntu)davfs2 - a WebDAV filesystem
  • 7. Types of Web Service FilesystemsApplication Filesystems - filesystems that provideconvenient interfaces for programs to interact. A goodexample is FlickrFS presenting image filesObject or storage abstraction - Using a web service as astorage location for a filesystem. Two good examples areGMailFS and SSHFSConnector filesystems - Filesystems that abstract a methodof IPC or a network protocol. Two good examples are Plan9s netfs and RestFS
  • 8. RestFSA connector filesystem that provides a filesystem abstractionfor RESTful web servicesRequests to and responses from web services are madethrough filesystem system callsConnections are initiated through manipulation ofconfiguration files in the filesystemOAuth authentication can be established by manipulatingauthentication files
  • 9. RestFS - Configuration FilesConfiguration files specify the host, port, resource, andtriggering FS callTriggering FS call is the system call that triggers the webservice method &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;RestfulSetting&gt; &lt;FsMethod&gt;utime&lt;/FsMethod&gt; &lt;WebMethod&gt;GET&lt;/WebMethod&gt; &lt;FormName&gt;&lt;/FormName&gt; &lt;Resource&gt;/1/users/show/joekaylor.json&lt;/Resource&gt; &lt;Host&gt;api.twitter.com&lt;/Host&gt; &lt;Port&gt;80&lt;/Port&gt; &lt;OAuthTokenPath&gt;/auth/twitter&lt;/OAuthTokenPath&gt; &lt;/RestfulSetting&gt;
  • 10. RestFS - Resource FilesPrograms can read and write to resource files in a normalwayWhen the triggering filesystem system call is issued on theresource file a HTTP method call will be issued.If the resource file contains data, it will be sent along withthe callThe response will be written back to the resource file
  • 11. RestFS - Triggering Call Timeline
  • 12. OAuth Authentication in RestFSA special /auth folder exists in every RestFS mount.When a user creates a folder in /auth, 4 files are created: config - contains Access Token, User Auth, and Request Token URLs status - contains the current progress or errors encountered during authentication. If a manual step is required (such as a CAPTCHA test), this file contains the URL to visit verifier - if a manual step is required, any PIN that needs to be associated with RestFS can be written to this file token - after successful authentication, this file contains the authentication tokenThe token file can then be referenced in configuration filesThe associated resource file will automatically work withOAuth
  • 13. RestFS - Authentication Process
  • 14. OAuth Files (config)&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;OAuthConfigFile&gt; &lt;Key&gt;asdf3244dsf&lt;/Key&gt; &lt;AccessTokenURL&gt;https://api.twitter.com/oauth/access_token&lt;/AccessTokenURL&gt; &lt;UserAuthURL&gt;https://api.twitter.com/auth/authorize&lt;/UserAuthURL&gt; &lt;RequestTokenURL&gt;https://api.twitter.com/oauth/request_token&lt;/RequestTokenURL&gt; &lt;Secret&gt;147sdfkek&lt;/Secret&gt;&lt;/OAuthConfigFile&gt;
  • 15. OAuth Files (token)&lt;OAuthTokenFile&gt; &lt;AccessToken&gt;2534534asdf2348&lt;/AccessToken&gt; &lt;RequestToken&gt;aql2343&lt;/RequestToken&gt; &lt;TokenSecret&gt;adfjdsl24522&lt;/TokenSecret&gt;&lt;/OAuthTokenFile&gt;
  • 16. Software Composition with RestFSWith RestFS, it is possible to compose remote web serviceswith local softwareThis software can then be recomposed into new RESTfulweb services or other local software compositionsCan allow many computers to participate in local softwarecompositions of a RESTful service by mounting a RestFSvolume as a network filesystem over Samba or NFS
  • 17. Software Composition with RestFS
  • 18. DemonstrationsGoogle SearchYahoo! Place FinderTwitter

×