Download presentation
Presentation is loading. Please wait.
Published byLucas Robertson Modified over 9 years ago
1
T-110.455 Network Application Frameworks and XML Middleware and Mobile Middleware 2.3.2005 Sasu Tarkoma
2
Contents n Middleware u Motivation u Examples n Mobile Middleware u Motivation u Examples n Summary
3
Middleware n Widely used and popular term n Fuzzy term n One definition u “A set of service elements above the operating system and the communications stack” n Second definition u “Software that provides a programming model above the basic building blocks of processes and message passing” (Colouris, Dollimore, Kindberg, 2001)
4
Why Middleware? n Application development is complex and time-consuming u Should every developer code their own protocols for directories, transactions,..? u How to cope with heterogeneous environments? F Networks, operating systems, hardware, programming languages n Middleware is needed u To cut down development time F Rapid application development u Simplify the development of applications u Support heterogeneous environments and mask differences in OS/languages/hardware
5
Middleware cont. n Middleware services include u directory, trading, brokering u remote invocation (RPC) facilities u transactions u persistent repositories u location and failure transparency u messaging u Security n Network stack (transport and below) is not part of middleware
6
Middleware Networking Layer (IP) Transport Layer (TCP/UDP) Underlying network (link layer, physical) Applications APIs for: RPC, messaging, transactions, session management, storage, directories, trading, etc. Middleware provides various transparencies (HW, OS, location, fault,..) for apps.
7
Examples n Remote Procedure Call (RPC) u call of a remote procedure as it were local u marshalling / unmarshalling n Remote Method Invocation (RMI) u call of a remote method as it were local u marshalling / unmarshalling n Event-based computing u entities receive asynchronous notifications u a notification causes a state change
8
Transparencies n Location transparency u RPC and RMI used without knowledge of the location of the invoked procedure / object n transport protocol transparency u RPC may be implemented using any transport protocol n transparency of OS and hardware u RPC/RMI uses external data representation u Presentation is important u XML is becoming increasingly important n transparency of programming languages u language independent definition of procedures: CORBA IDL
9
Network Application Framework n Network Application Framework is middleware n Contains services for distributed applications n Middleware as a term is fuzzier and larger n In this course, we focus on network application frameworks and XML u objects (discovery, representation) u directories (overlays,..) u network u security
10
Object Model n Components: object references, interfaces, actions (methods), exceptions, garbage collection n Distributed object model u client-server model u usually implemented using request-reply u marshalling, unmarshalling u Example: Java RMI u Invocation Semantics F Exactly-once cannot be guaranteed F Typical semantics: at-least-once, at-most-once F At-least-once is good for idempotent operations F CORBA and RMI use at-most-once
11
NAF XML Security Objects Middleware Assignment: Apache Axis Web Services SOAP with security J2EE CORBA Middleware is a fuzzy term. This is one way to look at things.. SIP Assignment: Schema
12
Examples n CORBA n Message-oriented Middleware n Event Systems & tuple spaces n Java Message Service n Java 2 Enterprise Edition (J2EE) n.NET
13
CORBA I n Common Object Request Broker Architecture (CORBA) u Standardized by Object Management Group (OMG) u OMG est. 1989, currently over 800 members n Distributed object-oriented middleware u Network abstraction of object location u Support for heterogeneous environments F hardware, networks, OS, languages F Interface Definition Language (IDL)
14
CORBA II n Object Request Broker (ORB) u Broker pattern, transparent object invocation F object location, activation, communication F CORBA works for both OO and non-OO languages n Interoperable Object Reference (IOR) u Shareable reference n Support for dynamic and static method invocation n Many commercial and non-commercial implementations
15
ClientObject Implementation IDL stubIDL Skeleton Object Request Broker (ORB) I. REQUEST II. Invocation returns
16
Implementation layer - Dynamic Invocation Interface - Alternative to static stub/skeleton calls - Generic runtime invocation, generic interface defined in IDL Interceptors useful for monitoring and security - generate and interpret object references - demultiplex requests - Handle method invocations via skeletons - activation policies, thread models - object life cycle - pre/post invocation capabilities
17
CORBA Services n Services specified by OMG to help using distributed objects n Naming Service n Event and Notification Service n Security Service u authentication, access control, non- repudiation n Persistent Object Service u persistent objects (activation / deactivation) n Trading Service u directory service, objects are identified by attributes n Transaction and Concurrency Control Service u database transactions
18
Message-oriented Middleware n Transfers messages between applications u Does not consider the content of messages n Asynchronous communication n Direct or queued u Queued (buffered) communication supports wireless clients n Examples u Sun Microsystems JMS u Microsoft: MSMQ u IBM: Websphere MQ
19
Event Systems I n Traditional MoM systems are message queue based (one-to-one) n Event systems and publish/subscribe are one-to-many u One object monitors another object u Reacts to changes in the object u Multiple objects can be notified about changes n Events address problems with synchronous operation and polling n In distributed environments a logically centralized services mediates events u anonymous communication u expressive semantics using filtering
20
Event Systems II n Push versus Pull n May be implemented using RPC, unicast, multicast, broadcast,.. n Three main patterns u Observer design pattern F Used in Java / Jini u Notifier architectural pattern F Used by many research systems u Event channel F Used in CORBA Event/Notification Service n Filtering improves scalability / accuracy u Research topic: content-based routing
21
Tuple Spaces n Tuple-based model of coordination n The shared tuple space is global and persistent n Communication is u decoupled in space and time u implicit and content-based n Examples: Linda, Lime
22
Java Message Service (JMS) n Asynchronous messaging support for Java n Point-to-point messaging u One-to-one n Topic-based publish/subscribe u SQL for filtering messages at the topic event queue u One-to-many n Message types: u Map, Object, Stream, Text, and Bytes n Durable subscribers u Event stored at server if not deliverable n Transactions with rollback
23
Source: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
25
JMS messaging n JMS messaging proceeds in the following fashion: u Client obtains a Connection from a ConnectionFactory u Client uses the Connection to create a Session object u The Session is used to create MessageProducer and MessageConsumer objects, which are based on Destinations. u MessageProducers are used to produce messages that are delivered to destinations. u MessageConsumers are used to either poll or asynchronously consume (using MessageListeners) messages from producers.
26
Java 2 Platform Enterprise Edition (J2EE) n Specifications and practices for developing, deploying, and managing multi-tier server-centric applications u Builds on J2SE u Web Services support n Containers - separation of business logic from resource and lifecycle management u Enterprise JavaBeans (EJB) u Servlets n Java Message Service (JMS) u async. communication supports decoupling
27
Source: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
28
J2EE Technologies Java API for XML-Based RPC (JAX-RPC) JavaServer Pages Java Servlets Enterprise JavaBeans components J2EE Connector Architecture J2EE Management Model J2EE Deployment API Java Management Extensions (JMX) J2EE Authorization Contract for Containers Java API for XML Registries (JAXR) Java Message Service (JMS) Java Naming and Directory Interface (JNDI) Java Transaction API (JTA) CORBA JDBC data access API.
29
.NET n The.NET Framework is Microsoft's the next generation application platform u applications, services, web services,.. u Protocol stack and computing model for TCP/IP based distributed computing n Based on the CLR (Common Language Runtime) u JIT compiles and executed NET code n Components u.NET architecture,.NET Integrated Programming, Common Language Runtime (CLR),.NET System Class Libraries, Data and XML, Web Services / ASP+
30
.NET Architecture Source: MSDN
31
Mobile Middleware I n Middleware is typically designed and implemented for fixed-network hosts u High bandwidth, low latency, reliable communication u Persistent storage and sufficient computing power u No mobility n Mobile environment requires new solutions u Existing middleware services do not scale u Previous lectures: mobility is challenging u Small devices / embedded systems pose totally different challenges
32
Mobile Middleware II n Goals for middleware: u fault-tolerance, adaptability, heterogeneity,scalability, resource sharing n Mobile middleware u dynamically changing context u decoupled F events, tuple spaces u Basic solution for wireless F Use a proxy
33
Reflection n In general, middleware provides transparency to the underlying conditions u Location transparency in RPC/RMI n In mobile environments this is not always desired u Sometimes we need to know about location changes, QoS changes, etc. n Requirement for reflective middleware u Should expose APIs for querying / changing important parameters u Under development
34
NAF XML Security Objects Middleware IPv6 mobility, HIP Mobility Wireless CORBA Secure mobile XML routing Plain IPv4 J2ME
35
Examples n WAE n J2ME n Wireless CORBA n FUEGO
36
WAE n Wireless Application Environment (WAE) u A suite of protocols and specifications for optimizing data transfer for wireless communication n WAP stack u Focus on binary transmission u Protocols F WSP (Wireless Session Protocol) F WTP (Wireless Transaction Protocol) F WTLS (Wireless Transport Layer Security) more efficient than TLS, but no end-to-ned security F WDP (Wireless Datagram Protocol)
37
Comparison TCP/IP UDP/IP TCP/IP UDP/IP TLS - SSL HTTP HTML/JS Transport Layer (WDP) Bearers: SMS,CDMA,.. Security Layer (WTSL) Transaction Layer (WTP) Session Layer (WSP) WAE Other
38
Java 2 Platform Micro Edition (J2ME) n Java for consumer electronics and embedded devices n A virtual machine and a set of APIs n Configurations and profiles u Configurations F two-low level APIs and optimized VMs CDC, CLDC u Profiles F API specification on top of a configuration for complete runtime F Specify both APIs and Configurations F Profiles defined using Java Community Process (JCP)
39
Source: http://developers.sun.com/techtopics/mobility/getstart/articles/survey/
40
Wireless CORBA n CORBA does not support accessing mobile objects or wireless communication u Wireless CORBA specification n Three basic requirements u Invocations from mobile objects u Invocations to mobile objects u Wireless communication n Home bridge n Access bridges n Tunnelling over wireless n Handoff protocols
41
Mobile IP vs. WCORBA n MIP addresses host mobility, not object mobility n MIP does not specifically support wireless protocols n MIP hides all handoff events u location-aware services difficult to implement
42
Architecture Redirects requests for services on the terminal Keeps track of the current access bridge Other side end of the Access Bridge Encapsulate/decapsulates msgs Generates mobility events Encapsulates, forwards or ignores incoming GIOP messages Decapsulates and forwards messages from the GIOP tunnel Generates mobility events Lists available services Abstract transport-independent tunnel for GIOP messages Concrete tunnels for TCP/IP, UDP/IP and WAP WDP. Protocol requires reliable and ordered delivery
43
Handoffs n Network initiated handoff u started by an external application u optional to support make-before-break n Terminal initiated handoff u terminal discovered a new Access Bridge u make-before-break is required n Access recovery n The Home Location Agent is updated n Old Access Bridges are informed n Mobility events are generated in the visited domain and the terminal domain
44
Network Initiated Handoff
45
FUEGO CORE (HIIT) n Mobile and wireless environments have different requirements than desktop systems u User mobility, terminal mobility, connectivity, device characteristics, dynamic environments n Vision: A service application is distributed among various application servers, network elements and terminals n Three year Tekes project (2002-2004) u Industrial partners: Nokia, TeliaSonera, Elisa, Ericsson, Movial u Open source software n Demonstration at WMCSA 2004
46
FUEGO Architecture n The FUEGO middleware service set for mobile computing u Data communication F Efficient wireless SOAP F Efficient content-based routing (asynchronous events) u Data synchronization F 3-way XML document merging F XML-aware distributed file system u Applications F Presence service, mobile ticker, image-album
48
End-to-end authentication of hosts Encryption of network traffic using IPsec Mobility and multihoming support Resilient sockets End-to-end authentication of hosts Encryption of network traffic using IPsec Mobility and multihoming support Resilient sockets Reliable messaging Multiplexing multiple connections on TCP Prioritization of connections Reliable messaging Multiplexing multiple connections on TCP Prioritization of connections Efficient sync/async messaging Efficient XML serialization Persistent connections across mobility Efficient sync/async messaging Efficient XML serialization Persistent connections across mobility Expressive async. communication Content-based routing using filters Event buffering / mobility support Support for context-aware operation Expressive async. communication Content-based routing using filters Event buffering / mobility support Support for context-aware operation Automatic reconciliation of XML documents Optimized storage of XML Ad-hoc file sharing Integrates with existing file systems (NFS) Automatic reconciliation of XML documents Optimized storage of XML Ad-hoc file sharing Integrates with existing file systems (NFS) Presence service based on events Control of presence attribute visibility Presence service based on events Control of presence attribute visibility
49
FUEGO DEMO
50
Summary n Middleware u for application development and deployment u for supporting heterogeneous environments u Main communication paradigms: RPC/RMI, asynchronous events (publish/subscribe) u J2EE, CORBA,.. n Mobile middleware u Desktop middleware not usable on small, mobile devices u Special solutions are needed u J2ME, Wireless CORBA,..
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.