• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Design Patterns for The Cloud (010dev Rotterdam)
 

Design Patterns for The Cloud (010dev Rotterdam)

on

  • 1,273 views

Even Platform as a Service promise to host your application without a change, things are not so simple and you can't send your old EJB 1.0 application to the Cloud without some refactoring. During ...

Even Platform as a Service promise to host your application without a change, things are not so simple and you can't send your old EJB 1.0 application to the Cloud without some refactoring. During this session, I'll explain some architecture patterns to apply to your new developments so that your transition to the cloud is as smooth as possible.

Statistics

Views

Total Views
1,273
Views on SlideShare
1,213
Embed Views
60

Actions

Likes
4
Downloads
0
Comments
0

2 Embeds 60

https://twitter.com 55
https://foresttechnologies.atlassian.net 5

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Design Patterns for The Cloud (010dev Rotterdam) Design Patterns for The Cloud (010dev Rotterdam) Presentation Transcript

    • ©2013 CloudBees, Inc. All Rights ReservedDesign Patterns for the CloudRethinking application design for the CloudCyrille Le Clerc010DEV.nlMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedSpeaker2Cyrille Le Clerc@cyrilleleclercOpen SourceCTODevOps, Infra as CodeSolution ArchitectCloudMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedThis talk is3Greatly inspired by Nicolas de Loof’s presentationThanks Nicolas!Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedIaaS, PaaS & SaaS4Infrastructureas a ServicePlatformas a ServiceSoftwareas a ServiceLinux + storage+ networkApp runtime+ middlewareManaged“Traditional” adminBusiness AppManagedMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedMoving to the cloud5Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedCloud On Premises6CloudOn PremisesEasyMaybe difficultfor legacy appsMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedCloud On Premises6CloudOn PremisesEasyMaybe difficultfor legacy appsrefactorMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedGreen Field Applications7• Can select modern solutionsMost (not all) frameworks are well designed for Cloud• Started on cloud,discover and adapt to constraintsMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights Reserved“Legacy” Applications8• Not so modern solutionsold frameworks and patterns may not fit with cloud constraints• Started on premises, single serverhit cloud constraintsMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedScale Out9Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedScale Up10M1 Small M1 Large M3 2 XLarge•Still possible, but up to a limit•Not optimalMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedScale Up10M1 Small M1 Large M3 2 XLarge•Still possible, but up to a limit•Not optimalLow utilization!Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedScale Up10M1 Small M1 Large M3 2 XLarge•Still possible, but up to a limit•Not optimalThen ???Low utilization!Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedM1 Extra Large• 64 bits• 15 Gb memory• 4 Vcore, 2 cpu unit (~2.5Gh)• 1.6 Tb HD• aka « your desktop »11Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedScale out12Design for clusteringScale as you needPay as you useMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedMulti tenancy - PaaS backstage13• Multi tenancy at the app level, not at the OS level• Slice big servers into slicestomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xtomcatapp-xMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedMulti Tenancy• OS level (hypervisor): IaaS• OS virtualization (cgroups, LXC): PaaS• Middleware ?Java 9 to be multi-tenant ?• Application: SaaS14Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedBe stateless ... if you can15Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedAn Ideal Stateless RestFul World16Linear horizontal scalingBut …• Application / User « conversation » has a state• Stateless apps often store state in a database!Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedStateAre you really stateless ?Beware of your framework!17GrailsSpring SecuritySecurity PluginsHttp SessionMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedReally stateless ?• Client side state with browser cookies→higher network traffic, security• Use http session (servlet frameworks)→memcache session replication→sticky session• Use a central service (DB)→ SPoF, DB scalability18Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedFear the File System19Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedCloud uses Schrödinger FS20Looks like it’s alive, but it’s not anymoreMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedIaaS / PaaS == Pool of Servers21Your host at his timeYour host after a redeploymentMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedDon’t trust the local FS22• File System is ephemeral and NOT distributed ... at least onAmazon• Use a storage engine à la Amazon S3... and see the local FS as a cacheMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedSingletons aren’t23Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedSingletons aren’t24• Most app servers are NOT clusterized with reliable singletons• Use Cron as a Service like iron.io... or trust Quartz with a JDBC storeCloud ServiceArchitectureMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedLatency matters!25Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedLatency Matters26tomcatapp-x120ms• Inter Continental is common• EU to us-east-1 latency: 120msMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedMeasure• Chrome Dev Tools• Google Pagespeed• YSlow27Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedImprove• HTTP Headers: Expires & Cache Control• Use CDNs (Content Delivery Network)28Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedCloud Services OrientedArchitecture29Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights Reserved*aaS Ecosystem30• *aaS is about service, not software• Integrate services, don’t try to setup your own infrastructure• Amazon AWS, the place to be for *aaSMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights Reserved*aaS Ecosystem31Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedPrivate Cloud ? Non sense ?32• Size matters!• Ecosystem matters!• You already delegate hosting!• Security: humans vs. firewalls• Cloud is secureMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedDesign for Failure33Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedIt may Will fail!34http://status.cloudbees.comhttp://status.aws.amazon.com/Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedDesign for Failure35• Don’t fail if a resource is KO• Be asynchronous and fault tolerant• Use messaging• NoSQL is your friendSNS SQSMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedDeployment patterns36Deployment isa non-eventMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights Reserved•Git push•Build•Test•Ready for production•Production•Git push•Build•Test•Deploy•ProductionContinuous Delivery37•Git push•Build•TestIntegration Deployment DeliveryMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedBlue Green Deployment38• Martin Fowler: http://martinfowler.com/bliki/BlueGreenDeployment.html• Zero Downtime• Cloud Elasticity → 2x number ofservers during deployment• NoSQL is your friendMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedFeature Toggle Pattern• Continuous merging in the “trunk”• Deploy not yet ready code• Enable / disable features with a switch,no redeployment, often no restart39JMXpersistenttransientAntiFraudServiceV1ImplAntiFraudServiceV2ImplAntiFraudServiceDispatchingImplAntiFraudService<<Interface>>Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedA/B Testing• Test different UI / Features• Measure the impacy40Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedCanary Testing• Test new versions on a limitedpanel of users41Monday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights ReservedThank You!42Event sponsorMonday, June 24, 13
    • ©2013 CloudBees, Inc. All Rights Reserved43Questions ?Monday, June 24, 13