Download presentation
Presentation is loading. Please wait.
1
Persistent State Service 1 Performance, Scalability and Management Topic Refining the object model Threading models Distributed callbacks Iterators Client-side cashing Monitoring performance
2
Persistent State Service 2 Refining the Object Model Functional model Logical composition of functionality Independent of actual distribution of objects and infrastructures Implementation model or design Association of logical objects with run-time entities
3
Persistent State Service 3 Room Booking Application Revisit “Meeting” from interface to struct View() Array of CORBA object references (100 to 600 bytes) Array of Java objects (~ 100 bytes) Accessing details of a Meeting Client makes two CORBA invocations on a remote Meeting object Client access local Java objects Booking a meeting Complex Create local object and pass it as an argument to a CORBA invocation Cancel a meeting Complex One CORBA invocation
4
Persistent State Service 4 Threading Models Threading in clients Multithreaded clients Client Server Object Implementation Client ProxyProxy Thread creates, starts delivers results
5
Persistent State Service 5 Threading in Servers How can a server handle hundreds or thousands of concurrent client? ORB provide automatic mechanisms for multithreaded servers Single-threaded servers Thread per connection Thread per request (thread pools)
6
Persistent State Service 6 Single-threaded Server Place incoming requests in a queue and process only one at a time Poor performance Potential of deadlocks (callback on a single-threaded client program) Client Server Object Implementation Client Proxy Client Client Proxy Client Client Proxy Object Adapter Worker thread
7
Persistent State Service 7 Thread-per-Connection Servers Use one worker thread for each network connection Client Server Object Implementation Client Proxy Client Client Proxy Client Client Proxy Object Adapter Worker thread Worker thread Worker thread
8
Persistent State Service 8 Thread-per-Request Servers Use one worker thread for each request Max num of threads Threads are returned to the pool after finishing processing requests Creating thread overhead is minimized Default model Client Server Object Implementation Client Proxy Client Client Proxy Client Client Proxy Object Adapter Worker thread Worker thread Worker thread Thread Pool
9
Persistent State Service 9 Thread-per-Request Servers Use one worker thread for each request Max num of threads Threads are returned to the pool after finishing processing requests Creating thread overhead is minimized Default model Client Server Object Implementation Client Proxy Client Client Proxy Client Client Proxy Object Adapter Worker thread Worker thread Worker thread Thread Pool
10
Persistent State Service 10 Distributed Callbacks Break a synchronous call that returns some data into a pair of calls, i.e., a request and a response Client Server Object Implementation Client ProxyCallback Object calls delivers results requestresponse module hello { interface Callback { oneway void responseHello(in string str); }; interface GoodDay { oneway void requestHello(in Callback cb); }
11
Persistent State Service 11 Iterators Transmission of large amount of data Lazy evaluation Pull and push Client Server Object Implementation Client ProxyIterator Handler calls delivers results initial invocationpull Pull Iterator creates
12
Persistent State Service 12 Iterators Push Client Server Object Implementation Client ProxyIterator Handler calls delivers results initial invocationpush Push Iterator creates
13
Persistent State Service 13 Client-Side Caching Cache data at the client side --- optimize communication Encapsulate the IDL-generated client proxy in a caching object Use extensions provided by some ORB implementation Client Proxy Client Cache Proxy Smart Proxy Client Proxy
14
Persistent State Service 14 Monitoring Performance Simple way: write code to take the time and compute the difference on both side Mixing performance code with other logic Make performance code conditional CORBA portable interceptors framework
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.