Most server processing is driven by client interaction. However, some tasks are best performed asynchronously. For example, you may need to maintain copies of cached data retrieved from a slower source, update search indexes on a regular schedule, or perform lengthy calculations. EAServer provides two vehicles to support asynchronous processing:
Service components can be used for processing that must run continuously for the life of the server process, or must be performed once each time the server is started. Service components run in a thread that is started when the server starts. See Chapter 33, “Creating Service Components,” in the EAServer Programmer’s Guide for more information.
The EAServer thread manager allows you to run threads at any time. Threads started by the thread manager execute independently of the client or component that starts them, and can be configured to run once or periodically at regular intervals. See Chapter 32, “Using the Thread Manager,” in the EAServer Programmer’s Guide for more information.
EAServer’s C++ component model allows you incorporate legacy C and C++ business logic code into a component. However, if legacy code is unstable, it can cause the server to crash.
Beginning in version 4.0, you can configure C++ components to execute within a dedicated external process. EAServer spawns a subprocess to execute the component, and issues component invocations using interprocess communication. See Chapter 14, “Creating CORBA C++ Components,” in the EAServer Programmer’s Guide for more information.
Copyright © 2003. Sybase Inc. All rights reserved. |
![]() |