CloudProxy: The Secret Sauce In the Actionatr Recipe

Monday was fabulous thanks to Adobe. They released new database support in AIR, formerly known as Apollo. This removes lots of complexity for the desktop version of Actionatr as well as making the installation story simple once again. Given this new tidbit plus all of the other goodness that was announced and released regarding Flex 3, I have more specifics to share with you.

Ubiquity First

Instead of building all of Actionatr before launching, I am starting with ubiquity (the central, killer feature) as step one, followed by regular releases to add features and include progressively more users in the beta. What I mean by ubiquity is a list that goes everywhere, online or offline, in or out of the browser, in its simplest form. It will be similar to the Actiontastic inbox, spread over multiple operating systems and devices in order to demonstrate the concept and get some code out there for other interested hackers.

CloudProxy

The secret sauce for the first release is something that I hope to extract into an independent open source set of components for JavaScript, ActionScript3, Ruby, and possibly Java (for J2ME) when the time is right. It is tentatively called CloudProxy, an abstraction from data storage that delegates to a REST web service and/or local SQL storage as appropriate. Because REST and SQL behave as semantic siblings, a transparent blend of the two works out quite well.

The sequence in code for adding a new inbox item (in the desktop app) goes like this:

Step 1) A user adds an inbox item.
Step 2) A CloudProxy object checks for network availability. If found, a POST is issued against the REST API hosted at actionatr.com which stores the inbox item and returns its remote identifier.
Step 3) The inbox item is stored locally in the SQLite database using its own local identifier plus the remote identifier, if available, from Step 2.

Any time the network state changes from offline to online, any objects with missing remote identifiers or timestamps newer than those on the server are pushed. Any objects on the server with timestamps newer than those on the local app are pulled.

Now you have the recipe. The code is next.

Comments (8) left to “CloudProxy: The Secret Sauce In the Actionatr Recipe”

  1. Chris Messina wrote:

    Wow, this sounds awesome…! I can already think of a bunch of uses for current projects I’m working on… ;)

  2. Mike wrote:

    It’s great to hear that there is ongoing progress. Can’t wait to try it out.

    > Any time the network state changes from offline to online

    But what if I leave my work computer on, then go home and access my todo list…won’t I still be looking at an outdated list, since there was no online to offline change at my work computer?

    Maybe a periodic update would make more sense?

  3. Alex Jones wrote:

    Great news! I love Actiontastic and cannot wait to get my hands on Actionatr as well so I can keep a single list across my personal MBP and my PC at work. Thanks for providing such a great tool, and even more thanks for sharing the details of the project. I’m sure a lot of future apps will benefit from the CloudProxy.

    I can’t wait to get my hands on a beta!

  4. Jon wrote:

    @Chris:

    Thanks! The force is strong with you ;-)

    @Mike:

    The three steps listed prior to the bit about catching up after being offline will apply to every operation that changes something in the app. So, unless your work computer is offline the entire time, the web app and eventually your other client apps will be as up to date as the last moment you were online at work.

    I hope that explanation helps. If not, let me know.

    @Alex:

    Thanks! My hope is that the CloudProxy will indeed be used elsewhere and have tons of ideas for future apps related to this.

  5. William Henderson wrote:

    Sounds really sweet, Jon. Let me know when you need a beta tester (bonus: I’m a cocoa and a rails developer!).

  6. Ryan wrote:

    Any way we can sign up for the beta? I have been constantly check for any news on actionatr for quite a while now and am anxious to get my hand on it

  7. Jon wrote:

    @William and @Ryan:

    I will post something as soon as I figure out the best way to run a beta for this app. You can always sign up for the release announcement at actionatr.com, but there will probably be an even earlier beta release if you’re interested. Secondly, you will have access to the source very soon, which will mean pre-alpha versions that you can use, modify, etc.

  8. Jochen wrote:

    That sounds really cool! Especially CloudProxy would be something i’d love to get a hand on. If i got you right it will be very similar to Google Gears, but without the need for a browser plugin.

    Can’t wait to see that in action!