the accompanying table “
Computational effects”).
Services as a Service
When developing code, programmers
rely on not only programming languages and libraries, but also various
tools such as debuggers and profilers.
When talking about moving existing
programming idioms to the cloud, we
tend to sweep a lot of details under
the rug that are necessary for building enterprise-grade services, such as
monitoring, tracing, distributed locking, fault detection, replication, and
fail-over. Interestingly, many of these
can be exposed as objects implemented by a service. Implementing
the building blocks for debugging,
understanding, and monitoring distributed systems is no panacea, but
it is a necessary condition to make
programmers successful in the new
world of distributed applications.
Other aspects that become relevant when composing larger services
from smaller services are colocation
and efficient service resolution. Even
on a single Windows machine, it is
necessary to reason about thread affinity—for example, in order to update the UI, you must run on the
UI thread. A practical substrate for
building distributed applications
must provide abstractions that make
location and placement boundaries
explicit—and perhaps provide local
atomicity or reliability guarantees.
Within the confines of a single machine, programmers often gloss over
such details (just as modelers do), but
in a distributed world, exposing them
becomes relevant and important to
acknowledge for both programmers
and modelers.
all Data is a monad
Even though I have argued that models are not the right operational basis
for cloud computing, let there be absolutely no mistake that I do acknowledge the enormous economic and
intellectual value of (relational) database technology, and programmers
are eager to use the data that modelers have curated, cleansed, normalized, and refined.
Fortunately, models can be embed-
ded into programs by appealing to a
generalization of Codd’s theory7—
namely, Category Theory. As it turns
out, most of the notions of “collec-
tions” or “tables” in various data-
base implementations are actually
instances of a mathematical concept,
really just a kind of interface, called
monads. Queries can be translated
into the underlying monadic opera-
tors implemented as code.
the Revenge of object Databases
Both relational databases and distributed actors shine in the right context. To paraphrase Pat Helland, 6 SQL
is clearly the undefeated leader for
transactional processing of data on
the inside. The object-oriented databases from the 1980s tried too much
to be like databases and too little like
objects, and they did not play to their
strengths. In the small closed world
of tables, declarative queries, and sophisticated optimizers2 it is difficult
to beat RDMSs at their own game.
In the big open world of the cloud
however, highly available, inconsistency robust, Web services exposed
as standard imperative objects/actors
will rule. The cloud era is one of (
monadic and comonadic) computation
and verbs, as opposed of to data and
nouns. To ease the transition for programmers to the cloud, we have identified the following requisites:
˲ Expose every data source created
by modelers to programmers using
monads/LINQ.
˲ Create a class library of distributed collections implemented as highly
available and scalable services but exposed using standard programming
language bindings and interfaces.
˲ Give programmers access to the
ocean of concurrency in the cloud via
comonads/actors.
˲ Expose tracing, monitoring, debugging, diagnostics infrastructure
as another service in the cloud.
Many of the required materials are
available today. What is missing is a
tasteful assembly of all these pieces
into a set of elegant and functional
packages that target the challenges
developers face when migrating into
the cloud.
acknowledgments
I would like to thank Brian Beckman,
Terry Coatta, Gavin Bierman, Joe
Hoag, Brian Grunkemeyer, and Rafael
Fernandez Moctezuma for improving
both the style and substance of this
article.
Related articles
on queue.acm.org
The Rise and Fall of CORBA
Michi Henning
http://queue.acm.org/detail.cfm?id=1142044
how Will Astronomy Archives
Survive the Data Tsunami?
G. Bruce Berriman and Steven L. Groom
http://queue.acm.org/detail.cfm?id=2047483
Cybercrime 2.0: When the Cloud Turns Dark
Niels Provos, Moheeb Abu Rajab,
and Panayiotis Mavrommatis
http://queue.acm.org/detail.cfm?id=1517412
References
1. abadi, M. and Cardelli, l. theory of objects. In
Proceedings of the European Conference on Object-oriented Programming Tutorial; http://lucacardelli.
name/talks/1997-06%20a%20theory%20of% 20
object% 20(eCoop%20tutorial).pdf.
2. De Witt, D.J. sQl query optimization: Why is it so hard
to get right? Keynote address at pass summit (2010);
http://www.slideshare.net/graysystemslab/pass-
summit-2010-keynote-david-dewitt.
3. gribble, s.D., Brewer, e.a., hellerstein, J.M. and
Culler, D. scalable, distributed data structures for
Internet service construction. In Proceedings of 4th
Usenix Symposium on Operating Systems Design and
Implementation (2000); http://static.usenix.org/event/
osdi00/full_papers/gribble/gribble_html/ dds.html.
4. helland, p. Data on the outside versus data on the
inside. In Proceedings of the 2005 CIDR Conference
(asilomar, Ca, Jan. 4-7, 2005), 144–153; http://www.
cidrdb.org/cidr2005/papers/p12.pdf
5. Jefferson, D., et al. the status of the time Warp
operating system. aCM (1988); http://users.ecs.soton.
ac.uk/rjw1/misc/Virtualtime/p738-jefferson.pdf.
6. Meijer, e. the world according to lInQ. ACM Queue 9, 8
(2011); http://queue.acm.org/detail.cfm?id=2024658.
7. Meijer, e. and Bierman, g. a co-relational model of
data for large shared data banks. ACM Queue 9 3
(2011); http://queue.acm.org/detail.cfm?id=1961297.
8. Microsoft research. Concurrent revisions; http://
research.microsoft.com/en-us/projects/revisions/
default.aspx
9. shapiro, M., preguica, n., Baquero, C. and Zawirski,
M. a comprehensive study of convergent and
commutative replicated data types. Inria no. rr-7506
(2011); http://hal.inria.fr/inria-00555588/en/.
10. Vogels, W. amazon’s Dynamo. all things Distributed
(2007); http://www.allthingsdistributed.com/2007/10/
amazons_dynamo.html.
Erik Meijer ( hjmmeijer@tudelft.com, emeijer@microsoft.
com) has been working on “democratizing the cloud” for
the past 15 years. he is perhaps best known for his work
on the haskell language and his contributions to lInQ
and rx (reactive framework). he is a part-time professor
of cloud programming at tuDelft and runs the cloud
programmability team in Microsoft’s server and tools
Business.
© 2012 aCM 0001-0782/12/09 $15.00