SlideShare a Scribd company logo
Eberhard Wolff
adesso AG

Applications in the Cloud
About me
•    Eberhard Wolff
•    Architecture & Technology Manager at adesso
•    adesso is a leading IT consultancy in Germany
•    Speaker
•    Author (e.g. first German Spring book)
•    Blog: http://ewolff.com
•    Twitter: @ewolff
•    http://slideshare.com/ewolff
•    eberhard.wolff@adesso.de
How Is Cloud
 Different?
How Is Cloud Different?
Applications in the Cloud
• 
            How is Cloud Different?
     Can easily and cheaply add new resources
     –  Prefer starting new instances over highly available instances
     –  Prefer adding instances over using a more powerful instance
     –  Might end up with lots of instances

•  Prefer dealing with failure over providing a highly available network

•  So basically lots of non powerful instances with an unreliable
   network

•  How can you end up with a reliable system then?
Enter Spring Biking!
•  The revolutionary web site to
   create customized bikes!
•  We got a few million € Venture
   Capital
•  We need...
   –  Catalog of all Mountain Bike parts
      and bikes
   –  System to configure custom
      Mountain Bikes
   –  Order system
•  Cloud good idea
   –  No CapEx
   –  Rapid elasticity -> easy to grow
•  Focusing on German market
Spring Biking: Architecture
 Application     •  Standard
   (Order,          Enterprise
Configuration,
  Catalog)
                    Architecture

                 •  Relational
                    database
  Database
Spring Biking: Architecture
Wait, didn’t you
  Application
    (Order,
                  •  Standard
                     Enterprise

say it should run
 Configuration,
   Catalog)
                     Architecture

                  •  Relational
in the Cloud?
   Database
                     database
How Spring Biking Deals with
         Cloud Challenges
•  No state on the web tier
   –  i.e. no session
                                              Application
   –  State stored in database
•  Easy to automatically start new              (Order,
   instances if load increases               Configuration,
•  Every PaaS should deal with elastic         Catalog)
   scaling
•  Example: Amazon Elastic Beanstalk
   –  Takes a standard Java WAR
   –  Deploys it
   –  Add elastic scaling
•  Could build something similar yourself
   with an IaaS
   –  Automated deployment
   –  Elastic scaling and load balancing
      available from Amazon IaaS offerings
How Spring Biking Deals with
        Cloud Challenges
•  Relational database fine for now
   –  Example: Amazon RDS (Relational
      Database Service)
   –  MySQL and Oracle                            Database
   –  MySQL: Multi data center replication
   –  Can deal with failure of one data center

•  Add Content Delivery Network (CDN)
   –  Not too many PaaS in Europe or
      Germany
   –  Latency effects revenue
      •  Every 100ms latency costs Amazon 1% of
         revenue
   –  So add CDN to lower latency
Benefits for the Development
                Process
•  Trivial to get a new version out
•  Easy to create a production like
   environment for test or staging
   –  Take snapshot from production database
   –  Set up new database with snapshot
   –  Create a new environment with a different
      release of the software
   –  Automated for production
   –  Production-like sizing acceptable: You pay
      by the hour

•  This can also be done using Private
   Clouds!
•  Can be more important than cost reduction
•  Business Agility is a major driver for
   (private) Cloud!
Next step: Spring Biking Goes
               Global!
•  Global demand for bikes is on all time high!
•  We need to globalize the offering
•  A central RDBMS for the global system is not
   acceptable
   –  Latency
   –  Amazon RDS offers one uniform database for a
      Region (e.g. US-East, EU-West)
   –  Need a different solution for a global system

•  Just an example
•  Traditional Enterprise scales to a certain limit
•  The question is which

•  We are not all going to build Twitter or
   Facebook
CAP Theorem
•  Consistency
   –  All nodes see the same data

•  Availability
   –  Node failure do not prevent survivors from operating
                                                    C
•  Partition Tolerance
   –  System continues to operate despite
      arbitrary message loss
                                             P               A
•  Can at max have two
CAP Theorem
             Consistency


                            RDBMS
    Quorum                  2 Phase
                            Commit




Partition
Tolerance Replication DNS   Availability
CAP Theorem in the Cloud
•  Need A – Availability
  –  A system that is not available is usually the worst
     thing                                         C
  –  Shutting down nodes is no option
•  Need P – Partition Tolerance
  –  Network is not under your control   P                 A
  –  Lots of nodes -> partitioning even more likely
•  No chance for C – Consistency
  –  Because we can’t
BASE
•  Basically Available Soft state
   Eventually consistent
•  I.e. trade consistency for
   availability
•  Eventually consistent
  –  If no updates are sent for a while
     all previous updates will
     eventually propagate through the
     system
  –  Then all replicas are consistent
  –  Can deal with network
     partitioning: Message will be
     transferred later
•  All replicas are always available
•  Pun concerning ACID…
BASE in Spring Biking
    Application         Application   Application




     Database           Database      Database

      EU-West             US-East       Asia-Pacific


Changes to catalog
Eventually propagated
Network Partitioning
    Application           Application   Application




     Database             Database      Database
Eventually
Inconsistent
data is EU-West             US-East       Asia-Pacific
consistent


           Network
           Partitioning
BASE Using Event Sourcing

                                             Event            Domain
•  Do it yourself using a                                      Model
   messaging system
   –    JMS, RabbitMQ …
   –    Easy to duplicate state on nodes
   –    Fail safe: Message will eventually be transferred
   –    …and high latency is acceptable
•  Other reason to use Event Sourcing
   –  Capture all changes to an application state as a sequence of
      events
   –  Originates in Domain Driven Design
   –  Also used as a log of actions (to replay, reverse etc)
•  Might end up with an Event-driven Architecture
   –  Might add Complex Event Processing etc.
Implementing BASE Using NoSQL
•  Some NoSQL databases
   include replication
•  Example: CouchDB
  –  Replication between nodes
  –  Master-master replication
     using versioning
  –  Trivial to set up
  –  All nodes have the same
     data
  –  Sharding only possible with
     additional proxies
More Sophisticated
•  Apache Cassandra

•  Each node is master for certain
   data
•  Data is replicated to N nodes
•  Data is read from R nodes
•  After a write W nodes must acknowledge
•  N,R,W are configurable
Different Parts Require Different
             Architecture    Application
•  So far: Catalog
  –  Data must be available on each node
                                           Catalog
  –  Slight inconsistencies are OK
  –  i.e. new item added to catalog
•  Stock information must be consistent
  –  So customers are not disappointed         Order
  –  Might use caching-like structure
•  Orders are immediately send to the back end
  –  No local storage at all
•  A lot more catalog browsing than ordering
More load on catalog ->          Less load on order ->
                More instances                   Less instances


     Catalog                         Catalog               Order


                                                                No local
               Stock                          Stock             data
Database                     Database                           All send
               Cache                          Cache
                                                                to
                                                                backend


     Updates
                                     Stock
                                     Master
Handling Log Files
•  Business requirements
   –  Need to measure hits on web pages
   –  Need to measure hits for individual products etc.

•  Sounds like a batch
   –  File in, statistics out

•  But: Data is globally distributed
•  Lots of data i.e. cannot be collected at
   a central place
•  Data should stay where it is

•  Some nodes might be offline or not available
•  Prefer incomplete answer over no answer at all
More Than CAP
•  CAP Theorem again
•  Consistency, Availability, Network Partitioning
•  You can only have two                     C


•  But: We want Availability
•  …and a flexible trade off between P               A
   Consistency and Network Partitioning
•  Like Casssandra
Harvest and Yield
•  Yield: Probability of completing a request
•  Harvest: Fraction of data represented in the result

•  Harvest and Yield vs. CAP
•  Yield = 100% -> Availability
•  Harvest = 100% -> Consistency

•  Can be used to think about Cassandra configurations

•  Can also be used to execute some logic on all data
•  …and wait until enough harvest is there to answer a query

•  So: Send out a query to all log files
•  …and collect the results
Map / Reduce
•  Map: Apply a function to all data
  –  Emit (item name, 1) for each log file line
•  Master sorts by item name
•  Reduce: Add all (item name, 1) to the total
   score                     Reduce

•  Map can be done on any node
•  Master collects data Map                   Map
Another Case Study
•  Financials

•  Build a Highly Available, High Throughput System, Low
   Latency System on Standard Hardware!
•  Just like Google and Amazon

•  Driver: Standard infrastructure – cheap and stable
•  Driver: Even more availability, throughput, scalability and
   lower latency

•  You will need to consider CAP, BASE, Harvest & Yield etc.
•  Very likely in a Private Cloud
Another Case Study
•  Random Project

•  Make deployment easier!
•  Make it easy to create test environment!
•  Driver: Business Agility and Developer
   Productivity
•  Will need to use automated installation + IaaS or
   PaaS
•  Might be in a Public or Private Cloud
Custom Self Service Portal
Conclusion
•  Current PaaS allow to run Enterprise applications unchanged
•  At one point you will need to change

•  CAP: Consistency, Availability, Partition Tolerance – choose two
•  Cloud: AP, no C

•  BASE: Basically Available, Soft State, Eventually Consistent
•  Can be implemented using Event Sourcing
•  …or a NoSQL persistence solution

•  Create multiple deployment artifacts to scale each part

•  Harvest / Yield: Fine grained CAP
•  Map / Reduce to run batches in the Cloud
Wir suchen Sie als
!    Software-Architekt (m/w)
!    Projektleiter (m/w)
!    Senior Software Engineer (m/w)


!    Kommen Sie zum Stand und gewinnen Sie ein iPad 2!

 jobs@adesso.de
 www.AAAjobs.de

More Related Content

PPTX
Your Guide to Streaming - The Engineer's Perspective
PPTX
Introduction to Hadoop and Big Data
PPTX
Migration from Redshift to Spark
PDF
Cmg06 utilization is useless
PPTX
Compression talk
PPTX
Next-Gen Decision Making in Under 2ms
PDF
Low latency high throughput streaming using Apache Apex and Apache Kudu
PPTX
Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?
Your Guide to Streaming - The Engineer's Perspective
Introduction to Hadoop and Big Data
Migration from Redshift to Spark
Cmg06 utilization is useless
Compression talk
Next-Gen Decision Making in Under 2ms
Low latency high throughput streaming using Apache Apex and Apache Kudu
Tech Talk Series, Part 3: Why is your CFO right to demand you scale down MySQL?

What's hot (18)

PPTX
Big Data and Hadoop - History, Technical Deep Dive, and Industry Trends
PDF
Transforming Data Architecture Complexity at Sears - StampedeCon 2013
PPTX
Divide and conquer in the cloud
PDF
Using Hot and Cold Data in your SAP Analytics Landscape
PPTX
Bigdata workshop february 2015
PDF
An introduction into Spark ML plus how to go beyond when you get stuck
PPTX
Apache Tez : Accelerating Hadoop Query Processing
PPTX
Deploying Apache Flume to enable low-latency analytics
PPTX
Apache Hadoop YARN: Present and Future
PPTX
Admission Control in Impala
PPTX
Operationalizing YARN based Hadoop Clusters in the Cloud
PPTX
Tune up Yarn and Hive
 
PPTX
Hadoop Backup and Disaster Recovery
PPTX
The Impala Cookbook
PDF
Cloudera Impala
PDF
Impala Resource Management - OUTDATED
PDF
Diagnosing MySQL performance problems
PDF
What no one tells you about writing a streaming app
Big Data and Hadoop - History, Technical Deep Dive, and Industry Trends
Transforming Data Architecture Complexity at Sears - StampedeCon 2013
Divide and conquer in the cloud
Using Hot and Cold Data in your SAP Analytics Landscape
Bigdata workshop february 2015
An introduction into Spark ML plus how to go beyond when you get stuck
Apache Tez : Accelerating Hadoop Query Processing
Deploying Apache Flume to enable low-latency analytics
Apache Hadoop YARN: Present and Future
Admission Control in Impala
Operationalizing YARN based Hadoop Clusters in the Cloud
Tune up Yarn and Hive
 
Hadoop Backup and Disaster Recovery
The Impala Cookbook
Cloudera Impala
Impala Resource Management - OUTDATED
Diagnosing MySQL performance problems
What no one tells you about writing a streaming app
Ad

Viewers also liked (7)

DOCX
Solucion 2
PDF
Google Dart Pecha Kucha from OOP 2012
PPT
C:\Documents And Settings\Administrador\Escritorio\Administrador De Dispositivos
PDF
Future of Java
PDF
Ten Advices for Architects
PDF
Five (easy?) Steps Towards Continuous Delivery
PDF
Java Application Servers Are Dead!
Solucion 2
Google Dart Pecha Kucha from OOP 2012
C:\Documents And Settings\Administrador\Escritorio\Administrador De Dispositivos
Future of Java
Ten Advices for Architects
Five (easy?) Steps Towards Continuous Delivery
Java Application Servers Are Dead!
Ad

Similar to Applications in the Cloud (20)

PDF
FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...
PDF
Storage Systems For Scalable systems
PPTX
Data at Scale - Michael Peacock, Cloud Connect 2012
PPT
NoSQL_Night
PPTX
No sql databases
PPTX
Yes sql08 inmemorydb
PPTX
AWS re:Invent 2013 Recap
PDF
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
PPTX
Migrating enterprise workloads to AWS
PDF
Petabyte scale on commodity infrastructure
PDF
Revolutionary Storage for Modern Databases, Applications and Infrastrcture
PPT
High Performance Computing - Cloud Point of View
PPTX
M6d cassandrapresentation
PDF
Spring in the Cloud
PPTX
Взгляд на облака с точки зрения HPC
PDF
Scylla Summit 2016: Compose on Containing the Database
PPTX
Master.pptx
PDF
Solving k8s persistent workloads using k8s DevOps style
PDF
Five Years of EC2 Distilled
PPTX
Meetup #3: Migrate a fast scale system to AWS
FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...
Storage Systems For Scalable systems
Data at Scale - Michael Peacock, Cloud Connect 2012
NoSQL_Night
No sql databases
Yes sql08 inmemorydb
AWS re:Invent 2013 Recap
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Migrating enterprise workloads to AWS
Petabyte scale on commodity infrastructure
Revolutionary Storage for Modern Databases, Applications and Infrastrcture
High Performance Computing - Cloud Point of View
M6d cassandrapresentation
Spring in the Cloud
Взгляд на облака с точки зрения HPC
Scylla Summit 2016: Compose on Containing the Database
Master.pptx
Solving k8s persistent workloads using k8s DevOps style
Five Years of EC2 Distilled
Meetup #3: Migrate a fast scale system to AWS

More from Eberhard Wolff (20)

PDF
Architectures and Alternatives
PDF
Beyond Microservices
PDF
The Frontiers of Continuous Delivery
PDF
Four Times Microservices - REST, Kubernetes, UI Integration, Async
PDF
Microservices - not just with Java
PDF
Deployment - Done Right!
PDF
Data Architecture not Just for Microservices
PDF
How to Split Your System into Microservices
PDF
Microservices and Self-contained System to Scale Agile
PDF
How Small Can Java Microservices Be?
PDF
Data Architecturen Not Just for Microservices
PDF
Microservices: Redundancy=Maintainability
PDF
Self-contained Systems: A Different Approach to Microservices
PDF
Microservices Technology Stack
PDF
Software Architecture for Innovation
PDF
Nanoservices and Microservices with Java
PDF
Microservices: Architecture to Support Agile
PDF
Microservices: Architecture to scale Agile
PDF
Microservices, DevOps, Continuous Delivery – More Than Three Buzzwords
PDF
Infrastructure for Continuous Delivery & Microservices: PaaS or Docker?
Architectures and Alternatives
Beyond Microservices
The Frontiers of Continuous Delivery
Four Times Microservices - REST, Kubernetes, UI Integration, Async
Microservices - not just with Java
Deployment - Done Right!
Data Architecture not Just for Microservices
How to Split Your System into Microservices
Microservices and Self-contained System to Scale Agile
How Small Can Java Microservices Be?
Data Architecturen Not Just for Microservices
Microservices: Redundancy=Maintainability
Self-contained Systems: A Different Approach to Microservices
Microservices Technology Stack
Software Architecture for Innovation
Nanoservices and Microservices with Java
Microservices: Architecture to Support Agile
Microservices: Architecture to scale Agile
Microservices, DevOps, Continuous Delivery – More Than Three Buzzwords
Infrastructure for Continuous Delivery & Microservices: PaaS or Docker?

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
A Presentation on Artificial Intelligence
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
20250228 LYD VKU AI Blended-Learning.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A Presentation on Artificial Intelligence
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
MIND Revenue Release Quarter 2 2025 Press Release
Group 1 Presentation -Planning and Decision Making .pptx
Big Data Technologies - Introduction.pptx
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
SOPHOS-XG Firewall Administrator PPT.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Empathic Computing: Creating Shared Understanding

Applications in the Cloud

  • 2. About me •  Eberhard Wolff •  Architecture & Technology Manager at adesso •  adesso is a leading IT consultancy in Germany •  Speaker •  Author (e.g. first German Spring book) •  Blog: http://ewolff.com •  Twitter: @ewolff •  http://slideshare.com/ewolff •  eberhard.wolff@adesso.de
  • 3. How Is Cloud Different?
  • 4. How Is Cloud Different?
  • 6. •  How is Cloud Different? Can easily and cheaply add new resources –  Prefer starting new instances over highly available instances –  Prefer adding instances over using a more powerful instance –  Might end up with lots of instances •  Prefer dealing with failure over providing a highly available network •  So basically lots of non powerful instances with an unreliable network •  How can you end up with a reliable system then?
  • 7. Enter Spring Biking! •  The revolutionary web site to create customized bikes! •  We got a few million € Venture Capital •  We need... –  Catalog of all Mountain Bike parts and bikes –  System to configure custom Mountain Bikes –  Order system •  Cloud good idea –  No CapEx –  Rapid elasticity -> easy to grow •  Focusing on German market
  • 8. Spring Biking: Architecture Application •  Standard (Order, Enterprise Configuration, Catalog) Architecture •  Relational database Database
  • 9. Spring Biking: Architecture Wait, didn’t you Application (Order, •  Standard Enterprise say it should run Configuration, Catalog) Architecture •  Relational in the Cloud? Database database
  • 10. How Spring Biking Deals with Cloud Challenges •  No state on the web tier –  i.e. no session Application –  State stored in database •  Easy to automatically start new (Order, instances if load increases Configuration, •  Every PaaS should deal with elastic Catalog) scaling •  Example: Amazon Elastic Beanstalk –  Takes a standard Java WAR –  Deploys it –  Add elastic scaling •  Could build something similar yourself with an IaaS –  Automated deployment –  Elastic scaling and load balancing available from Amazon IaaS offerings
  • 11. How Spring Biking Deals with Cloud Challenges •  Relational database fine for now –  Example: Amazon RDS (Relational Database Service) –  MySQL and Oracle Database –  MySQL: Multi data center replication –  Can deal with failure of one data center •  Add Content Delivery Network (CDN) –  Not too many PaaS in Europe or Germany –  Latency effects revenue •  Every 100ms latency costs Amazon 1% of revenue –  So add CDN to lower latency
  • 12. Benefits for the Development Process •  Trivial to get a new version out •  Easy to create a production like environment for test or staging –  Take snapshot from production database –  Set up new database with snapshot –  Create a new environment with a different release of the software –  Automated for production –  Production-like sizing acceptable: You pay by the hour •  This can also be done using Private Clouds! •  Can be more important than cost reduction •  Business Agility is a major driver for (private) Cloud!
  • 13. Next step: Spring Biking Goes Global! •  Global demand for bikes is on all time high! •  We need to globalize the offering •  A central RDBMS for the global system is not acceptable –  Latency –  Amazon RDS offers one uniform database for a Region (e.g. US-East, EU-West) –  Need a different solution for a global system •  Just an example •  Traditional Enterprise scales to a certain limit •  The question is which •  We are not all going to build Twitter or Facebook
  • 14. CAP Theorem •  Consistency –  All nodes see the same data •  Availability –  Node failure do not prevent survivors from operating C •  Partition Tolerance –  System continues to operate despite arbitrary message loss P A •  Can at max have two
  • 15. CAP Theorem Consistency RDBMS Quorum 2 Phase Commit Partition Tolerance Replication DNS Availability
  • 16. CAP Theorem in the Cloud •  Need A – Availability –  A system that is not available is usually the worst thing C –  Shutting down nodes is no option •  Need P – Partition Tolerance –  Network is not under your control P A –  Lots of nodes -> partitioning even more likely •  No chance for C – Consistency –  Because we can’t
  • 17. BASE •  Basically Available Soft state Eventually consistent •  I.e. trade consistency for availability •  Eventually consistent –  If no updates are sent for a while all previous updates will eventually propagate through the system –  Then all replicas are consistent –  Can deal with network partitioning: Message will be transferred later •  All replicas are always available •  Pun concerning ACID…
  • 18. BASE in Spring Biking Application Application Application Database Database Database EU-West US-East Asia-Pacific Changes to catalog Eventually propagated
  • 19. Network Partitioning Application Application Application Database Database Database Eventually Inconsistent data is EU-West US-East Asia-Pacific consistent Network Partitioning
  • 20. BASE Using Event Sourcing Event Domain •  Do it yourself using a Model messaging system –  JMS, RabbitMQ … –  Easy to duplicate state on nodes –  Fail safe: Message will eventually be transferred –  …and high latency is acceptable •  Other reason to use Event Sourcing –  Capture all changes to an application state as a sequence of events –  Originates in Domain Driven Design –  Also used as a log of actions (to replay, reverse etc) •  Might end up with an Event-driven Architecture –  Might add Complex Event Processing etc.
  • 21. Implementing BASE Using NoSQL •  Some NoSQL databases include replication •  Example: CouchDB –  Replication between nodes –  Master-master replication using versioning –  Trivial to set up –  All nodes have the same data –  Sharding only possible with additional proxies
  • 22. More Sophisticated •  Apache Cassandra •  Each node is master for certain data •  Data is replicated to N nodes •  Data is read from R nodes •  After a write W nodes must acknowledge •  N,R,W are configurable
  • 23. Different Parts Require Different Architecture Application •  So far: Catalog –  Data must be available on each node Catalog –  Slight inconsistencies are OK –  i.e. new item added to catalog •  Stock information must be consistent –  So customers are not disappointed Order –  Might use caching-like structure •  Orders are immediately send to the back end –  No local storage at all •  A lot more catalog browsing than ordering
  • 24. More load on catalog -> Less load on order -> More instances Less instances Catalog Catalog Order No local Stock Stock data Database Database All send Cache Cache to backend Updates Stock Master
  • 25. Handling Log Files •  Business requirements –  Need to measure hits on web pages –  Need to measure hits for individual products etc. •  Sounds like a batch –  File in, statistics out •  But: Data is globally distributed •  Lots of data i.e. cannot be collected at a central place •  Data should stay where it is •  Some nodes might be offline or not available •  Prefer incomplete answer over no answer at all
  • 26. More Than CAP •  CAP Theorem again •  Consistency, Availability, Network Partitioning •  You can only have two C •  But: We want Availability •  …and a flexible trade off between P A Consistency and Network Partitioning •  Like Casssandra
  • 27. Harvest and Yield •  Yield: Probability of completing a request •  Harvest: Fraction of data represented in the result •  Harvest and Yield vs. CAP •  Yield = 100% -> Availability •  Harvest = 100% -> Consistency •  Can be used to think about Cassandra configurations •  Can also be used to execute some logic on all data •  …and wait until enough harvest is there to answer a query •  So: Send out a query to all log files •  …and collect the results
  • 28. Map / Reduce •  Map: Apply a function to all data –  Emit (item name, 1) for each log file line •  Master sorts by item name •  Reduce: Add all (item name, 1) to the total score Reduce •  Map can be done on any node •  Master collects data Map Map
  • 29. Another Case Study •  Financials •  Build a Highly Available, High Throughput System, Low Latency System on Standard Hardware! •  Just like Google and Amazon •  Driver: Standard infrastructure – cheap and stable •  Driver: Even more availability, throughput, scalability and lower latency •  You will need to consider CAP, BASE, Harvest & Yield etc. •  Very likely in a Private Cloud
  • 30. Another Case Study •  Random Project •  Make deployment easier! •  Make it easy to create test environment! •  Driver: Business Agility and Developer Productivity •  Will need to use automated installation + IaaS or PaaS •  Might be in a Public or Private Cloud
  • 32. Conclusion •  Current PaaS allow to run Enterprise applications unchanged •  At one point you will need to change •  CAP: Consistency, Availability, Partition Tolerance – choose two •  Cloud: AP, no C •  BASE: Basically Available, Soft State, Eventually Consistent •  Can be implemented using Event Sourcing •  …or a NoSQL persistence solution •  Create multiple deployment artifacts to scale each part •  Harvest / Yield: Fine grained CAP •  Map / Reduce to run batches in the Cloud
  • 33. Wir suchen Sie als !  Software-Architekt (m/w) !  Projektleiter (m/w) !  Senior Software Engineer (m/w) !  Kommen Sie zum Stand und gewinnen Sie ein iPad 2! jobs@adesso.de www.AAAjobs.de