MACROMEDIA COLDFUSION 4.5-ADMINISTRING COLDFUSION SERVER Manual page 156

Table of Contents

Advertisement

134
the user always returns to the same server for the life of the session. ClusterCATS for
ColdFusion automatically handles this for you.
Another approach to solving the same problem is to store client variables in a back-
end common state repository. This approach enables all Web servers comprising the
cluster to access variables in a common, shared back-end data store, such as a
database. However, you must be aware that this approach can potentially impact your
site's performance.
Web developers must think through the various user scenarios in which application
session and state are affected and engineer appropriate mechanisms for elegantly
handling such situations. The three most common ways to handle session data are:
Client-side options consisting of cookies, hidden fields, a get list, or URL
parameters
Server-side session variables
Note
An open state repository consisting of either a common back-end database or
some other shared storage device
Whatever mechanism your architects and engineers use, it's important that they
anticipate the scenarios in which maintaining an application's state is vital to a good
user experience. See "Configuring session-aware load balancing" on page 207.
Single threaded vs. multi-threaded application connections
Another major issue that Web developers must consider when constructing their
applications is whether or not the application will be single-threaded or multi-
threaded. Threading refers to how the application responds to multiple user requests
for application services. If an application is single threaded, the application can only
handle a single user request for services at a time. If there are multiple requests for the
same service, they are put into a queue, and the application responds to each
individually in order. Single-threading is not a scalable approach for application
services that you anticipate will be used by many users simultaneously.
A multi-threaded application can handle multiple requests for the same application
service simultaneously by instantiating separate connections (threads) for each user
request. Applications that anticipate lots of concurrent multi-user activity should
ensure that the application functions are multi-threaded.
ColdFusion by default provides multi-threaded application services. However, if your
application contains particular functions that require single user interaction, such as
writing to shared application variables, you can easily restrict the function to be single
threaded by using the CFML tag,
Database locking and concurrency issues
Dynamic Web applications, those that allow users to modify a database, must ensure
appropriate database concurrency handling. Database concurrency handling refers to
Storing session data on the server requires that a simple identifier be
stored on the client, such as a cookie.
<cflock>
Administering ColdFusion Server
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents