cloud e book

10
A Cloud Computing EBook 1 CLOUD COMPUTING SEARCHSOA.COM Languages for Cloud Computing Distributed Caching Scaling Horizontally Changing Data Architectures Midcloud Re-make or Re-model? As developers consider moving applications to the cloud, to what extent will they have to re-think familiar go-to languages to make apps work there?

Upload: mrammaddali

Post on 05-Feb-2016

227 views

Category:

Documents


0 download

DESCRIPTION

Cloud e Book Cloud Computing

TRANSCRIPT

Page 1: Cloud e Book

ACloudComputing E-Book

1 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud

Re-make or Re-model?Asdevelopers considermovingapplications to the cloud, towhat extentwill theyhave to re-think familiar go-tolanguages tomake appswork there?

Page 2: Cloud e Book

As developersconsider movingapplications to thecloud, to what extentwill they have to re-think familiar go-tolanguages to makeapps work there?

THE UPSURGE IN cloud computing pres-ents development teams with chal-lenges that may require them torethink established ways of buildingapplications.One school of thought maintains

that the best bet is to upload applica-tions as they are to the cloud, doing aslittle rework as possible. Anotherschool contends that applicationsshould be radically re-cast if they areto fully exploit cloud architecture.For developers, the issues play out

on several levels. Naturally, languageis essential to programming. So cloud

developers may ask, “Can I use myfamiliar language tools, or should Ilearn a new language?”Software architectures will be

reviewed in terms of memory: howdevelopment teams allot processesin memory, how they call to relationaldatabases and whether they shoulduse relational databases at all.

NO SHORTAGE OF LANGUAGESFOR CLOUD COMPUTINGOf course, languages are intrinsic towhat developers do, and the selectionof language can influence the futurecourse of a development effort. Todate, .NET, Python, Apex and Java,along withWeb services architecture,are the primary languages of the cloud.But what comes to pass for cloud

can vary and carry different names. Incertain cloud settings that could bestbe described as “hosted services,”developers merely upload what theyhave already created and tested on atraditional platform.While Amazon.com had a signifi-

cant hand in getting cloud computingrolling, the AmazonWeb Services

Chapter 2: Cloud Developer Strategies

2 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud

Re-make orRe-model?By JackVaughanandRobBarry

Page 3: Cloud e Book

(AWS) offering, which requires devel-opers to work withWeb ServicesDescription Language (WSDL) con-tracts and Amazon services applica-tion programming interfaces (APIs),has been somewhat overshadowed byAmazon’s Elastic Compute Cloud(EC2) offerings, which allow users tosend applications to the cloud on an

“as is” basis.“It starts at one end with just raw

storage and computing capacity. Thatis what Amazon is,” said John Rymer,an analyst at Forrester Research Inc.(who adds that, in fact, Amazon canfield its provisions via Web services).With Amazon, said Rymer, you don’thave a programmodel and database.

Chapter 2: Cloud Developer Strategies

3 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud

The Languages of the Cloudn Apex: Salesforce.com’s Force.com uses this proprietary language. Apex is a low-level language and is said to be built for use by both professional developers andend users. Visualforce, Force.com’s graphics programming interface, is built onApex.

n Java: Onemainstream language making recent inroads in the cloud is Java. Thisspring, Python proponent Google opened up its AppEngine platform to include Javasupport as well. Meanwhile, Schakra Inc. built a Java software development kit, orSDK, for Microsoft .NET Services.

n .NET: At its launch,Windows Azure was said to support any .NET language, includ-ing Iron Python and Iron Ruby. The emerging consensus has most Azure develop-ment undertaken with C#.

n Python: Early iterations of Google’s cloud approach relied on Python. This venera-ble object-oriented language was instrumental in the company’s rise to prominence.But it is far frommainstream.

n Web services: Early cloud interest coincided with the growth of high-level Webservices that employWeb Services Description Language contracts. While latelyAmazon has promoted EC2 as a cloud platform supporting as-is porting of existingapps built using any language, its AmazonWeb Services is an option for cloud com-puting development.

n You name it!: A broadly popular approach to cloud computing seeks to port applica-tions to the cloud on an as-is basis—thus not requiring rewrites or special lan-guages. —SOATALKBLOG

Page 4: Cloud e Book

“You have to do that on your own,” hesaid.Google is different in that it has the

App Engine and the BigTable data

store, Rymer noted.In its first iteration, Google’s cloud

approach relied heavily on the Pythonlanguage, which, though popular with-in the developer army at Google andelsewhere, is not widely known. Inrecent months, Google has begun totest a Java software development kit(SDK) for cloud development.“Google provides a programmodel.

That is fundamentally different thanAmazon. It provides more of what adeveloper needs,” said Rymer.But the benefit of providing what

the developer needs also invites thethreat of vendor lock-in.Rymer cited Salesforce.com and its

Force.com interface. “You have Force.com, where you have a proprietarylanguage: Apex. It is low level,” he said.Some say that graphical tools have

come a long way and can streamlinedevelopment for nondevelopers. Assuch, it is part of a larger trend that,where possible, seeks to insert graphi-

cal modeling interfaces and thus takedevelopment out of the hands ofdevelopers.Programmers and architects alike

know low-level programming likelyinvites vendor lock-in too. But it alsomeans programmatic power. “WithForce[.com], you have richer tools,and also a kind of access to an appli-cation model. It’s good for managingbusiness entities,” Rymer said.Google’s application model has ben-

efits, supporting Python (and, lately,Java) and the BigTable architecture.Rymer emphasized that the Googlescheme is not built for transactionalpurposes. “It’s designed for search,”he said. (For more on Google’s archi-tecture, see “Is this the dawning of theage of hosted providers?” on the SOATalk Blog.)A later arrival to the cloud develop-

ment fray, Microsoft has pledged tosupport any .NET language in thecloud. Such languages includeVB.NET, IronRuby and IronPython, butthe most likely first choice will be C#,the flagship language of .NET. Recent-ly, a Java SDK for Azure, Microsoft’scloud platform, has even arrived.If you like many flavors in developer

languages, the cloud does not disap-point.

DISTRIBUTED CACHINGEver-faster processors and cheaperblade computers set the stage for thecloud era. They also insulate develop-ers from some performance and scal-

Chapter 2: Cloud Developer Strategies

4 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud

“Low-level programminglikely invites vendorlock-in, but it alsomeansprogrammatic power.

Page 5: Cloud e Book

ability issues. But with memory archi-tecture in particular, would-be cloudarchitects may want to re-visit theirdesigns if they want to see continuedimprovement gains based on paralleloperations (a form of computing inwhich many calculations are carriedout simultaneously).While many factors have combined

to make parallel cloud computingwidely attainable, parallelism is stilldifficult. In recent years, distributedcaching and machine-level paral-lelism, especially in the Java space,have matured quite a bit, and thediverse offerings of assorted vendorsmay indicate how some cloud applica-tions will evolve.JavaSpaces, for example, is a service

specification that arose out of a smor-gasbord of Java community standards.Based on the notion of a Tuple space(a means for dividing associativememory into units that can beaccessed concurrently), the Java-Spaces framework enables scalabilityin parallel processing with distributedobject caching.In recent years, technologists have

worked—somewhat under the radar—to commercialize this and other paral-lel schemes, especially for applica-tions targeting traders onWall Streetgiven the real-time nature and high-computing requirements of theseapplications.OnWall Street, Enterprise Java-

Beans (EJBs) and associated proxieswere used to effectively abstract thelocation of objects, but this added

many layers to system architecture.That meant inefficiencies and latency.“Garbage collection”—a problem thatin many ways Java solved—still creat-ed performance issues where ultra-high performance and efficiency wereconcerned.

Standard J2EE servers neededimprovements, many of which camefrom specialty vendors of distributedcaching schemes, persistent objectstores, JVM accelerators and failoverarchitectures.Nati Shalom, the chief technology

officer at GigaSpaces Technologies—which has a commercial version ofJavaSpaces—offered a view of howdevelopment issues in the cloud couldpan out. In July 2009, GigaSpacesrolled out its eXtreme ApplicationPlatform (XAP) 7.0 application server,which can react to loads in real timeand automatically provision additionalresources as required.“If an application was originally built

Chapter 2: Cloud Developer Strategies

5 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud

“Withmemoryarchitecture inparticular,would-becloud architectsmaywant to revisit their de-signs to see continuedimprovement gains.

Page 6: Cloud e Book

in a static way,” Shalom said, “movingthat application unchanged to thecloud means you have simply placed itin another hosting environment.”That is a waste in terms of scalabili-

ty and performance benefits by hismeasure. In some cases, it can alsocreate application failure.“For us, cloud is a very natural fit,

because we’ve been dealing withcloud before the name cloud cameinto the world,” said Shalom. “It bringsa lot of challenges that we faced in aniche market. Now that cloud is get-ting more affordable, more people aremigrating. And more people are get-ting into the issues.”

SCALING HORIZONTALLYPractices that fared well in simpleJava apps will not play well in thecloud. As a result, many developerswill be forced to rethink familiar prac-tices such as data calls and storage.Programmers versed in high-perfor-mance transactional Java have alreadydiscovered this hurdle.“If you are using the database to

store application-specific data, tran-sient data or data related to a usersession, it is not going to scale on thecloud,” said Jeff Hartley, the vice pres-ident of marketing at Terracotta Inc., amanufacturer of high-availability Javainfrastructure software.At this year’s JavaOne conference,

the company said it was working withVMware Inc. to reduce Java applica-tion complexity for cloud computing.

“Databases don’t scale well ‘hori-zontally’ [that is, simply adding simi-lar machines to handle work] as ageneral rule,” Hartley said. They scalevertically, he noted, but only if you“buy bigger hardware.”Hartley said the material in a data-

base can constrain the scalability ofclouds. “You can’t just add anothermachine for a database as you canwith something like Teracotta,” hesaid.In fast, distributed systems, it is

preferable to keep user session infor-mation out of the database, and Terra-cotta software helps in this regard.You can place session data in distrib-uted memory rather than databasememory, and “it will scale horizontallyquite easily,” according to Hartley.Distributed caches and high-avail-

ability application clusters havebecome bona fide best practices forsome types of Java and SOA applica-tions, said James Staten, a principalanalyst at Forrester Research Inc.“They are very characteristic of the

applications we see going in thecloud,” he said.“One of the key problems of cloud-

based implementations is latencybetween the components of the appli-cation, which is something Giga-Spaces and others address.”Among the larger players in a small

legion of data caching providers isOracle Corp. When it purchased Tan-gosol Inc., the maker of the Coherencecaching software line, the databasecompany delved into the data caching

Chapter 2: Cloud Developer Strategies

6 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud

Page 7: Cloud e Book

space.Cameron Purdy, Tangosol founder

and now Oracle vice president ofdevelopment, explained what hedescribed as the “distributed cachingspace,” and its relationship to thecloud. When e-commerce became ahot application early in this decade,session management was immediate-ly a problem. Coherence addressedthe problem with caching and failover.Among other tasks, Coherence

manages sessions. The technologycan be used for caching highly usedcatalog information and so on. By

offloading elements from persistentstorage, users can improve scalabilityand reduce queuing.Released in mid-July 2009, Oracle’s

newest version of Coherence demon-strates further improvements in ses-sion handling.“Some of the new options include a

no-locking option for very high-con-currency systems, where applicationsare load-balanced over many servers,”Purdy said.In its latest version, the Oracle

Coherence software provides teras-cale support to in-memory data grids.

Chapter 2: Cloud Developer Strategies

7 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud

Optimizing Data ResourcesALTHOUGH PRIVATE NETWORKS have featured distributed caching for a while, moving themodel into the cloud presents several security risks.“It was designed for private networks so that if you send a message to a single IP,

it goes out to everyone in the network listening to that IP,” said Emil Ong, the chiefevangelist and a lead developer at Caucho Technology Inc.“We’re trying to make it so developers can write their code on one machine and

migrate it to the cloud without having to change any of their code,” Ong said.When starting a new application instance in the cloud, developers often have to

write complex custom scripts to push out an application.“We take care of that by putting that deployment mechanism in there,” Ong said.To build applications that are fully optimized for distributed resources, Ong said

being meticulous is a must.“It’s easily the most difficult problem in computing, where you have multiple actors

working in tandem to make use of certain resources.”In June 2009, Caucho Technology announced a new release of its Resin 4.0 appli-

cation server, which features distributed caching. Caucho has traditionally madespeed its primary concern, Ong said. Distributed caching lets it boost Java serverperformance in the cloud. It allows the results of complex computational processesto be stored for future use to cut back on repetition. —J.V.

Page 8: Cloud e Book

A safeguard agent can automaticallydetect and correct service disruptions.

CHANGING DATAARCHITECTURESMIDCLOUDPerhaps because relational databasecalls pose issues in highly distributedarchitectures, Google took a newapproach when building out its flag-ship search site, which has alwaysbeen somewhat of a poster child forcloud computing. Although enterprisedevelopers tried to recreate relationaldatabase-heavy transactional apps ontheWeb, Google kept things flat—forexample, went without a SQL data-base. The question is whether thisarchitecture, which serves Googlecloud apps such as text search, canalso apply effectively to classic enter-prise apps.As developers look to move applica-

tions to the cloud, they will discover amixed landscape. They will find Ama-zon with its SimpleDB. They will findGoogle with Hadoop and MapReduce.They will find out how prevalent state-less representational state transfer(REST) and nonrelational architec-tures have become. Do they have toshun relational methods that havebeen at the heart of enterprise devel-opment for a long time?Microsoft, for example, has had to

contend with this issue as it tries tofashion its Azure cloud architecturefor use by established applicationsand newbie applications alike.The company’s original cloud archi-

tecture took an approach to data simi-lar to first-generation clouds fromAmazon and Google. At the time, thatmeant forgoing SQL, the familiarworkhorse of modern IT.Microsoft pumped up its research

and development on REST architec-tures. But in July 2009, the companyshifted gears and announced an addi-tional data option: a sort of “SQL Serv-er in the cloud” for developers that didnot want to start from scratch withdata in the cloud.Clearly, for Microsoft and its Azure

cloud, the complexity of moving to anew platform is no simpler than it isfor others. One wonders, what do youhave to learn or unlearn to programfor Azure?“You won’t have to unlearn any-

thing,” said Roger Jennings, an analystat OakLeaf Systems. “The data-orient-ed developer had to wait for SQL dataservices. That is where Microsoft did amidcourse correction. Now they areporting SQL server to the Azure fab-ric,” Jennings said.Up to that point, he said, Microsoft

had a version of SQL Server 2005 thathad no relational features—that usedan entity-attribute style DB. “Develop-ers didn’t like it at all,” Jennings said.“It didn’t have the ability to do joins.They could not leverage their basic

skills. The truth was [Microsoft was]trying to emulate Amazon’s Sim-pleDB.”As Hadoop and other data architec-

tures augur some disruption in con-ventional development circles, one

Chapter 2: Cloud Developer Strategies

8 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud

Page 9: Cloud e Book

can count on vendors to enter withproducts to smooth the bumps.Cloudera Inc., for example, sees itsmission to further commercializeHadoop, adding ease of use for devel-opers.“Our flagship product is a distribu-

tion that is in a convenient package,”said Christophe Bisciglia, Cloudera’sfounder. This package includes, forexample, Amazon machine images.According to Bisciglia, one can think

of Hadoop as “a large-scale batchdata processing system.” The maincomponents include a distributed filesystem and a process or computationengine (i.e., MapReduce).Formerly at Google, Bisciglia discov-

ered the difficulty early on in gettingpeople to think about how to workwith large amounts of data, a real con-cern in the cloud. As a result, he beganteaching a course on the subject atthe University of Washington.“People had no exposure to dealing

with data at a scale of Google orYahoo,” he recounted. “What is chal-lenging is to have people re-frame andrethink existing problems in terms ofMapReduce. It is a new way of think-ing about data.”Various high-level languages, such

as Hive, can impose data structure ondata files, said Bisciglia, “so you cando SQL” while working with Map-

Reduce.“It’s often the first thing people try

and do,” he said. “The real thing tounderstand is that it is a batch data-

base system, not a real-time system.”For his part, while admitting to

some scaling advantages in Hadoop-style computing, analyst Roger Jen-nings chose to emphasize the impor-tance of SQL.“The people who are saying SQL is

dead for the Internet are wrong,” hesaid, pointing to Facebook as anexample of a very large, very modern,cloudlike website that uses a SQLdatabase for its store. n

Jack Vaughan is the editor in chief of SearchSOA.com. Write to him at [email protected] Barry is a news writer for SearchSOA.com.Write to him at [email protected].

Chapter 2: Cloud Developer Strategies

9 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud

“Various high-levellanguages, such asHive, can imposedatastructure ondata files,so you canuse SQLwithMapReduce.

Editors’ note: This chapter on application development for the cloud is the second part of an e-book on cloud comput-ing that also includes chapters on CIO strategies for the cloud, Software as a Service and Infrastructure as a Service.

Page 10: Cloud e Book

q Turn your development and testing environment into a competitive edgewith the IBM Cloud

q Sign up for the IBM developerWorks Newsletter Cloud Edition to stay in theknow

q Join the IBM developerWorks Cloud Computing Group to collaborate oncloud projects

About IBM:IBM developerWorks is the premier web-based technical professional resourceand network for millions of developers, IT professionals, and students worldwide,supporting you in your desire to stay ahead of the latest trends in openstandards, develop skills, solve problems, and collaborate with peers. The CloudComputing zone on IBM developerWorks in your entry to technical cloud contentand resources, a cloud community to share ideas, find experts and collaborate oncloud projects and much more.

From our sponsor

10 CLOUD COMPUTING • SEARCHSOA.COM

Languagesfor Cloud

Computing

DistributedCaching

ScalingHorizontally

ChangingDataArchitectures

Midcloud