Presentation is loading. Please wait.

Presentation is loading. Please wait.

Performance Management 1 Performance, Scalability and Management  Topic  Refining the object model  Threading models  Distributed callbacks  Iterators.

Similar presentations


Presentation on theme: "Performance Management 1 Performance, Scalability and Management  Topic  Refining the object model  Threading models  Distributed callbacks  Iterators."— Presentation transcript:

1 Performance Management 1 Performance, Scalability and Management  Topic  Refining the object model  Threading models  Distributed callbacks  Iterators  Client-side cashing  Monitoring performance

2 Performance Management 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 Performance Management 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 Performance Management 4 Threading Models  Threading in clients  Multithreaded clients Client Server Object Implementation Client ProxyProxy Thread creates, starts delivers results

5 Performance Management 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 Performance Management 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 Performance Management 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 Performance Management 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 Performance Management 9 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); }

10 Performance Management 10 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

11 Performance Management 11 Iterators  Push Client Server Object Implementation Client ProxyIterator Handler calls delivers results initial invocationpush Push Iterator creates

12 Performance Management 12 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

13 Performance Management 13 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


Download ppt "Performance Management 1 Performance, Scalability and Management  Topic  Refining the object model  Threading models  Distributed callbacks  Iterators."

Similar presentations


Ads by Google