Bài giảng Kiến trúc phần mềm - Chương: Mẫu thiết kế Middleware - Trần Minh Triết
Trường Đại học Khoa Học Tự Nhiên
Khoa Công Nghệ Thông Tin
Bộ môn Công Nghệ Phần Mềm
CTT526 - Kiến trúc phần mềm
Middleware
PGS.TS. Trần Minh Triết
Version 1.0
Introduction
Middleware is the plumbing or wiring of IT
applications
Provides applications with fundamental services for
distributed computing
Insulates applications from underlying platform
(OS, DBMS, etc) APIs
Lots of middleware exists
Different purposes
Different v
Different standards and proprietary technologies
3
CORBA Code Example
module ServerExample
{
CORBA IDL
interface MyObject {
};
string isAlive(); };
class MyServant extends _MyObjectImplBase
n "\nLooks like it…\n"; }
}
Server
ORB orb = ORB.init(args, null);
MyServant objRef = new MyServant();
orb.connect(objRef);
ORB orb = ORB.init(args, null);
Client
// Lookup is a wrapper that actually access the CORBA Naming
// Service directory – details omitted for simplicity
MyServant servantRef = lookup(“Myservant”)String
reply = servantRef.isAlive();
7
Messaging - MOM
Basic Message Oriented Middleware (MOM) provides
features like:
Asynchronous communications between processes,
applications and systems
Send-and-forget
Delivering messages despite failures
Transactional Messaging
Deliver all messages in a transaction, or none
Persistence
Messages can be logged at the server and hence
survive server failure
9
MOM Transactions
Sender and receiver do *not* share a transaction
Rollback on receiver does not affect the sender (already
committed)
„Synchronous‟ operations are not atomic
Request/response is 3 transactions not 1
. Put to
. Get from request queue, put to response queue
. Get from response queue
Request queue
send
receive
send
receive
Response queue
14
Subject/Topic Naming
Sydney
DevGroup
SupportGroup
Information
Information
work
gossip
work
gossip
Sydney
Sydney/DevGroup
Sydney/*/Information
Sydney/DevGroup/*/*
Sydney/DevGroup/**
Sydney/DevGroup/Information
Sydney/DevGroup/Information/work
Sydney/DevGroup/Informati
Sydney/SupportGroup
Sydney/SupportGroup/Information
Sydney/SupportGroup/Information/work
Sydney/SupportGroup/Information/gossip
20
Tải về để xem bản đầy đủ
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Kiến trúc phần mềm - Chương: Mẫu thiết kế Middleware - Trần Minh Triết", để tải tài liệu gốc về máy hãy click vào nút Download ở trên
File đính kèm:
bai_giang_kien_truc_phan_mem_chuong_mau_thiet_ke_middleware.pdf

