Elastic SOA on the Cloud  Steve Millidge (C2B2)
About Me• Founder of C2B2  – Red Hat Partner  – Deep Expertise in Middleware  – Non-functional Experts• 20 Years Middlewar...
Agenda•   SOA Reprise•   Cloud Reprise•   Why SOA on the Cloud?•   JON Overview•   Deploying ESB for Elasticity•   Service...
SOA Reprise
Typical SOA Architecture    jBPM                              BAM           JBoss Enterprise Service BusSystem 1      Syst...
Typical ESB Service                     Components Inbound Listener                     • Inbound Listener                ...
Service Definition<?xml version = "1.0" encoding = "UTF-8"?><jbossesb   xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb...
Cloud Reprise
Infrastructure As A Service       Load Balancer  Server   Server    Database  Virtual  Image   Store
Amazon EC2EC2 Core Features       Peripheral Services• AMI                   • Cloud Front• Instance              • Cloud ...
Starting an Instance              From JavaString imageID = “ami-xxxxxx”;String minInstances = 3;String maxInstances = 3;R...
Amazon Instance TypesInstance Type    Memory (GB)   CPU (ECU)       Cost per HourStandard Small   1.7           1         ...
Why SOA on the Cloud?
Cloud Integration      Cloud     JBoss      JBoss                    JBoss ESBSAAS          SAAS          Data CentreSales...
Cloud Bursting                      Data CentreCloud      Service      Service           Instance     InstanceService     ...
Challenges to Elasticity• Networking  – IP Addresses, Firewalls• Service Discovery  – New Capacity needs to be utilised• C...
How to Do Elasticity                     Users• Know Your  Scalability• Know What Limits  Scalability• Measure the  Limiti...
JBoss Operations Network        (RHQ)
What is RHQ    The RHQ project is a systems management     suite that provides extensible and integrated      systems mana...
RHQ Architecture         RHQ        Server        RHQ      JBossRHQ                   Agent    ServerAgent         DB     ...
RHQ Agent• Installed on each                                     RHQ Agent  machine                              Plugin   ...
RHQ Server                                         Web         Web• Stores Data Received      Portal                      ...
RHQ and JBoss ESB• Key Service Metrics  – Message Count (Success)  – Message Count (Failed)  – Processed Bytes• Key Action...
Key JBoss Metrics• Key JBoss Metrics  – JVM Free Heap  – GC Time  – Servlet Response Time/ Response Rates  – Connection Po...
Alerting in RHQ• Alerts can be set on any metric• Alerts can be set on Availability• Alerts are sent by the Server from fi...
Alerting and ElasticityCloud                            JBoss                                  ESB JBoss  ESB             ...
Deploying ESB For Elasticity
Invoking a ServiceService InvocationServiceInvoker invoker = new ServiceInvoker(“Retail”, “ShoeStore”);Message message = M...
JBoss ESB Registry Service• The registry plays a central role within JBoss  ESB for the deployed services  – The purpose o...
JBoss ESB UDDI Browser
Service RegistrationJBoss ESB        Action Pipeline EPR                       jms://queue:@host1        Action Pipeline E...
Service Discovery                                       JBoss ESB                  Send JMS                    Action Pipe...
UDDI on Amazon                      ESB                      Client                               SOAP    Cloud           ...
JMS and Services• JBoss ESB is JMS Based• Remote Services have JMS Endpoints  – For ESB Aware• Service Invoker retrieves J...
ESB JMS OptionsClustered JMS                       Local JMS Server 1           Server 2        Server 1     Server 2  JBo...
Local JMS Advantages• Load Balancing Performed by Service  Invoker• Performance Improved• Each Node Stand Alone• No HA Dat...
Elastic SOA ArchitectureServer 1       Server 2               Server 3             Server 4 JBoss ESB      JBoss ESB      ...
Service Deployment Options
Service 2                     Server 4                                Service 1Service Deployment   Homogenous            ...
Homogenous DeploymentAdvantages                   Disadvantages• Easy Management            • Doesn’t take into account• E...
Memory 3Heterogeneous Deployment                                      High Memory Service                           High  ...
Heterogeneous DeploymentAdvantages                   Disadvantages• Each Service can be        • More Complex  independent...
Summary• JBoss ESB’s Architecture Enables  Elasticity using IAAS• JON Alerting can be used to Elastically  Scale services•...
JUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge
JUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge
Upcoming SlideShare
Loading in …5
×

JUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge

1,207 views

Published on

Published in: Technology, Design
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
1,207
On SlideShare
0
From Embeds
0
Number of Embeds
80
Actions
Shares
0
Downloads
17
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide
  • ESBs are integration technologyTypically coupled with BPM for process control and service orchestrationESB provides servicesServices next slide integrate systems from the front end to back endProvide technical integration
  • Action Pipeline may call multiple back end services and aggregate data before calling backend systemAll integration technology Action pipeline may invoke other servicesActions are POJOs
  • Define Machine ImagesStore them in a central repository and instantiate on DemandTalk about Amazon EC2 in this talk As I know it really well but also corresponds to Typical in-house clouds and public IAAS clouds
  • Some capabilities and Terminology
  • AWS Credentials are accessID and Secret KeyKey thing is how easy it is to do from a Java API
  • Key thing is there are many different types for different utilisation patterns.Important for later
  • JBoss Web Application running in the cloudJboss ESB to Integration On Premise Data Centre applications and dataAlso integrates SAAS providers like Sales Force, Zen Desk or other cloud environments
  • Enabled by things like VPCEnables rapid increase in services in response to demand and capacity limitationsCloud BurstingWHYPerformance problemsUsage Spikes planned and unplanned
  • You must consider Elasticity when designing your applicationNo singleton servicesAbility to self register into the infrastructureAbility to discover other parts of the infrastructure
  • This is the definition of RHQ from the http://www.rhq-project.org
  • Agent Based ArchitectureAgents gather metrics locally and store and forward to the server
  • When a server starts up it registers all the EPRs for all the services installed on the server
  • Client uses UDDI to lookup end pointsOnly way to discover servicesLoad Balancing servicesLoad balancing is configurable in API but can be Round Robin or cleverer like prefer local DC etc.
  • UDDI RDS – Multi AV RDS instance
  • JMS is core to ESBEffectively ESB aware clients use JMS over and above anything else
  • Cluster Jboss Messaging requires central DBBest not to cluster if you have instances starting and stopping as Server Peer ID’s will need configuringMore work to do in the clustered modelClustered JMS v complex with complex loading and scaling of hetero deployments and seen laterAs SI round robins can use local JMS persistence and still get load balancing and failover
  • Scale Each service independentlyUse different instance types on different usage patternsTune each service independently
  • Although you can deploy all together in development and then split apart for deployment
  • JUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge

    1. 1. Elastic SOA on the Cloud Steve Millidge (C2B2)
    2. 2. About Me• Founder of C2B2 – Red Hat Partner – Deep Expertise in Middleware – Non-functional Experts• 20 Years Middleware Expertise• 15 years Field Consultancy• Organiser of JBUG London – http://www.meetup.com/JBoss-User-Group/
    3. 3. Agenda• SOA Reprise• Cloud Reprise• Why SOA on the Cloud?• JON Overview• Deploying ESB for Elasticity• Service Deployment Options
    4. 4. SOA Reprise
    5. 5. Typical SOA Architecture jBPM BAM JBoss Enterprise Service BusSystem 1 System 2 System 3 System 4
    6. 6. Typical ESB Service Components Inbound Listener • Inbound Listener – JMS, File, FTP, Web Service, HTTP(s) … • Action Pipeline Action Pipeline – Transformation, Routing, Process Coordination, Auditing, Aggregation • Outbound Protocol Outbound Protocol – Calls System Business Logic(JMS, HTTP, REST) – EJB, Web Service …
    7. 7. Service Definition<?xml version = "1.0" encoding = "UTF-8"?><jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/sche mas/xml/jbossesb-1.0.1.xsd" invmScope="GLOBAL"><services> <service category="Retail" name="ShoeStore" description="Acme Shoe Store Service"> <actions> <action name="println" class="org.jboss.soa.esb.actions.SystemPrintln" /> </actions> </service></services></jbossesb>
    8. 8. Cloud Reprise
    9. 9. Infrastructure As A Service Load Balancer Server Server Database Virtual Image Store
    10. 10. Amazon EC2EC2 Core Features Peripheral Services• AMI • Cloud Front• Instance • Cloud Watch – Spot, On-Demand, • Cloud Formation Dedicated • RDS• Volumes • VPC – Snapshots • Elastic Beanstalk• Security Groups• Load Balancers• Elastic IPs
    11. 11. Starting an Instance From JavaString imageID = “ami-xxxxxx”;String minInstances = 3;String maxInstances = 3;RunInstancesRequest request = new RunInstancesRequest(imageID,minInstances, maxInstances);AmazonEC2Client client = new AmazonEC2Client(new AWSCredentials(…));RunInstancesResult result = client.runInstances(request);
    12. 12. Amazon Instance TypesInstance Type Memory (GB) CPU (ECU) Cost per HourStandard Small 1.7 1 $0.095Standard Large 7.5 4 $0.38Standard XL 15 8 $0.76High Mem XL 17 6.5 $0.57High Mem DXL 34.2 13 $1.14High Mem QXL 68.4 26 $2.28High CPU Med 1.7 5 $0.19High CPU XL 7 20 $0.76Cluster 23 33.5 $1.60Micro .613 2 (burstable) $0.025
    13. 13. Why SOA on the Cloud?
    14. 14. Cloud Integration Cloud JBoss JBoss JBoss ESBSAAS SAAS Data CentreSalesForce Zen Desk Data Apps
    15. 15. Cloud Bursting Data CentreCloud Service Service Instance InstanceService ServiceInstance Instance Service Service Instance Instance
    16. 16. Challenges to Elasticity• Networking – IP Addresses, Firewalls• Service Discovery – New Capacity needs to be utilised• Clustering – New servers must cluster• Monitoring – Monitoring Tools must discover new servers• Application Architecture – Elastic Aware
    17. 17. How to Do Elasticity Users• Know Your Scalability• Know What Limits Scalability• Measure the Limiting Factors• Alert on Metrics• Add Additional Capacity Cluster Nodes
    18. 18. JBoss Operations Network (RHQ)
    19. 19. What is RHQ The RHQ project is a systems management suite that provides extensible and integrated systems management for multiple products and platforms across a set of core features such as• monitoring and graphing of values• alerting on error conditions• remote configuration of managed resources• remote operation execution
    20. 20. RHQ Architecture RHQ Server RHQ JBossRHQ Agent ServerAgent DB RHQ JBoss Agent Server
    21. 21. RHQ Agent• Installed on each RHQ Agent machine Plugin Plugin• Discovers machine •Monitoring •Monitoring Inventory •Discovery •Discovery •Availability •Availability• Can access local •Scheduling •Scheduling processes •Control •Control• Gathers native metrics from the OS. SIGAR Native OS Statistics• Stores metrics during server outage
    22. 22. RHQ Server Web Web• Stores Data Received Portal Services DAV From Agents• Updates Agents Content Monitor Alert• Sends Commands to Agents• Raises Alerts Configure Control Inventory• Provides Portal RHQ Server• Provides Web Services and WebDAV interface• Provides CLI Interface Database• Provides Security
    23. 23. RHQ and JBoss ESB• Key Service Metrics – Message Count (Success) – Message Count (Failed) – Processed Bytes• Key Action Metrics – Processing Time – Message Counts (Average Per Minute)
    24. 24. Key JBoss Metrics• Key JBoss Metrics – JVM Free Heap – GC Time – Servlet Response Time/ Response Rates – Connection Pool Utilisation• Key System Metrics – CPU Usage – Network Utilisation
    25. 25. Alerting in RHQ• Alerts can be set on any metric• Alerts can be set on Availability• Alerts are sent by the Server from filtering the metric stream• Alert Notification is configurable and Extensible• Alerts can trigger operations on a resource• Alerts can trigger Script Actions
    26. 26. Alerting and ElasticityCloud JBoss ESB JBoss ESB Agent Alert RHQ Message Count Server ec2Client. Agent runInstances RDS
    27. 27. Deploying ESB For Elasticity
    28. 28. Invoking a ServiceService InvocationServiceInvoker invoker = new ServiceInvoker(“Retail”, “ShoeStore”);Message message = MessageFactory.getInstance().getMessage();message.getBody().add(“Hi there!”);invoker.deliverAsync(message);
    29. 29. JBoss ESB Registry Service• The registry plays a central role within JBoss ESB for the deployed services – The purpose of the registry is to record services, discover meta- data and classify entities into pre-defined categories – It may be updated dynamically, when a services first starts or statically by an external administrator• The default configuration uses Apache jUDDI v3 as its UDDI registry• JBoss ESB Registry is based on Apache Scout a JAXR implementation
    30. 30. JBoss ESB UDDI Browser
    31. 31. Service RegistrationJBoss ESB Action Pipeline EPR jms://queue:@host1 Action Pipeline EPR jms://queue:@host1JBoss ESB Action Pipeline EPR jms://queue:@host2 JUDDI Action Pipeline EPR jms://queue:@host2
    32. 32. Service Discovery JBoss ESB Send JMS Action Pipeline ESB EPR Client jms://queue:@host Send JMS JBoss ESB Action PipelineLookup(“Retail”,”ShoeStore”) EPR jms://queue:@host JUDDI
    33. 33. UDDI on Amazon ESB Client SOAP Cloud Elastic LoadbalancerJBoss ESB JBoss ESBEmbedded UDDI Embedded UDDI JUDDI Amazon RDS
    34. 34. JMS and Services• JBoss ESB is JMS Based• Remote Services have JMS Endpoints – For ESB Aware• Service Invoker retrieves JMS EPR• Service Invoker enqueues Message
    35. 35. ESB JMS OptionsClustered JMS Local JMS Server 1 Server 2 Server 1 Server 2 JBoss ESB JBoss ESB JBoss ESB JBoss ESB Queue Cluster Queue Queue Queue JMS DB JMS DB JMS DB (Local) (Local) (Shared)
    36. 36. Local JMS Advantages• Load Balancing Performed by Service Invoker• Performance Improved• Each Node Stand Alone• No HA Database Required• Use Local MySQL stores• Enables Elasticity
    37. 37. Elastic SOA ArchitectureServer 1 Server 2 Server 3 Server 4 JBoss ESB JBoss ESB JBoss ESB JBoss ESB Queue Queue Queue Queue JMS DB JMS DB JMS DB JMS DB (Local) (Local) (Local) (Local) jms://server3 jms://server4 jms://server1 jms://server2 UDDI (Global, MultiAV RDS)
    38. 38. Service Deployment Options
    39. 39. Service 2 Server 4 Service 1Service Deployment Homogenous Service 2 Server 3 Service 1 Service 2 Server 2 Service 1 Service 2 Server 1 Service 1
    40. 40. Homogenous DeploymentAdvantages Disadvantages• Easy Management • Doesn’t take into account• Easy Deployment usage patterns• Simple Scaling • Can’t Scale Services• Enables All inVM Independently Processing • Encourages Monolithic• Easier to Test on single Deployment server • Encourages tight service coupling
    41. 41. Memory 3Heterogeneous Deployment High Memory Service High Memory 2 High Memory Service High Memory 1 High Memory Service High Compute High CPU Service High 2 Compute High CPU Service High 1
    42. 42. Heterogeneous DeploymentAdvantages Disadvantages• Each Service can be • More Complex independently Tuned Deployment• Each Service can be • More Complex independently scaled Management• Services don’t impact • Development more each other complex• Services can be • Calls are remote across independently upgraded services• Encourages loose service coupling
    43. 43. Summary• JBoss ESB’s Architecture Enables Elasticity using IAAS• JON Alerting can be used to Elastically Scale services• Centralised UDDI enables Service Discovery across the cloud• Centralised UDDI Enables Heterogeneous Deployment

    ×