Most server processing is driven by client interaction. However, some tasks are best performed asynchronously; for example, maintaining copies of cached data retrieved from a slower source, updating search indexes on a regular schedule, or performing 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.
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.
The EAServer component model allows you incorporate legacy business logic code into a component. However, if legacy code is unstable, it can cause the server to crash.
Stateless components of any type can run externally, with full access to server-side features such as cached connections. When you mark a component to run externally, EAServer runs it in a separate server process. You can identify which external server runs the component, and assign groups of related components to run in the same external server. EAServer starts the external server when required, and restarts the server if it stops responding.
See “Running components externally” in Chapter 4, “Defining Components,” in the EAServer Programmer’s Guide.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |