Firstly, sorry for the long gap between my posts. I promise to be more committed 🙂
These past two weeks, we have been working on Makedrive: a file system module that can sync to every copy of that file system. It is important to understand the power of what we are trying to do here. As a user, if I have a file system on my desktop and I add/change/remove files or directories in there, I can now just check my tablet on my way to work and see the changes I made on my desktop on my tablet. And the point is to make it work on a browser. Kinda like Dropbox in a browser. Sounds neat eh? Well, as cool as it sounds, it was really really hard to implement.
We used Filer, an awesome filesystem unit conceptualized by the genius Alan K., as our base and worked from there. I worked primarily on the syncing component. I worked of code developed by a fellow classmate of mine Petr B. It took a while to understand the code, especially since it was quite complex, but within two days I had a decent understanding of how rsync (which is the syncing algorithm we were using) worked. But there were some issues that needed to be fixed like syncing empty directories. That took forever! I had to figure out where stuff went wrong which is hard when you are working with MD5 hashes and non-human readable data. But I was able to get it done in the end.
Then came the hard part. We were able to sync from one file system to another. But what about over a network. There was nothing that could really help us with this design and no real resources we could look for. Well, it took a while but we were able to come up with a design (courtesy of David H. and Alan K.) that involved syncing through an API. In a few days, I was able to configure routes for an API (since I have good experience with designing API’s thanks to the Web services course I took) based on what I thought would be good end-points in each step of the sync process.
It took a while, but after integrating with my colleagues pieces of code, we were able to show a small demo of this to Mozilla themselves o/
And there you have it…another successful project by the CDOT Mozilla Webmaker team!