Lazyweb: Git on Android
I did a tweet the other day that I thought should be expanded upon:
Dear the googles, please could you add an implementation of Git or Hg to a future Android? Be awesome kthxbailuv me / cc @crafty @tornorbye – James Hugman (@jhugman) January 20, 2012
I was thinking principally about embedding Git: JGit is written in Java, so could be bundled into an app, or use the NDK to compile CGit; however it occurs to me that Mercurial or Bazaar might serve just as well. Edit both Mercurial and Bazaar are python based.
I’m sure that this is not a new idea – it’s likely to be a fairly obvious idea. What I’d really like is an API for any app to use to push to and pull from arbitrary repos across the internet.
BackupAgenton steroids, onto a server controlled by the app developer.- Data synchronisation. Sync my data on to all my devices. iCloud without the single point of failure.
- Configuration management of all installations of my app. Puppet used to use a CVS repo for this purpose.
- Fairly easy implementation of “Undo” or “Revert” type functions.
An interview with a Googler on HTTP ETags (I can’t find it anywhere) suggested that they (Etags) could be used to turn the whole internet into a cache or CDN for your app. A distributed SCM could do the same for syncing.
Because these tools already exist, there’s a plethora of support libraries and APIs to use on the server and desktop:
- Drop content in at the server’s copy of the repo, and it spreads out to all devices. e.g. Kindle book distribution.
- Perform calculations on the server and push the results out the user’s clients by committing the the user’s repo. e.g. [Tweeted Times] (http://tweetedtimes.com)
- Webapps that integrate well with your devices.
As a fairly unimaginative soul, I’ve only touched on the most obvious use cases I could think of; I’m sure that such power could be wielded with much greater ingenuity.
Indeed, I would expect the likes of Parse to be all over it.
Unfortunately, I don’t think it’s ever likely to happen:
- The Gears team were reluctant to provide a syncing API, as they couldn’t provide a one-size-fits all solution.
- Engineering time – I haven’t done enough research to find out how much work it would be, or if there needs to be any restrictions needed to be implemented. I know AGit took about a year to produce, but that also includes user-interface work.
- Strategy reasons. This may compete with existing Google provided solutions. I’d also like to see MQTT in Android, but it competes with C2DM. Who knows, though, it could already be an existing 20% project.
I hope I’m wrong: it would provide a substantial response to iCloud, but without having to pay for server infrastructure.