Paper 14
Paper 14
The Open Cloud Manifesto [9] promotes that cloud A possible solution could be to standardize a set of common
implementations must use standard guidelines but it does not services offered by clouds. These services homogenize the
propose a concrete solution. interaction among APIs and define an abstract standard API.
On the other hand, jClouds [4] is a Java implementation of a Then this API needs to be implemented by each cloud
standard package to unify multiple cloud providers. It supports provider, giving access to its particular infrastructure in a
the most popular clouds and gives developers the possibility to general way. The application developer uses the standard API
keep their applications lock-in free. This might be the best without knowing how it works or caring about which cloud
approach to the proposal of this document, but its strategy is made the implementation. When she/he wants to migrate an
different. application from a cloud to another, she/he just changes the
jClouds is a nonstandard API placed between the API implementation and, maybe, a minor adjustment in the
application and the cloud’s API. Its publishers have the task to code to have it working again, as Fig. 2 shows.
incorporate support for each popular cloud. Due to this, Some clouds offer unique services that cannot be
jClouds has a potential growth problem: as more clouds standardize. This is a potential dependency between the cloud
emerge, the API gets bigger and bigger until it becomes too and the hosted application. It may always be a problem but
heavy or it has to ignore some clouds to stay light. And since using a standard API instead of the today provided will narrow
there is no commitment from clouds to jClouds, a provider it to minimum.
could change its API and affect the results of this library.
jClouds is the only way to create portable applications at the III. PROPOSAL
moment. It is a good strategy but might not be enough for the To ease portability of applications between clouds, this paper
incoming future. proposes a model of a standard API which offers a set of
Keeping aside the clouds, standard APIs are a strong and common cloud services to application developers. This is just
elegant solution to unify functionality of technology with an abstract library to be used as a template. Opposite to
multiple implementations. Let us take Java and databases. jClouds, this is not an extra tool that aims to attack the
There is a standard API known as Java Database Connectivity problem by creating a large third party API that supports many
(JDBC), which allows Java developers to interact with clouds. The purpose is to create a model that cloud providers
different database providers (Oracle, MS SQL, MySQL, etc.). follow when they develop their public APIs, naturally causing
It does not handle the real communication between the the homogenization.
application and the database; it only contains basic classes and
interfaces to define the behavior of standard objects without IV. JUSTIFICATION
implementing them. The developer includes a driver with the
adequate implementation of JDBC for the desired database As a justification, a comparative experiment was realized
manager. This gives the developer freedom to migrate from between two cloud providers to verify how the same task
one database to another by changing the driver and slightly cannot be achieved in the same way in both of them.
adjusting the code. JDBC has been the solution for databases Amazon EC2 and Google AppEngine clouds where used for
with Java for many years and it is a good example of what a the example.
well-planned standard API is.
Among public clouds the difference of APIs can be huge. The goals for this example are the following:
Let’s take Google’s AppEngine and Amazon’s EC2. The first 1. To create a text file with the name series1000.txt with
one is Web container oriented, while the second is desktop the numbers from 0 to 999 as content.
oriented. This makes too complicated to transport an 2. To store the file persistently in both clouds under a
application from one of them to the other. A work around directory named example.
could be installing a web container on the EC2 cloud to have a 3. To retrieve the file again and read its contents.
similar approach in both of them. But that is not enough; the
difference between the AppEngine API and the other one A. Example implementation
remains and the dependency of the application to it forces the Each one of the used clouds brings a development kit to
developer to adjust the original application code to the new access and control their resource. The storage schema is
cloud. The higher the dependency, the harder is to port an similar but its treatment is not. Since there were some conflicts
application. with the latest Java version 1.7, we decided to work with JDK
6 (Java 1.6).
There are two kinds of storage. The first one is local in the
Amazon’s AMI which works the same way and with the same
limitations of a regular computer. The second one is the elastic
storage which is one of the virtues of cloud computing. It is a
way of storing files in units known as buckets without
knowing where they are physically or even if they are in the
same place. Also to store with no concern about free space.
Fig. 3. Code comparison to create a text file with EC2 and AppEngine. Left: Code for EC2 using conventional storage. Middle: Code for
AppEngine. Right: Code for EC2 using elastic storage.
TABLE 1.
TECHNICAL COMPARISON FOR THE THREE IMPLEMENTATIONS.
Case
Amazon
local
AppEngine
Amazon
S3
Create
a
file
instance
The class File from java.io is An AppEngineFile instance is acquired by requesting A local file must be created and after is
used, which is well known in the creation in the bucket to the service. uploaded to the bucket.
Java development.
Write
content
to
the
The text is written directly by A FileWriteChannel which is opened from an existent A local file is written in the same way as
file
opening a FileOutputStream to instance of the file in the bucket. Then a regular in the local case. Then the file is
the local file. stream must be opened. uploaded to the bucket.
Read
the
content
of
A FileInputStream is opened to A FileReadChannel to the file in the bucket must be A direct InputStream to the file in the
the
file
the file directly and the text can requested to the service and then we can open a bucket is requested.
be read. regular input stream.
V. ANALYSIS MODEL OF THE STANDARD API • User management service: the front end of many
The goal of this paper is to propose the basic structure of a software systems on the cloud is presented as a web
standard API for cloud computing by following the Unified application and user accounts are basic on this
Software Development Process methodology and using the paradigm. The cloud provider implements
Unified Modeling Language. In order to do this, we begin by registration and login procedures releasing the
identifying the common services provided by clouds. Here, a application developer of these tasks. The developer
service is a set of tools and protocols offered to the user in accesses a limited set of information about already
order to solve a particular problem and meet its requirements. created user accounts and relies on the cloud’s
This paper proposes eight services as an attempt to group security.
the most general needs of a web application developer. • E-mail access service: since there are user accounts, an
e-mail system is also useful to communicate them. In
• Quota service: allows the application to know the
this case, the cloud hosts e-mail servers to be used by
status of the resources quota established on the
the applications and the user itself.
leasing plan. With this service the application can
• Data processing service: needed to take advantage of
react when maximum quota is being reached or
the unlimited resources of a cloud when processing
exceeded.
complex information or large amounts of data. Here
• Persistent storage service: to save and load
the cloud provider implements cooperative
information with a traditional file schema in
distributed oriented systems (like Map-Reduce) to be
nonvolatile storage devices. The duty of the cloud
used by the developer.
provider is to have a distributed enlargeable file
The implementation of these services will not be easy for all
system accessed and managed by the cloud user
cloud providers. But this is a worthy effort as we will have
through the service. Includes access rules,
better compatibility and gives an added value to cloud users.
permissions, and isolation.
• Database management service: to access and manage A. Use cases diagram
relational databases. In this case, the cloud provider An actor is an entity that interacts within the system by
must offer a way of working with apparent unlimited giving or requesting services to another, as Fig. 5 shows. In
relational databases even if they work with other this case, two actors of the Standard API are identified:
designs. • The application developer is who requests services to
• Security service: to establish secure communication the cloud. It builds applications using the tools given
channels between a cloud application and the final by the cloud provider.
user or another application. Also to protect sensitive
information through encryption algorithms and
signatures. The cloud provider implements a set of
common security algorithms or includes a third-party
library.
• Communication service: to transfer data from one
application to another inside or outside the same
cloud. Now the cloud provider implements protocols
to open, use, and close data flows between
applications. It may also give a set of standard data
types known by other clouds.
X. CONCLUSION
It is clear that cloud computing will continue growing and it
is important to have guidelines and standards to avoid anarchy
Fig. 12. Code variations to work with Google and Amazon’s clouds
on application development.
This paper has discussed the problematic caused by the lack
of standard application programming interfaces in the clouds.
Comprehensibility: If the API user or the SPI implementer
By identifying common services based on development
does not understand it, perhaps the target user’s knowledge
needs, a standard API was proposed and modeled using the
was not correctly evaluated. There must be an estimation of
Unified Software Development Process methodology and
the average profile required. Concerning about this means that
UML.
the API should be really easy to understand without losing
This proposal attempts to be the beginning of a complete
neither completeness nor performance. The desired user’s
model for a standard API to be implemented.
profile for the standard API is a medium level Java developer.
It is not necessary to have advanced knowledge to exploit its
functionality.
To the SPI implementer, a clear package will be given; REFERENCES
about what it is supposed to be done and how. A [1] M. A. Vouk, “Cloud Computing – Issues, Research and
Implementation”, Journal of Computing and Information Technology –
misunderstanding could result in unpredictable results. These eCIT, vol. 16, no. 4, pp. 235-246, 2008.
are some evaluation results: [2] B. P. Rimal, E. Choi, and I. Lumb, “A Taxonomy and Survey of Cloud
• Uses clear terminology and code conventions [11] Computing Systems”, in Proc. of Fifth International Joint Conference
• Is written in English on INC, IMS and IDC. pp. 44-51, 2009.
[3] B. Claybrook. “Weighing the cloud computing standards dilemma”, in
• Requires no advanced programming skills Search Cloud Computing. Feb 2011. Available at:
• Class and method’s names are descriptive. http://searchcloudcomputing.techtarget.com/feature/Weighing-the-
cloud-computing-standards-dilemma
Consistency: The consistency of an API embraces from [4] jClouds. Available at: http://code.google.com/p/jclouds/
[5] I. Jacobson, G. Booch, and J. Rumbaugh. “Unified Software
entity naming up to release versions. Development Process”. Ed. Addison Wesley, 1999.
Data types chosen for certain cases, are being used [6] Distributed Management Task Force (DMTF): Open Virtualization
wherever the application is the same, so the user can Format specification. Available at: http://www.dmtf.
remember them easily and predict what methods will use even org/standards/published_documents/ DSP0243_1.0.0.pdf.
[7] Distributed Management Task Force (DMTF): Open Cloud Standards
if they are unknown for him. Incubator. Available at: http://www.dmtf.org/ about/cloud-incubator.
The contract between the API and the user was mentioned [8] Open Grid Forum (OGF): Open Cloud Computing Interface
before. This must prevail trough the evolution of the system; Specification, Open Cloud Computing Interface Working Group,
provide backwards compatibility without contradict neither Available at: http://www.occi-wg.org.
[9] Open Cloud Manifesto. Available at:
structure nor functionality. http://www.opencloudmanifesto.org/Open%20Cloud%20Manifesto.pdf
[10] J. Tulach, “Practical API Design: Confessions of a Java Framework
Exhibit: the exhibit refers to the facility the API gives to the Architect”, Ed. Apress. EUA, 2008.
user to understand it and learn it. In both sides (API and SPI) [11] Java Code Conventions. Available at:
http://www.oracle.com/technetwork/java/codeconventions-150003.pdf
there must be clear and complete information about how to
use the system. These are some results in the evaluation of
exhibit:
• The abstract API includes inline documentation
(Javadoc).
• The developed UML model can be used as reference.
• Processes documentation is not done yet.