1.4.2 When to Use Multithreaded CORBA Servers
Designing an application to use multiple, independent threads provides concurrency within an application and can improve overall throughput. Using multiple threads enables applications to be structured efficiently with threads servicing several independent tasks in parallel. Multithreading is particularly useful when:
- There is a set of lengthy operations that do not necessarily depend on other processing.
- The amount of data to be shared is small and identifiable.
- You can break the task into various activities that can be executed in parallel.
- There are occasions where objects must be reentrant.
Some computer operations take a substantial amount of time to complete. A multithreaded application design can significantly reduce the wait time between the request and completion of operations. This is true in situations when operations perform a large number of I/O operations such as when accessing a database, invoking operations on remote objects, or are CPU-bound on a multiprocessor machine. Implementing multithreading in a server process can increase the number of requests a server processes in a fixed amount of time.
The primary requirement for multithreaded server applications is the simultaneous handling of multiple client requests. For more information on the requirements and benefits of using multithreaded servers, see Using Multithreaded Servers.
Parent topic: Using Multithreaded Servers