Cloud Computing with Models

![]() |
BAM is a tool for the model-based development of cloud applications, i.e. software systems that are both distributed (across many agents) and dynamic (agents come and go). BAM employs a novel set of formal abstractions to help the software engineer reason about the following issues: (1) Has the system been fully specified? (2) What behaviors will emerge over arbitrary distributions of the system? (3) What happens to the system in a dynamic network where agents enter/exit and communication links fluctuate? |
|---|
![]() |
Research | ![]() |
Projects | ![]() |
Publications | ![]() |
Home |
BAM uses a novel abstraction layer to help the software engineer understand how a cloud application will behave.
We call this abstraction layer "The Clique Abstract Machine" (CAM).
It views a cloud application as an evolving set of nodes that can be connected in arbitrarily complex networks.
Each node contains an abstract database according to an implementation-independent schema.
A connection between two nodes represents a point-to-point agreement between that these nodes can share information from their databases.
Since the nodes of the cloud are not fixed, the user does not specify how many nodes exist. Instead, the user specifies the types of nodes in the cloud.
For example, in the figure below there are orange and purple nodes. The precise number of orange and purple nodes changes over time, and is not known a priori.
The user also describes the schema of an abstract database, and assigns parts of this schema to each type of node.
Along with the database schema, the user must provide a set of "consistency rules".
These rules are database queries that examine the database for inconsistencies in the data. Finally, a set of operations are defined that can
change the state of the abstract database. The CAM extends these rules and operations so they are meaningful over every configuration of the cloud.
The extension is performed over the maximal cliques of the cloud. The figure shows a random configuration of an example cloud that was generated via simulation.
BAM provides a domain specific language (DSL) for modeling cloud applications. The abstract schema for an application is captured as
as a UML-class diagram (or a metamodel). The consistency rules are described graphically as declarative queries over the abstract schema. Operations are defined
in a similar fashion. The tool also allows the nodes types and schema partitioning to be easily specified. The figure below is a screenshot of a
partial BAM specification.
BAM models constructed with the graphical tool are more than just pictures. They represent a set of mathematically precise definitions
that can be viewed as logic programs. BAM models are converted to an extended logic programming language called
Formula.
This representation facilitates formal analysis of BAM specifications and synthesis of efficient implementations. The figure below
shows some of the Formula code from the model above. This code is viewed within Visual Studio through a custom language service.
A BAM simple specification corresponds to a complex distributed system. Moving from specification to implementation creates a number of real-world challenges:
Node discovery: There is no centralized source that knows which nodes are in the cloud. Without this information, connections cannot be made between nodes and the system cannot perform useful work.
Maximal clique calculation: Clique detection is a key aspect of the communication model. Nodes must collaborate to calculate cliques. It is particularly important to detect silently failing nodes, as these affect the maximal cliques.
Web interface: Users expect a browser-based web interface, but this necessitates: XHTML, CSS, JavaScript, a stateful Web Server, and communication protocols.
Execution of consistency rules and operations: Consistency rules and operations must be translated into an executable form. Also, nonlocal data must be brought onto whatever node executes some query or action.
Persistence layer: Data needs to be persisted in a reliable manner.
BAM solves these implementation challenges for you, and uses code generators to synthesize implementations on a state-of-the-art implementation stack.
The figure above shows a "cloud monitor" that
is automatically generated as part of the implementation;
the monitor displays the state of the cloud. Nodes can also be
created/destroyed and connected/disconnected through the
interface. The main panel reflects the current connectivity of the
cloud. Different node types are assigned different icons:
The black icons are servers and the gray icons are clients.
The upper-right panel contains
a list of generated network tools for modifying the
state of the cloud. (The cloud can also evolve on its own.)
The middle-right panel shows the maximal cliques and information horizons
calculated by the selected node, andthe lower-right panel displays
messages passed between nodes. Finally, the bottom-panel is an embedded
web-browser for navigating to the web interface of
an arbitrary node. The monitor can navigate to any of these
generated web-pages.