D5 Inside SonicMQ

Download Report

Transcript D5 Inside SonicMQ

Inside SonicMQ
Progress SonicMQ
and the Java Message Standard
Mitchell Horowitz
Technical Product Manager, SonicMQ
Objectives


To explore the JMS Specification.
– Discuss the 2 JMS Messaging Models.
– Discuss the 7 core framework classes.
Describe how SonicMQ implemented the JMS
specification.
– Highlight what differentiates SonicMQ.
– Show how easy it is to code JMS applications.
2 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Agenda



The JMS spec
What the API looks like
SonicMQ’s implementation
of the JMS spec
3 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
The Java Message Service





Specification for the implementation of Java
messaging
A common set of Java interfaces and
semantics
Part of the Java 2 Enterprise Edition
specification
Developed and Maintained by JavaSoft
Not just an intersection but the fast lane to
the information super highway.
4 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
The Java Messaging Service


Service allowing Java-based applications to communicate.
– SonicMQ has added C/C++ and ActiveX applications.
Two models:
– Publish and Subscribe





0 or more recipients
Messages passed between publishers and subscribers via
topics
Message can be published in a persistent manner
Message can be subscribed to in a durable manner
Message are consumed at least once.
– Point-to-Point



One recipient only
Messages passed between senders and receivers via
queues
Messages are consumed at most once and only once
5 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Producer - Destination - Consumer
Producer
Destination
Consumer
Posts messages
to a destination
Subject of
communication
Available to
registered
participants
Receives
messages on a
destination
6 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Publish & Subscribe
Publisher
Topic
Subscriber
Posts messages
to the topic
Subject of
communication
Available to
registered
participants
Receives
messages on
the topic
7 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Publish & Subscribe
Supply Chain Management
Publisher
Topic
Subscriber
New Flavor
Price Increase
8 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Point to Point
Sender
Queue
Receiver
Posts messages
to the queue
Subject of
communication
Available to
registered
participants
Receives
messages on
the queue
9 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Point-to-Point
Order and Fulfillment
Sender
Queue
Receiver
Need Supplies
Goods Shipped
10 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Publish & Subscribe vs. Point-to-Point

Publish and Subscribe
– Stock ticker
– Pricing changes /
catalog updates
– Data replication

Point-to-Point*
– Ordering and
fulfillment
* Point-to-Point is a specialized version of Publish and Subscribe
11 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
The JMS spec and what it means




A common way for Java applications to
interact with an enterprise messaging
system.
Design to leverage existing messaging
systems as well as create new ones.
Describes portable efficient standards for
powerful and extensible messaging service
A common set of Java interfaces and
semantics
12 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
The JMS spec and what it means

Defines an Architecture that includes:
– JMS Provider





JMS Interface
JMS Application
Administration
Two Messaging Styles
Message Delivery Capabilities
13 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Hub & Spoke Topology
JMS
Client
JMS
Client
JMS
Client
Message
Broker
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
14 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Peer-to-Peer Topology
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
15 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
The JMS spec and what it means

JMS/API Framework that includes:
–
–
–
–
–
–
–
ConnectionFactories ,
Connections .
Sessions .
Destinations .
Message Producers .
Message Consumers .
Messages .
16 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Message Interfaces
Send messages
to Topic
TopicPublisher
TopicConnectionFactory
ConnectionFactory
Creates
TopicSession
TopicConnection
Creates
one or more
Sessions
Connection
Session
MessageProducer
QueueSender
Each Session
type creates
one or more
Producers and/or
Consumers
TopicSubscriber
Creates
QueueConnection
QueueConnectionFactory
QueueSession
MessageConsumer
QueueReceiver
Sessions Create
Message Instances
Send messages
to Queue
Receive messages
from Topic
Receive messages
from Queue
ObjectMessage
Topic
MapMessage
Messages are sent to
Destinations (Topic/Queue)
and routed to
MessageConsumers
Destination
Message
StreamMessage
TextMessage
XMLMessage
Queue
BytesMessage
Inheritance (Extends)
LEGEND
Creation
Incoming/Outgoing Messages
17 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Message Interfaces
TopicConnectionFactory
ConnectionFactory
Creates
Connection
QueueConnectionFactory
Creates
TopicConnection
Creates
one or more
Sessions
Session
QueueConnection
LEGEND
Inheritance (Extends)
Creation
Incoming/Outgoing Messages
18 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
ConnectionFactories
TopicConnectionFactory

QueueConnectionFactory
Provides access to a specific messaging
service implementation
19 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Connections
TopicConnection



QueueConnection
Interface representing a client connection
to the underlying messaging provider
ConnectionFactory returns a Connection
implementation
Protocol and connection information
contained in this object
20 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Destination Interfaces
Topic
Messages are sent to
Destinations (Topic/Queue)
and routed to
MessageConsumers
Destination
Queue
LEGEND
Inheritance (Extends)
Creation
Incoming/Outgoing Messages
21 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Destinations
Topic




Queue
Targets for a producer’s messages
Sources for a consumer’s messages
JMS administered objects
Can be temporary
– Out-of-band discussions
– Request / reply
22 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
JMS Administered Objects

Can be modified without requiring
changes to the application
23 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Message Interfaces
TopicPublisher
TopicSession
Session
MessageProducer
QueueSender
Each Session
type creates
one or more
Producers and/or
Consumers
QueueSession
TopicSubscriber
MessageConsumer
QueueReceiver
Send
messages
to Topic
Send
messages
to Queue
Receive
messages
from Topic
Receive
messages
from Queue
LEGEND
Inheritance (Extends)
Creation
Incoming/Outgoing Messages
24 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Sessions
TopicSession




QueueSession
Enforces ordering for production and
consumption of messages
Defines acknowledgement semantics
Defines JMS transactions
One or more sessions can be created by a
Connection
25 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Message Producers
TopicPublisher



QueueSender
Used to send or publish messages to a
destination
Created by a Session instance
Can define message delivery semantics
– Time-to-live
– Persistence
– Priority
26 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Message Consumers
TopicSubscriber



QueueReceiver
Used to handle messages sent to a
destination
Created by a Session instance
Can be durable beyond a physical
connection
27 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Message Interfaces
Session
Sessions Create
Message Instances
Message
ObjectMessage
MapMessage
StreamMessage
TextMessage
XMLMessage
BytesMessage
LEGEND
Inheritance (Extends)
Creation
Incoming/Outgoing Messages
28 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Messages
Message
Header
Properties
Used to identify and route
the message
Support application-specific
values passed with the
message
Body
The actual “payload” of the
message (five different types,
plus XML for SonicMQ)
29 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Message Headers






JMSReplyTo
JMSCorrelationID
JMSExpiration
JMSPriority
JMSDeliveryMode
JMSMessageID
Full list available in the JMS spec
30 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Message Properties



Optional fields and values associated with
a message.
Allows filtering of messages by the
consumer
Can be used to carry the data, or selected
parts of the data to do content-based
filtering
– e.g. where region= “Northeast”
31 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Message Body
Message
BytesMessage
MapMessage
ObjectMessage
StreamMessage
TextMessage
32 Exchange 2000, Barcelona Spain
XMLMessage
© 2000, Progress Software Corporation
Agenda



The JMS spec
What the API looks like
SonicMQ’s implementation
of the JMS spec
33 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
What the Java/API looks like
// Create a connection factory
TopicConnectionFactory factory;
factory = (new progress.message.jclient.TopicConnectionFactory (broker));
// Create a connection
connect = factory.createTopicConnection (username, password);
// Create a session
session = connect.createTopicSession(true, Session.AUTO_ACKNOWLEDGE);
// Create a topics.
Topic topic = session.createTopic (“jms.progress.chat”);
// Create Subscriber to application topics.
TopicSubscriber subscriber = session.createSubscriber(topic);
// Initialize the onMessage() message handler.
subscriber.setMessageListener(this);
// Create a publisher
publsher = session.createPublisher(null);
// Topic will be set for each reply
// Now setup is complete, start the Connection
connect.start();
34 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Agenda



The JMS spec
What the API looks like
SonicMQ’s implementation
of the JMS spec
35 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
However there are…
Limitations of the JMS Standard
It Does Not Address








Security
Load Balancing
Fault Tolerance
Error Notification
Administration
Repositories
XML Support
Wire Protocols
It Does Not Require




Support for Both
Messaging Models
Transaction Support
Server Clusters
100% Java
Commercial Implementations Vary in Scope
36 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Hub & Spoke Topology
JMS
Client
JMS
Client
JMS
Client
Message
Broker
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
37 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Peer-to-Peer Topology
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
38 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
SonicMQ Architecture
Admin
Client
C
Client
Broker
Cluster
Broker
Broker
Topic
Queue
Broker
JMS
JMS
JMS
Client
JMS
Client
Client
Client
39 Exchange 2000, Barcelona Spain
Topic
ActiveX
Client
© 2000, Progress Software Corporation
SonicMQ Features
MESSAGE BROKER
• Transaction Support
• Security
• Message Persistence
• QoS Delivery
• Asynch Delivery
• Abstraction of
Communications
•Interbroker Support
TOPIC/QUEUE
• PTP & Pub/Sub
• XML Messages
• Durable Subscribers
• Hierarchical Name
Spaces
• Push to Client
• Subject-based
Addressing
Java
Clients
ActiveX
Clients
C
Clients
Future
Clients
ADMINISTRATION CLIENT
•Command Line & GUI
•Remote access
40 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
SonicMQ’s JMS Implementation








Administration
Security
Performance and Scalability
Internet / Protocol Support
ActiveX/COM Clients
C/C++ Clients
XML Support
Usability
41 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Administration Tools







Java-based GUI tool
Command-line tool for script-based automation of
administrative tasks
Support of managing users, groups, destination
QoP, destination ACLs, clusters
Allows monitoring of broker performance metrics
and broker events
Provides tools for prototyping and testing
Remote monitoring capability
JNDI support
42 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
SonicMQ Explorer
43 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Security






Access Control Lists (by topic and queue)
Secure authentication
PKI support / Digital certificates
SSL support
Payload encryption
User and group administration
– Available at the cluster-level
44 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Performance and Scalability


Thousands of clients
10,000’s messages per second
– Publish and subscribe

Broker Clusters
– Cluster-level administration

In-house Long Duration Test
– 42 days: 100 million test cycles

200 million 10K messages served
– That's 2 Terabytes through the broker!
45 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
SonicMQ Performance
900
256-Byte Message Size
(messages/ second)
Throughput
800
Quad CPU Machine
700
600
Out of Box (No tuning)
500
400
300
200
MQSeries
100
SonicMQ
0
P/S*:
50
P/S*:
100
P/S*:
300
PTP:
50
PTP:
100
PTP:
300
Concurrent Clients
* Durable, persistent
46 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Internet / Protocol Support







SSL
TCP
HTTP tunneling
Full support for firewalls and proxies
Applet support
Interbroker communication over Internet
protocols
XML message support
47 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
JMS over HTTP for Firewall Support*
No changes required by the firewall administrator.
Allows for multi-company networks.
Plus SSL support
with 40 bit and 128 bit encryption.
Any Application
JMS API
JMS
Server
Firewall(s)
JMS Client
M
HTTP
TCP/IP Stack
M
HTTP
TCP/IP Stack
* Beyond the JMS specificaion
48 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
ActiveX/COM client

Provides access to SonicMQ from non-Java
development environments
–
–
–
–
–


MS Visual Basic
MS Visual C++
Delphi
VBA-enabled applications
Progress 4GL
Java events are presented as native ActiveX
control events, allowing for asynchronous
listeners
Exception listeners provide support for JMS
exception handling
49 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
C/C++ Clients




Publish and Subscribe
Point- to- Point
TextMessage and BinaryMessage formats
Native client implementation
– No JVM required

Supported on Windows NT and Solaris
50 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
XML Support



XMLMessage type
Accessible as DOM or Text
IBM xml4j parser included in product
– Can be replaced if required
51 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Usability


Extensive documentation
Rich set of sample applications
–
–
–
–


Publish and subscribe
Point-to-point
ActiveX/COM
Servlet
Turnkey installation
Open database connectivity via JDBC
– In addition to the embedded data store
52 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Questions
53 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation
Thank you for
your time.
54 Exchange 2000, Barcelona Spain
© 2000, Progress Software Corporation