# Sunday, 08 November 2009

The term "Write Once, Run Anywhere" was Sun's slogan for illustrating a benefit of using Java. The justification being that Java runs on virtual machines, therefore not bound to any particular physical machines or hardware.

There are clear benefits to exploiting native features in cloud platforms today, but if a "Write Once, Run Anywhere" architectural strategy were available, what might that be?

The most basic components of an Internet application running in the cloud are JSON, Javascript, CSS, and HTML. There are, of course, abstraction development environments that automatically convert from a higher level language to one of these 4 formats.

Every storage solution in the cloud has their own approach to providing database services, but fundamentally they all manage Noun entities (aka tables) that have properties (columns). Cloud storage services also typically provide a web service, or controller tier for getting data out and putting data in.

Design considerations for "write one, run anywhere in the cloud" include:

  1. Embrace the core technologies freely found on the Internet and supported in all browsers
  2. Identify the fundamental Noun entities and properties. Keep it simple.
  3. Use multi columnar design over more complex 4NF schemas.
  4. Modularize the application functions that send/receive data to/from cloud services.
  5. Consider using a client-side database like TaffyDB for managing JSON in the browser.

This architectural pattern is more than a portability enabler. It's actually required for applications that aggregate multiple web services in a single application or use cross-site XHR.