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






Total Views
Views on SlideShare
Embed Views



3 Embeds 39

http://www.c2b2.co.uk 37
http://paper.li 1 1



Upload Details

Uploaded via as Microsoft PowerPoint

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.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • 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 JUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge Presentation Transcript

  • 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 Middleware Expertise• 15 years Field Consultancy• Organiser of JBUG London – http://www.meetup.com/JBoss-User-Group/
  • Agenda• SOA Reprise• Cloud Reprise• Why SOA on the Cloud?• JON Overview• Deploying ESB for Elasticity• Service Deployment Options
  • SOA Reprise
  • Typical SOA Architecture jBPM BAM JBoss Enterprise Service BusSystem 1 System 2 System 3 System 4
  • 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 …
  • 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>
  • 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 Watch – Spot, On-Demand, • Cloud Formation Dedicated • RDS• Volumes • VPC – Snapshots • Elastic Beanstalk• Security Groups• Load Balancers• Elastic IPs
  • 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);
  • 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
  • Why SOA on the Cloud?
  • Cloud Integration Cloud JBoss JBoss JBoss ESBSAAS SAAS Data CentreSalesForce Zen Desk Data Apps
  • Cloud Bursting Data CentreCloud Service Service Instance InstanceService ServiceInstance Instance Service Service Instance Instance
  • 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
  • How to Do Elasticity Users• Know Your Scalability• Know What Limits Scalability• Measure the Limiting Factors• Alert on Metrics• Add Additional Capacity Cluster Nodes
  • JBoss Operations Network (RHQ)
  • 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
  • RHQ Architecture RHQ Server RHQ JBossRHQ Agent ServerAgent DB RHQ JBoss Agent Server
  • 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
  • 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
  • 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)
  • 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
  • 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
  • Alerting and ElasticityCloud JBoss ESB JBoss ESB Agent Alert RHQ Message Count Server ec2Client. Agent runInstances RDS
  • Deploying ESB For Elasticity
  • Invoking a ServiceService InvocationServiceInvoker invoker = new ServiceInvoker(“Retail”, “ShoeStore”);Message message = MessageFactory.getInstance().getMessage();message.getBody().add(“Hi there!”);invoker.deliverAsync(message);
  • 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
  • JBoss ESB UDDI Browser
  • 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
  • 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
  • UDDI on Amazon ESB Client SOAP Cloud Elastic LoadbalancerJBoss ESB JBoss ESBEmbedded UDDI Embedded UDDI JUDDI Amazon RDS
  • 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
  • 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)
  • 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
  • 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)
  • Service Deployment Options
  • 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
  • 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
  • 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
  • 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
  • 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