28/05/151 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
Java Message Service
Presenter: Nguyễn Xuân Vinh
Information Technology Faculty
Nong Lam University
28/05/152 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
2
Content
Understanding The Messaging Paradigm
1
Concepts and Architecture of JMS
2
JMS Messaging Models
3
Anatomy of a JMS Message
4
JMS Features
5
JMS Providers
6
28/05/153 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
3
Understanding The Messaging Paradigm
Some concepts of messaging system
Centralized Architecture
In asynchronous messaging, applications use a simple API to
construct a message, then hand it off to the Message-Oriented
Middleware for delivery to one or more intended recipients.
Some concept of messaging system
Figure 1.1. Message-Oriented Middleware
28/05/157 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
7
Some concept of messaging system
RPC vs Asynchronous Messaging
RPC attempts to mimic the behavior of a system that runs in one
process
A failure on one system has an immediate and debilitating impact
on other systems
28/05/158 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
8
RPC vs Asynchronous Messaging
Business
Application A
RPC
Client/Server
Business
Application D
RPC
(hub and spoke)
JMS
Client
Message
Server
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
JMS
Client
Local "server"
JMS
Client
Local "server"
JMS
Client
Local "server"
JMS
Client
Application A
Local "server"
Application B Application C Application D
Router
Some of the server functionality (persistence, transactions,
security) is embedded as a local part of the client, while
message routing is delegated to the network layer by using
the IP multicast protocol
28/05/1514 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
14
IP multicast allows applications to join one or more IP
multicast groups; each group uses an IP network address that
will redistribute any messages it receives to all members in
its group
The network handles routing automatically
Decentralized Architecture
28/05/1515 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
15
Content
Understanding the Messaging Paradigm
1
Concepts and Architecture of JMS
2
JMS Messaging Models
3
Anatomy of a JMS Message
4
JMS Features
5
Transacted
Guaranteed
Durable
What is JMS?
28/05/1519 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
19
Architecture of JMS
JMS architectural components
JMS clients
Non-JMS clients
Messages
JMS provider (Messaging systems)
JNDI administered objects
Destination
ConnectionFactory
28/05/1520 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
20
JMS Administration
Architecture of JMS
Administrative
Tool
JNDI Namespace
JMS Client
Bind
Lookup
Logical
Connection
JMS Provider
28/05/1523 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN
23
Content
Understanding the Messaging Paradigm
1
Concepts and Architecture of JMS
2
JMS Messaging Models
3
Anatomy of a JMS Message
4
JMS Features
5
JMS Providers
6
28/05/1524 85 MÔN: LẬP TRÌNH MẠNG 2 GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN