Bài giảng Kiến trúc phần mềm - Middleware trình bày các nội dung: Middleware classification, CORBA code example, basic messaging, MOM transactions, messaging – some thoughts, publish - subscribe with multicast,... Mời các bạn cùng tham khảo nội dung chi tiết.
Trang 2 Nội dung của bài giảng sử dụng:
Session 4:
A Guide to Middleware Architectures and Technologies
của GS Ian Gorton
Software Engineering Institute
Carnegie Mellon University
Trang 3 Insulates applications from underlying platform
(OS, DBMS, etc) APIs
Lots of middleware exists
Trang 6 Venerable distributed object technology
Still widely used in telecomms, defense
Many different implementations
Trang 7CORBA Code Example
ORB orb = ORB.init(args, null);
MyServant objRef = new MyServant();
orb.connect(objRef);
ORB orb = ORB.init(args, null);
// Lookup is a wrapper that actually access the CORBA Naming
// Service directory – details omitted for simplicity
CORBA IDL
Server
Client
Trang 8CORBA – Some Thoughts
„interesting‟ recovery issues
Trang 9Messaging - MOM
features like:
applications and systems
survive server failure
Trang 10Basic Messaging
Send (queue, message)
Put message onto queue
Receive (queue, message)
Get message from queue
No dependency on state of receiving
application on message send
receive send
queue
Trang 11receive send
queue
Receipt of message at queue implies
message is written to disk log
Removal of message from queue
deletes message from disk log
Trade-off performance versus reliability
Trang 12MOM Server
MOM Server
Sending Applications
Senders
Message Handler Thread Pool
Sending Applications Receivers
Peer-to-peer MOM technologies are the alternative design
Trang 13g e t m e s s a g e f r o m q u e u e
u p d a t e d a t a b a s e r e c o r d
c o m m i t t r a n s a c t i o n
Trang 14MOM Transactions
Sender and receiver do *not* share a transaction
committed)
Request/response is 3 transactions not 1
Put to request queue
Get from request queue, put to response queue
Get from response queue
receive send
Request queue
Response queue
send receive
Trang 15Scaling MOM
MOM Server
MOM Server ApplicationQ ApplicationQ
Trang 16Messaging – Some thoughts
Trang 17Publish-Subscribe Messaging
Extension of MOM to provide 1-to-N, 1, and
N-to-N communications
Messages are „published‟ to logical subjects or topics
Subscribers receive all messages from subjects they
Trang 18Publish-Subscribe with Multicast
Trang 20Subject/Topic Naming
Sydney
Information Information
Sydney/DevGroup/**
Trang 21Publish-Subscribe – Some
Thoughts
Trang 23J2EE Application Server
In J2EE, the application server container provides the
execution environment for the J2EE-specific
Trang 24EJB Container
Application Server EJB Container
Transaction Service
Directory Service
Security Service
Thread Pool Connection Pool Persistence Lifecycle Management
EJB Pool
Trang 25Beans and State
state
state state state
EJB Clients
Trang 27J2EE – Some Thoughts
Standards-based, multiple vendors, portable
Good open source technology available
Quality of implementations varies considerably
Java only, wide platform support
Performance is good, but varies between suppliers
Scalable, fail over support through clustering
Good integration with web technologies
Supports various design patterns, flexible but more
complex (e.g stateful beans/scalability, entity beans)
Trang 28Message Brokers - Motivation
Web Component
Legacy System #1
Legacy System #2
Legacy System #3
Legacy System #4
API call Queue
Read
Trang 29What if …
Trang 30Web Component
Legacy
System #1
Legacy System #2
Legacy System #3
Legacy System #4
Trang 32Message Broker Features
Message transformation – transform between
different source/target formats
Intelligent routing
Rules Engine
Trang 33Message Brokers
TransformationRoutingRules Processing
Hub and Spoke Architecture
Trang 34Example - WMQI
Trang 35BizTalk Mapping Tool
Trang 36message broker and the source/target systems
abstraction layer
located with source/target system
Trang 37Message Brokers – Some
Thoughts
available
Trang 38Business Process Orchestration
Commonly known as workflow
Aim is to automate business processes which need
to access data and business logic across disparate
back-end applications
Builds on EAI to ensure business processes are
executed in the defined order using the required
data
Builds on middleware providing:
Trang 39Accounts Payable
Accounts Receivable
Oracle
Trang 40Example - BizTalk
Trang 41BPO Architecture
Message Broker
Trang 42BPEL
Trang 43Integration Issues – Point-to-Point
Trang 44Broker Spaghetti
message broker
Trang 45Enterprise Data Model
payload.
local data representation.
Enterprise Data Model
Trang 46applications simpler
supporting them in off-the-shelf middleware technologies
appropriate solutions