3. 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/
4. Agenda
• SOA Reprise
• Cloud Reprise
• Why SOA on the Cloud?
• JON Overview
• Deploying ESB for Elasticity
• Service Deployment Options
12. Starting an Instance
From Java
String 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);
13. Amazon Instance Types
Instance Type Memory (GB) CPU (ECU) Cost per Hour
Standard Small 1.7 1 $0.095
Standard Large 7.5 4 $0.38
Standard XL 15 8 $0.76
High Mem XL 17 6.5 $0.57
High Mem DXL 34.2 13 $1.14
High Mem QXL 68.4 26 $2.28
High CPU Med 1.7 5 $0.19
High CPU XL 7 20 $0.76
Cluster 23 33.5 $1.60
Micro .613 2 (burstable) $0.025
15. Cloud Integration
Cloud JBoss JBoss
JBoss ESB
SAAS SAAS Data Centre
SalesForce Zen Desk
Data Apps
16. Cloud Bursting
Data Centre
Cloud Service Service
Instance Instance
Service Service
Instance Instance
Service
Service
Instance
Instance
17. 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
18. How to Do Elasticity
Users
• Know Your
Scalability
• Know What Limits
Scalability
• Measure the
Limiting Factors
• Alert on Metrics
• Add Additional
Capacity Cluster Nodes
20. 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
21. RHQ Architecture
RHQ
Server RHQ JBoss
RHQ Agent Server
Agent
DB
RHQ JBoss
Agent Server
22. 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
23. 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
24. 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)
25. 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
26. 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
27. Alerting and Elasticity
Cloud JBoss
ESB
JBoss
ESB Agent
Alert
RHQ
Message Count Server
ec2Client.
Agent runInstances
RDS
29. Invoking a Service
Service Invocation
ServiceInvoker invoker = new ServiceInvoker(“Retail”, “ShoeStore”);
Message message = MessageFactory.getInstance().getMessage();
message.getBody().add(“Hi there!”);
invoker.deliverAsync(message);
30. 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
35. 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
36. ESB JMS Options
Clustered 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)
37. 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
38. Elastic SOA Architecture
Server 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)
40. Service 2
Server 4
Service 1
Service Deployment
Homogenous
Service 2
Server 3
Service 1
Service 2
Server 2
Service 1
Service 2
Server 1
Service 1
41. Homogenous Deployment
Advantages 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
42. Memory 3
Heterogeneous 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
43. Heterogeneous Deployment
Advantages 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
44. 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
Notes de l'éditeur
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