Tips for Accessing the Cloud with an API and JavaScript

Cloud storage has been around for several years now and we are still learning what we can do with it. In the past couple of years, people have begun looking at how to access online storage from their own custom applications through application programming interfaces (APIs). This has prompted vendors to begin releasing APIs to their cloud storage that can be called from server-side applications.

Still Working out the Kinks

Dropbox and Google are two companies with APIs that can be used to access their cloud storage. Typical issues to be addressed when working with any API include:

  • The security and authentication mechanism is unique to each cloud storage product
  • A unique API key may be needed to write to the online storage area, depending on whether it is a user or application initiated write request
  • Their may be a unique URL available to the application to write to the storage area
  • Security needs may still require human interaction with some APIs

People are still experimenting with different techniques to access the cloud directly from application programs.

Becoming More User-Friendly

Software vendors are beginning to create tools to support the use of JavaScript to make API calls. Atmos now supports JavaScript with a wrapper that facilitates calls to the REST API used in Google Drive. Requests are handled asynchronously so there is no waiting for responses. The code is open source and available to anyone to experiment with.

Dropbox has an API that can be used to modify or save files in their cloud storage, just one of the new convenient trends in cloud computing. This API is oriented to the user access of their own information as opposed to the application determining where the data should go. This will be useful in the “single-user” environment such as a mobile-device user that wants to save their information to Dropbox. Google Cloud Storage is best accessed by their API. There is also the REST API from AppEngine. You can also make use of custom URLs that your application will work with much like a user works with a Web page. The application will know how to interpret the data returned from the “page” and continue processing based on that.

Automation is the Next Step

One of the goals of your JavaScript API interaction is to not require any human intervention. You don’t want the process to stop and ask someone to “Press Any Key to Continue.” These platform restrictions are deemed necessary by the vendors to make sure the user’s data is secure, but it limits the potential of any application. Google does have a JavaScript client library for its APIs that supports the major browsers and gives access to the REST APIs used in their online storage. The download page includes examples and a walk through of each phase of the script.

With no real standards in place for cloud storage APIs, developers must make their applications storage platform specific, or create separate applications for each platform. As JavaScript libraries become more inclusive of the various APIs they support, developers can create more standard tools for allowing applications to utilize the various cloud storage platforms available.





If you like this article , then please help us by bookmarking

No comments yet... Be the first to leave a reply!

Leave a Reply

You must be logged in to post a comment.