intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Bài giảng Lập trình mạng nâng cao: Java message service - Nguyễn Xuân Vinh

Chia sẻ: Ngocnga Ngocnga | Ngày: | Loại File: PPT | Số trang:85

55
lượt xem
4
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

The main contents of this chapter include all of the following: Understanding the messaging paradigm, concepts and architecture of JMS, JMS messaging models, anatomy of a JMS message, JMS features, JMS providers.

Chủ đề:
Lưu

Nội dung Text: Bài giảng Lập trình mạng nâng cao: Java message service - Nguyễn Xuân Vinh

  1. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM GV: NGUYỄN XUÂN VINH MÔN: LẬP TRÌNH MẠNG 2 KHOA CÔNG NGHỆ THÔNG TIN Java Message Service 15/01/16 Presenter: Nguyễn Xuân Vinh Information Technology Faculty 85 Nong Lam University 1
  2. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Content GV: NGUYỄN XUÂN VINH 1 Understanding The Messaging Paradigm 2 Concepts and Architecture of JMS 3 JMS Messaging Models MÔN: LẬP TRÌNH MẠNG 2 4 Anatomy of a JMS Message 5 JMS Features 6 JMS Providers 15/01/16 85 2 2
  3. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM GV: NGUYỄN XUÂN VINH KHOA CÔNG NGHỆ THÔNG TIN Understanding The Messaging Paradigm  Some concepts of messaging system  Centralized Architecture MÔN: LẬP TRÌNH MẠNG 2  Decentralized Architecture 15/01/16 85 3 3
  4. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Some concepts of messaging system GV: NGUYỄN XUÂN VINH  Messaging systems allow different software applications to  communicate with each other, generically referred to enterprise  messaging systems, or Message­Oriented Middleware   A key concept of enterprise messaging is  messages are delivered  asynchronously from one system to others over a network MÔN: LẬP TRÌNH MẠNG 2 15/01/16 85 4 4
  5. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Some concept of messaging system GV: NGUYỄN XUÂN VINH  Enterprise messaging systems allow two or more  applications to exchange information in the form of  messages   A message is a self­contained package of business data and  MÔN: LẬP TRÌNH MẠNG 2 network routing headers   In all modern enterprise messaging systems, applications  exchange messages through virtual channels called  destinations.  15/01/16 85 5 5
  6. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Some concept of messaging system GV: NGUYỄN XUÂN VINH  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.  MÔN: LẬP TRÌNH MẠNG 2 15/01/16 85 Figure 1.1. Message-Oriented Middleware 6 6
  7. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Some concept of messaging system GV: NGUYỄN XUÂN VINH  RPC vs Asynchronous Messaging  RPC attempts to mimic the behavior of a system that runs in one  process  MÔN: LẬP TRÌNH MẠNG 2  A failure on one system has an immediate and debilitating impact  on other systems 15/01/16 85 7 7
  8. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Some concept of messaging system GV: NGUYỄN XUÂN VINH  RPC vs Asynchronous Messaging Business Business Application A Application B MÔN: LẬP TRÌNH MẠNG 2 RPC RPC Client/Server Client/Server Business Business Application D Application C 15/01/16 Requires n * (n-1) / 2 RPC connections RPC Client/Server Client/Server 85 8 8
  9. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Some concept of messaging system GV: NGUYỄN XUÂN VINH  RPC vs Asynchronous Messaging  A fundamental concept of MOM is that communication between  applications is intended to be asynchronous   In MOM, each subsystem is decoupled from the other systems  MÔN: LẬP TRÌNH MẠNG 2 15/01/16 85 9 9
  10. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Some concept of messaging system GV: NGUYỄN XUÂN VINH  RPC vs Asynchronous Messaging Centralized message server  Decentralized message  (hub and spoke) server (IP multicast) MÔN: LẬP TRÌNH MẠNG 2 JMS Application A Client JMS JMS Router JMS Client Client Client Local "server" Message Server Local "server" Local "server" Local "server" JMS JMS JMS JMS JMS Client Client Client Client Client JMS Application B Application C Application D 15/01/16 Client 85 10 10
  11. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Centralized Architecture GV: NGUYỄN XUÂN VINH  A message server is responsible for delivering messages from one  messaging client to other messaging clients  The message server decouples a sending client from other  receiving clients   MÔN: LẬP TRÌNH MẠNG 2 15/01/16 85 11 11
  12. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Centralized Architecture GV: NGUYỄN XUÂN VINH  A centralized architecture uses a hub­and­spoke topology   The hub­and­spoke architecture lends itself to a minimal  amount of network connections while still allowing any part  of the system to communicate with any other part of the  MÔN: LẬP TRÌNH MẠNG 2 system  15/01/16 85 12 12
  13. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Decentralized Architecture GV: NGUYỄN XUÂN VINH  All decentralized architectures currently use IP multicast at  the network level   Some of the server functionality (persistence, transactions,  security) is embedded as a local part of the client, while  MÔN: LẬP TRÌNH MẠNG 2 message routing is delegated to the network layer by using  the IP multicast protocol  15/01/16 85 13 13
  14. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Decentralized Architecture GV: NGUYỄN XUÂN VINH  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  MÔN: LẬP TRÌNH MẠNG 2  The network handles routing automatically  15/01/16 85 14 14
  15. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Content GV: NGUYỄN XUÂN VINH 1 Understanding the Messaging Paradigm 2 Concepts and Architecture of JMS 3 JMS Messaging Models MÔN: LẬP TRÌNH MẠNG 2 4 Anatomy of a JMS Message 5 JMS Features 6 JMS Providers 15/01/16 85 15 15
  16. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Concepts and Architecture of JMS GV: NGUYỄN XUÂN VINH  What is JMS?  MÔN: LẬP TRÌNH MẠNG 2  Architecture of JMS 15/01/16 85 16 16
  17. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN What is JMS? GV: NGUYỄN XUÂN VINH  The JMS (Java Message Service) is an API for enterprise  messaging created by Sun Microsystems   JMS is not a messaging system itself   JMS abstracts access to MOMs  MÔN: LẬP TRÌNH MẠNG 2 15/01/16 85 17 17
  18. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN What is JMS? GV: NGUYỄN XUÂN VINH  Supports message production, distribution, delivery  Supported message delivery semantics  Synchronous or Asynchronous  Transacted MÔN: LẬP TRÌNH MẠNG 2  Guaranteed  Durable 15/01/16 85 18 18
  19. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Architecture of JMS GV: NGUYỄN XUÂN VINH  JMS architectural components  JMS clients  Non­JMS clients  Messages MÔN: LẬP TRÌNH MẠNG 2  JMS provider (Messaging systems)  JNDI administered objects Destination ConnectionFactory 15/01/16 85 19 19
  20. TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN Architecture of JMS GV: NGUYỄN XUÂN VINH  Architecture of JMS application MÔN: LẬP TRÌNH MẠNG 2 15/01/16 85 20 20
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2