N Cloud Computing - Appservgrid

Transcription

Get More Refcardz! Visit refcardz.com#82CONTENTS INCLUDE:nnnnnnGetting Started withAbout Cloud ComputingUsage ScenariosUnderlying ConceptsCostData Tier TechnologiesPlatform Management and more.Cloud ComputingBy Daniel Rubioalso minimizes the need to make design changes to supportone time events.ABOUT CLOUD COMPUTINGAutomated growth & scalable technologiesWeb applications have always been deployed on serversconnected to what is now deemed the ‘cloud’.Having the capability to support one time events, cloudcomputing platforms also facilitate the gradual growth curvesfaced by web applications.However, the demands and technology used on such servershas changed substantially in recent years, especially withthe entrance of service providers like Amazon, Google andMicrosoft.Large scale growth scenarios involving specialized equipment(e.g. load balancers and clusters) are all but abstracted away byrelying on a cloud computing platform’s technology.www.dzone.comThese companies have long deployed web applicationsthat adapt and scale to large user bases, making themknowledgeable in many aspects related to cloud computing.In addition, several cloud computing platforms support datatier technologies that exceed the precedent set by RelationalDatabase Systems (RDBMS): Map Reduce, web service APIs,etc. Some platforms support large scale RDBMS deployments.This Refcard will introduce to you to cloud computing, with anemphasis on these providers, so you can better understandwhat it is a cloud computing platform can offer your webapplications.CLOUD COMPUTING PLATFORMS ANDUNDERLYING CONCEPTSUSAGE SCENARIOSAmazon EC2: Industry standard software and virtualizationPay only what you consumeAmazon’s cloud computing platform is heavily based onindustry standard software and virtualization technology.Web application deployment until a few years ago was similarto most phone services: plans with alloted resources, with anincurred cost whether such resources were consumed or not.Virtualization allows a physical piece of hardware to beutilized by multiple operating systems. This allows resources(e.g. bandwidth, memory, CPU) to be allocated exclusively toindividual operating system instances.Getting Started with Cloud ComputingCloud computing as it’s known today has changed this.The various resources consumed by web applications (e.g.bandwidth, memory, CPU) are tallied on a per-unit basis(starting from zero) by all major cloud computing platforms.As a user of Amazon’s EC2 cloud computing platform, youare assigned an operating system in the same way as on allhosting providers that preceded cloud computing platforms.This can be beneficial for web applications that havedisproportionate resource requirements (e.g. bandwidthintensive vs. memory intensive), since only consumed resourcesincur in cost.Get over 70 DZone RefcardzFREE from Refcardz.com!One time event provisioningWeb applications are often subject to traffic spikes due to onetime events (e.g. National broadcast exposure, SuperBowlcommercial). Not only can this type of provisioning beexpensive, but often times difficult to achieve.By using a cloud computing platform, provisioning of this sortcan be greatly simplified.Cloud computing platforms allow web applications “on tap”access to resources without an application owner (i.e. you)footing the bill for stand-by equipment.Additionally, since the underlying architecture of a webapplication is built around a cloud computing platform, thisDZone, Inc. www.dzone.com

2Getting Started with Cloud ComputingThe primary difference is that such an instance is highlycustomizable, in addition to having its resources tallied on aper unit basis, as well as being equipped to scale to largerloads on a case by case basis. Application development tightly integrated withMicrosoft’s Visual Studio, in addition to having itsown Software Development Kit (SDK)Key characteristics of Amazon EC2 Choice of industry standard server operating system(e.g. Windows, Linux, Solaris) Free usage under CTP (Community Technology Preview),but limited to 2000 hours, 50 GB of persistent storage and20GB/day bandwidth.http://go.microsoft.com/fwlink/?LinkID 128752Selection Grid by Web Application Language Deployment building block consists of an AmazonMachine Image(AMI). An AMI is a standard serveroperating system image with pre-selected applications.AMI’s can be found at: http://developer.amazonwebservices.com/Web yID 171 Application development open to any server-sidedevelopment tool, compatible with industry standardserver operating system.Google App Engine: Google infrastrcture & SDKAmazon EC2Google App EnginePHP .NET Java Python Ruby Microsoft Azure Resources (Bandwidth, CPU, I/O)Google’s cloud computing platform is heavily based onGoogle’s own server infrastructure.Cloud computing providers keep track of consumed resourceson a more granular basis than traditional service providers. Thefollowing list illustrates a series of consumption units:As a user of Google’s App Engine, your web applications arebuilt on the same principles as Google applications. Server – Per Hour Bandwidth – Per GigabyteKey Characteristics of Google App Engine Built on Google infrastructure (i.e. No commerciallyavailable server operating system). Storage – Per Gigabyte CPU/Memory – Per unit Emails – Per recipient Choice of either Python or Java run-time for running webapplications. Other pre-selected applications are availablevia services (e.g. Mail, Memcache).This approach gives an application owner (i.e. you) greaterleverage and cost effectiveness. The next section on ‘Costs’illustrates case scenarios with side by side comparisons for thevarious cloud computing platforms. Application development tightly pegged to Google’sSoftware Development Kit (SDK). ownload the Google App Engine SDK)Other cloud computing providersIn addition to Amazon’s EC2 , Google’s App Engine andMicrosoft’s Azure cloud computing platforms, other providersin this space have also emerged. Tightly integrated with Google’s web services APIs (e.g.For authenticating users and sending email). Free quotas for applications limited to: 500MB ofpersistent storage and CPU & bandwidth forapproximately 5 million page views a month.Some of these providers include: Slice Host - http://www.slicehost.com/ Linode - http://www.linode.com/ Prgmr - http://prgmr.com/ Heroku - http://heroku.com/ Rackspace - http://www.rackspacecloud.com/ GoGrid - http://www.gogrid.com/Microsoft Azure: Azure & Visual StudioMicrosoft’s cloud computing platform is tightly integrated withMicrosoft’s product line.As a user of Microsoft Azure’s cloud computing platform,you can expect your web applications to have streamlinedintegration with Microsoft’s product line.Many of these providers rely on industry standard virtualizationand operating system technology, making them closecompetitors to Amazon’s EC2 cloud computing platform.Key Characteristics of Microsoft Azure Operates on Microsoft’s virtualized 64-bit WindowsServer 2008 operating system.Comparing these other providers to Google’s App Engineor Microsoft’s Azure cloud computing platforms can be moredifficult. This in light of the greater proprietary nature of bothGoogle’s and Microsoft’s platforms. Support for .NET applications, as well as other third partyapplications available for the same OS running on astandard server (i.e. unmanaged code apps).Still, with the brand recognition and breadth of companies likeAmazon, Google and Microsoft, these other cloud computingproviders can often fall short of being deemed ‘platforms’. Support for .NET services: .NET Access Control Service &.NET Service Bus. Originally known as BizTalk services,focused on enterprise application scenarios.DZone, Inc.This can be due to a lack of end-to-end integration (e.g.application development, tools and application deployment), www.dzone.com

3lack of scalable data tier technology options, to service levelagreements (e.g. uptime and indemnity) that can only beoffered by large corporations the size of Amazon, Google andMicrosoft.Getting Started with Cloud ComputingAssuming the data for a mailing list or report batch is alreadystored on a cloud computing platform: A conservative estimateof 1 day (24 hours) for processing and 5GB of outgoingbandwidth, would equal approximately 3.00 in cost from eachof the previous cloud computing providers.Nevertheless, some of these other cloud computing providershave carved out niche markets in the cloud computing market.Some do so by adopting more aggressive pricing structures,catering to the specific needs of certain communities(e.g. Ruby/Rails, or Linux), or providing better customer servicethan their larger rivals.As you can surely attest, at this price point it’s only such cloudcomputing providers that are able to offer dedicated resourcesat such competitive rates, especially compared to leasing yourown hardware or using one of the many commercial hostingproviders.Spot pricing on Amazon EC2COSTSProviding what can potentially be the most competitive ratesamong cloud computing platforms, Amazon EC2 offers what itcalls ‘spot instances’.Cloud computing platform costs are fairly competitive.However, some metrics used by providers are sufficientlydifferent from others to make holistic cost comparisonsdifficult.A spot instance allows you to make a bid for unused AmazonEC2 capacity and run applications for as long as your bidexceeds the current spot price.For example, stored data can have added costs related to thenumber of Input/Output operations or transactions. Otheraspects, like CPU consumption, can also vary in the formthey are tallied by provider. The following table illustratescomparable resources and their associated costs in each cloudcomputing platform.ResourcesAmazon EC2 (Smallinstance)Google App EngineMicrosoft AzureOutgoing bandwidth(Gigabyte) 0.10 (Over 150 TB) 0.17(First 10 TB) 0.12 0.15Incomingbandwidth (Gigabyte) 0.10 0.10 0.10CPU time (hours) 0.085 (Unix/Linux) 0.12(Windows) 0.10 0.12Stored data(Gigabytes permonth) 0.10( 0.10 per 1 million I/Orequests 0.15 0.15( 0.01 for 10Ktransactions)Recipients emailed(Recipients)N/A 0.0001N/AFor web application tasks that are not time sensitive (e.g.long-running scientific calculations or historical reports) thisapproach can substantially reduce a web application’s runningcosts.Since spot prices change based on supply and demand, thisallows you to obtain the most competitive rates at any giventime, without exceeding your maximum bid.Cost CalculatorsFor an accurate cost estimate pertaining to each cloudcomputing platform, I recommend you use the followingcalculators offered by each provider:Figure - Amazon EC2 spot pricing behaviorMoreinformation on Amazon EC2 Spot instances can be foundat: http://aws.amazon.com/ec2/spot-instances/ Amazon EC2 http://calculator.s3.amazonaws.com/calc5.htmlCLOUD COMPUTING PLATFORMS & DATA TIERTECHNOLOGIES Google App Engine (ONLY budgeting resources – No calculator)Scaling a web application’s data tier entails a differentapproach than scaling its business logic and web tier. This isdue to limitations and features pertaining to specific data tiertechnologies. Microsoft Azure http://www.microsoft.com/windowsazure/tco/Cost case scenarios: Mailing list or report processingTo give added cost context to the use of cloud computingplatforms in web applications, let’s take the case of commonone-time events in web applications.Most web applications are underpinned by Relational DatabaseManagement Systems (RDBMS) that use Structured QueryLanguage (SQL) as their access mechanism.Mailing list or end of month report processing can consumesubstantial resources from a web application’s mainenvironment, in addition to being short-lived tasks.Though a series of cloud computing platforms now offerRDBMS/SQL data tier support, many cloud computingplatforms grew to address data tier demands for whichRDBMS/SQL technology had limiting factors. Namely thosepertaining to data mining and the complexities involvedin providing fault-tolerant & high-availability RDBMS/SQLsolutions.Instead of leasing a stand-alone server for such tasks orhampering the performance level of a web application’smain environment, a cloud computing platform can be a costeffective solution.DZone, Inc. www.dzone.com

4HotTipGetting Started with Cloud ComputingAmazon Relational Database ServiceProvides data tier capabilities for deploying RDBMS/SQL webapplications.NoSQL movementThe industry has blossomed healthy debates overthe suitability of RDBMS/SQL vs. alternate datatier technologies for developing large scale webapplications. Now often cataloged as the NoSQLmovement http://en.wikipedia.org/wiki/nosqlAmazon Relational Database Service has the followingcharacteristics: Out-of-the-box RDBMS/SQL capabilities built on MySQL. Scale and compute capacity managed through AmazonAPIs.Amazon EC2 Data TierAmazon’s cloud computing platform offers the largest array ofdata tier technologies. Automated backup and patch management.Google App Engine Data TierAmazon SimpleDBSimpleDB technology has the following characteristics:Google’s cloud computing platform is built entirely on Google’sdata tier technology stack. Storage and retrieval based on Amazon API; available viaweb service.Google’s App Engine data tier has the following characteristics: Low administrative overhead compared to RDBMS (e.g.No index maintenance and performance tuning required) Storage and retrieval based on either Java – available viaJava Data Objects (JDO), Java Persistence API (JPA) orlow-level datastore API – as well as Python – available viaa data modeling API and a SQL-like query language calledGQL. Schema-less; requiring no up-front data modeling tasks. Provides the building block for querying Amazon S3 data.Amazon Simple Storage Service (S3)Whereas Amazon SimpleDB provides the foundations forquerying data in Amazon’s EC2 cloud computing platform,Amazon’s Simple Storage Service (S3) is used for the actualstorage of data. Schema-less; requiring no up-front data modeling tasks. Built on Google infrastructure (i.e. BigTable, Google FileSystem).Simple Storage Service (S3) has the following characteristics: Storage of objects between 1 byte and 5 gigabytes. REST and SOAP interfaces, as well as authenticationmechanisms. Objects are assigned a unique ID, with meta-dataassignment done in Amazon SimpleDB for queryingpurposes. Built on Amazon infrastructure.Amazon Simple Queue ServiceProvides data tier capabilities similar to those of messageorientated middleware ( eware ) for web applications.Figure - Google App Engine Data Tier AdvantagesMicrosoft Azure Data TierMicrosoft’s cloud computing platform offers similar data tiersolutions to the previous cloud computing platforms, based onMicrosoft technology.Amazon Simple Queue Service has the followingcharacteristics: Messages can contain up to 8 KB of text in any format.Windows Azure Storage Service Storage and retrieval based on .NET API: ADO.NET orLINQ, as well as web services (e.g. REST). Messages can be sent and read simultaneously. Access is supported through standard SOAP web services.Amazon Elastic MapReduceProvides data tier capabilities based on Google’s MapReduceframework (http://en.wikipedia.org/wiki/MapReduce) built on Amazon’sEC2 cloud computing platform. Schema-less; requiring no up-front data modeling tasks. Built on Microsoft infrastructure, including storagereplication.Windows SQL Azure Out-of-the-box RDBMS/SQL capabilities built onMicrosoft SQL Server.Amazon Elastic MapReduce has the following characteristics: Out-of-the-box MapReduce capabilities built on Apache’sMapReduce implementation Hadoop. Depends on Amazon Simple Storage Service (S3). Minimal operational management(e.g. Disk usage, log files) Support for third party MapReduce tools(e.g. Karmasphere) Synchronization availability between various RDBMSinstances (a.k.a ‘Huron Data Sync’)DZone, Inc. www.dzone.com

5Getting Started with Cloud Computing Google App Engine Administrative console: Basic webconsole for managing Google App Engine.CLOUD COMPUTING PLATFORM MANAGEMENThttps://appengine.google.com/For all the benefits of cloud computing platforms, the term‘cloud’ often comes with the connotation of loosing controlover one’s web applications and being at the mercy of a serviceprovider. Google App Engine API: Google’s App Enginedevelopment kit (SDK) includes an API to communicateremotely with Google App Engine servers.Python - /Java - http://code.google.com/appengine/docs/java/tools/ )While it’s true that some cloud computing platforms havecertain proprietary elements that can lock-in your applicationsto their service offerings, cloud computing management andsecurity concerns are often unfounded.Microsoft AzureMicrosoft’s Azure computing platform can be managedthrough the following means:Cloud computing platform management Microsoft Azure Administrative console: Basic webconsole for managing Windows Azure instances.Management of cloud computing platforms – which is to sayprovisioning or modifying (e.g. starting, stopping or deleting)an underlying environment – is achieved by either a provider’sadministrative web console, through APIs or other third oning/Default.aspx Windows Azure API: Windows Azure development kit(SDK) includes an API to communicate remotely withWindows Azure servers.Administrative web consoles provide practical access tostandard cloud computing tasks. APIs on the other handallow the execution of more sophisticated cloud managementchores, such as the integration of tasks into customapplications or automation of tasks altogether. Third partytools can range from browser plug-ins to open source dd179367.aspx Windows Azure Management Tool: Provides a desktop(i.e. fat-client) to communicate remotely with WindowsAzure servers. D COMPUTING PLATFORM SECURITYAmazon EC2 managementAmazon’s cloud computing platform can be managed throughthe following means:Generally speaking, security for web applications runningon cloud computing platforms is no different than securitypertaining to any web application accesible to the public atlarge. Amazon EC2 Administrative console: Basic web consolefor managing EC2 instances, Elastic Block Store volumesand modifying configuration settings (e.g. I.P addresses).http://aws.amazon.com/console/Issues such as code injection ( http://en.wikipedia.org/wiki/Code injection )or cross-site scripting ( http://en.wikipedia.org/wiki/Cross site scripting ) canjust as easily present themselves in web applications running oncloud computing platforms, given they are issues entirely underthe control of an application’s designer. Amazon CloudWatch: Advanced web console – billedseparately – for determining resource utilization,operational performance, and demand metrics (e.g. CPUutilization, disk reads and writes, and network traffic).http://aws.amazon.com/cloudwatch/As a user of a cloud computing platform, your securityconcerns should span to contemplate the securityvulnerabilities and security limitations inherent to a provider’sservices, in addition to those of web applications in general. Amazon EC2 API: Web services API for inspecting andmodifying EC2 instances from vices.com/AWSEC2/latest/APIReference/The following sections enumerate key security characteristicsto take into account when choosing a cloud computingplatform. Libcloud API: Python API for inspecting and modifyingEC2 instances from remote/custom Amazon EC2 security characteristics Full access to host operating system instance.Vulnerability and ‘hardening’ policies are the responsibilityof a user, as with any other public operating system. Elasticfox & S3Fox browser plug-ins: Firefox plug-ins formanaging EC2 instances & EC3 data.Elasticfox - ry.jspa?externalID 609 Amazon Security groups to facilitate and limit access toinstances by port, protocol and or incoming IP.S3Fox - ry.jspa?externalID 771 Optional multi-factor authentication, to limit accessthrough a six-digit, single-use code from an authenticationdevice in your physical possession ( http://aws.amazon.com/mfa/ ) Lifeguard: provides an automatic, Spring based monitoringsolution to dynamically scale EC2 resources based on tGoogle App Engine security characteristics Access to underlying host provided entirely through aGoogle account. Limiting a user’s security accountability(e.g. no operating system to ‘harden’)Google App EngineGoogle’s App Engine computing platform can be managedthrough the following means:DZone, Inc. www.dzone.com

6 No custom domain SSL certificate support (i.e. https:// access).SSL is supported, but only routed via a domain in the formGetting Started with Cloud Computing Role based access mechanisms. Supported are Web rolesas defined by ASP.NET – and Worker roles for generalpurpose tasks.https://your-app-id.appspot.com Google Secure Data Connector (SDC) support. Allowsdata encryption between applications running on GoogleAppCLOUD COMPUTING TEAM BLOGSIn order to keep abreast on the latest offerings made bycloud computing providers, I recommend you consult eachplatform’s team blog. Engine and a corporate network.Microsoft Azure security characteristics Access to underlying host provided entirely throughWindows Live ID account, limiting a user’s securityaccountability. Windows host operating system instance with limitedsecurity accountability. Updates are performedautomatically.Google App Engine team blog:http://googleappengine.blogspot.com/Amazon EC2 team blog:http://aws.typepad.com/Microsoft Azure team blog:http://blogsmsdn.com/windowazure/ABOUT THE AUTHORRECOMMENDED BOOKThis book is an industry-leading primeron cloud computing: its background, thepurpose it serves, how the cloud can bebest utilized, which platforms offer whichfeatures, and how to get started.Daniel Rubio is an independent technologyconsultant with over 10 years of experience inenterprise and web based systems.He is the author of several books focused onenterprise Java, in addition to participating astechnical writer and editor for several online technical publishers.He maintains a blog covering software platforms and emergingtechnologies at http://www.webforefront.com/BUY ional Cheat Sheets You Can Trustby.rnsettn PagisDe“Exactly what busy developers need:simple, short, and to the point.”ldonaMcDsonaJByz.com#8iredInsp eby thGoF llerseBestE:LUDIN CilityTSENnsibNTspoCOf ReoindChamanCom reterrpIntetor.oreItera tordmdiad anMe rverthoseMeSObRNplateTTETemChaMoefre RcnGetcontinuedsn’tr doendlee had thst anquerele ahaveJames Ward, Adobe Systemstorndlee haith thst wuereqome.inthee torencrefe listed inicksActa qus, asNPjernebeIGvids,patt able OproDESram .ignusardUTdesdiaglef RerefcroF)ABOmpts olassokeernsexaInvur (G lemenes cdoPattdhrlFnfoigsucs: Einclugoal wnrnDesrncDaereeisje tsttGgANThpatt , and at ob mentinl 23 sign PaMcahucMintrendEationpleCOorigmaonskDre.rmaomto c their imboo SoftwantteCinfoedcreCliethedage: Us d fromndCon()ente on, usmar nsctcuteOriCom )tiupleattesbje( exeloweolanaal P e decois alpnrgcutechxolae. Ths suati exets.rman bbject nshipccfoCrejeyan otioetoobd as ed relams,t thedeateasriththaarate: Usbe tr ject bts.m.r nsdispalgocrit to lly obeteyeejegsnttgivbasywinonaPaanaallo traditis.Receen oralen mderuestto m betwectutwent orreq ndled inn.sasedsvariaStrus be.latecatioe hacans: Uor inilitiepsuinvoto b llbackscturethatthetimesEnca questnsibcatterny.struipslingreandriantnalitl Pa d respoingthenshhandraposeuingnctio led at vaocturcess befuuetiionjePlaobproavndack,aas qtoethet ree ha eded.bcallbnous nalitycBeh nshipsbmednrojeedtofroay neneedobis ne upledynchnctiotioat cYouut an iss ne questse as the fucorelawiths thitithoueste tharrebe delitat pattern ssing w tation articulReqy ofealsshipfaciouldpdenstorceUsetione: De.A hi voker shned to mman for pro implem ents its ting.relacop runtimcoy Proatd imjecue isare utilizing a job q of theCueue e queObueswithygedenqdgethques. Ben tohaneals me.croxyJob orithm be giv knowle that is terfaceDPe:gctbntieinSrleof al ed ca to have d obje of theermpcoppileratoutanExaservnesss S at comexec e queue commDecoObconfiSClaethBdthen. Thfordengekingletoithininvo hm wFacachaSingodtoryRefcardz.comnnn.comnzw. doneDZone communities deliver over 6 million pages each month ore than 3.3 million software developers, architects and decisionwwSBSeridgBuildCerSBBBBrVisitormakers. DZone offers something for everyone, including news,Bfin otyCha tBehralavioYtutorials, cheatsheets, blogs,featurearticles, source code and more.ILITNSIBSESFRPOsuccessorOAIN“DZone is a developer’sdream,” says PC Magazine.CH aceterf r in andleHst ( )queleredn haUpcoming TitlesMost PopularBlaze DSDomain Driven DesignVirtualizationJava Performance TuningExpression WebSpring Web FlowBPELSpring ConfigurationjQuery SelectorsWindows PowershellDependency Injection with EJB 3Netbeans IDE JavaEditorGetting Started with EclipseVery First Steps in FlexDZone, Inc.140 Preston Executive Dr.Suite 100Cary, NC 27513ISBN-13: 978-1-934238-82-0ISBN-10: 1-934238-82-150795888.678.0399919.678.0300Refcardz Feedback Welcomerefcardz@dzone.comSponsorship Opportunitiessales@dzone.com9 781934 238820sCopyright 2010 DZone, Inc. All rights reserved.No part of this publicationmay be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical,r2ntdleClieHanete publisher.photocopying, or otherwise, without prior written permission Cofthest ( )oncrqueerna rdit! V isarzre f cnnity,Download Nownnibilndtcle al ouay haanhandsmentiahenjectle to.pot.Wblele obtern ethodbject ld be abptapatultip ecific on Maccethis if the m up theshouspctse.entsis ansee passedbe aobje runtim ndledplem ks tode toeimt ofcoatbUsehaecsetilldchgestn Aninedbeingshou peats un parenimenguaermWhenote la the runt or if itdetores reuestsomdtion proces e no mreqg in methocepn Aee arandline ex ack ththern ha rown in ndle thll stuntilptiothe caExce ion is sm to ha up th tered orralptniedunlecessaviocoexmpecha n paBeh.is enamExahetion uest tohas ack. WjectqcepstObe ree excallle thnd thhand s to hactobjenneof RnsspoConcreteH1lerand()uest handlerele ahanduestreqkiby linng wwzw.done.c om 7.95t toughBroVersion 1.0

on a more granular basis than traditional service providers. The following list illustrates a series of consumption units: Server - Per Hour Bandwidth - Per Gigabyte Storage - Per Gigabyte CPU/Memory - Per unit Emails - Per recipient This approach gives an application owner (i.e. you) greater leverage and cost .