19. February 2014

Amazon S3, file system.

I had my hands dirty for the first time, in last couple of days, with Amazon Simple Storage Service (S3). I was playing with the javascript SDK and getting to know the environment in general. The first impression is, it just stores the files and folders. But, digging deep inside and playing with its APIs, made me realise that its different than the traditional storage.
Everything is just a pointer, well thats how I see it.
Amazon says, everything is a file. So that means a folder is a file with a different naming convention. Thats it, if you get that, then the API is straight forward. And I must say from the beginning of the computer era, one thing has been consistent and that is file system. Now, the way, new storage solutions are emerging, it’s not actually different from others’ offers, but definitely different from traditional file systems. The new era of the file systems or more generally we can say data storage systems are emerging and Amazon is no different in that regard. So, all in all, a new storage system with a very simple SDK is exciting.

Happy coding.

15. February 2014

jQuery Mobile, making change page work.

The last post about the change page API change of jQuery Mobile tells you as to, how to change a page, in the new API. I was hoping thats the only change, but there seems, some kind of fix necessary to make a page, change properly. I mean, there is this bug, where the page change actually does this. It goes to the page mentioned by the change page and then it comes back to the page again, from where it was moved. So the effect is, the page is not chaged at all and the user looks at a screen, where the application simply moves to another screen and comesback to the original screen.
For me the fix that worked is send changeHash:true in the options object of the API.

Happy coding.

14. February 2014

Amazon S3 Sync with NodeJS

This is my first practical cross-platform desktop application written in NodeJS. The application is a simple desktop client to upload the changed files in a folder automatically to a bucket in Amazon S3. The main components, which make this application, are

Well, there is a NodeJS module as well for the SDK, but I prefer to take it only browser way at the moment.

The source code is available here and to run it, get a copy of the node-webkit for your environment. And that makes a cross-platform application on NodeJS.

Currently the application keeps an eye on a folder, you specify. Once a file is changed in that folder, is automatically uploaded to the ‘bucket’ you specify in the beginning of the application. Note, currently it just uploads the files, which are changed. It does not upload a new file in the folder or any existing file.

Happy synching.