Method and apparatus for high performance access to data in a message store
First Claim
1. A method of accessing electronic mail messages stored in a message store, the method comprising:
- receiving a connection request at a request routing process;
determining whether a multi-threaded request handling process has an available connection thread for handling a connection corresponding to the connection request;
transferring responsibility for the connection request to a selected multi-threaded request handling process;
initializing a selected connection thread within the selected multi-threaded request handling process to manage the connection;
managing client requests for accessing the electronic mail messages stored within the message store using the selected connection thread;
running a critical signal thread in the selected multi-threaded request handling process; and
terminating by the critical signal thread the selected connection thread when the selected connection thread caused the critical signal such that only the selected connection thread terminates and other connection threads in the selected multi-threaded request handling process remain functional.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus are disclosed for accessing messages in a message store in a multi-threaded system with reduced contention by first determining whether a process is available for accepting a new connection and responsibility for that connection is transferred to that process, which includes one or more threads. One thread is selected and initialized which then manages client requests for accessing messages or data in the message store. The thread is terminated when a termination request is received or when a predetermined condition has been met. Also provided is a computer system for accessing messages in a message store in a multi-threaded environment with reduced contention. Clients are connected to a connection request router that contains a parent process for routing client requests for manipulating data. Also included are request handlers associated with the request router where the request handlers include a multiplicity of active connection threads. A shared memory area associated with the request router contains request handler identifiers, thread identifiers, and other activity information that can be shared by the request handlers and their associated request router.
39 Citations
24 Claims
-
1. A method of accessing electronic mail messages stored in a message store, the method comprising:
-
receiving a connection request at a request routing process;
determining whether a multi-threaded request handling process has an available connection thread for handling a connection corresponding to the connection request;
transferring responsibility for the connection request to a selected multi-threaded request handling process;
initializing a selected connection thread within the selected multi-threaded request handling process to manage the connection;
managing client requests for accessing the electronic mail messages stored within the message store using the selected connection thread;
running a critical signal thread in the selected multi-threaded request handling process; and
terminating by the critical signal thread the selected connection thread when the selected connection thread caused the critical signal such that only the selected connection thread terminates and other connection threads in the selected multi-threaded request handling process remain functional. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 24)
searching for the request handling process with less than a predetermined number of active connection threads by scanning a list of request handling processes contained in the request routing process; and
creating a new request handling process if substantially all existing request handling processes contain a predetermined number of connection threads.
-
-
5. A method as recited in claim 1 wherein initializing a selected connection thread within the selected request handling process further includes:
allocating a cell corresponding to the selected connection thread in a shared memory for storing a request handler process identifier and a connection thread identifier.
-
6. A method as recited in claim 1 wherein initializing a selected connection thread within the selected request handling process further includes:
associating the selected connection thread with an input polling thread in the selected request handling process and placing the connection thread in a wait state.
-
7. A method as recited in claim 1 wherein managing client requests further includes:
-
alerting the selected request handling process of an incoming client request; and
routing the incoming client request to the connection thread associated with the selected request handling process for processing.
-
-
8. A method as recited in claim 7 wherein alerting the selected request handling process of an incoming client request further includes running an input polling thread for detecting when the incoming client request is received by the selected request handling process.
-
24. The method as recited in claim 1, wherein the client requests comprise at least one of a COPY command, DELETE command, READ command, MOVE command, and FETCH command.
-
9. A computer system for accessing electronic mail messages stored in a message store, the system comprising:
-
a request router suitable for accepting message store connection requests from a plurality of clients;
a plurality of multi-threaded request handlers associated with the request router, each one of the plurality of multi-threaded request handlers being suitable for maintaining a multiplicity of connection threads, each of the multiplicity of connection threads being adapted for managing client requests for accessing the electronic mail messages stored within the message store;
a shared memory associated with the request router, the shared memory including request handler identifiers and connection thread identifiers, the shared memory being accessible by the request handlers such that one such request handler can share activity information associated with the request handler with other request handlers, the activity information associated with the request handler indicating activity of the request handler; and
wherein each one of the plurality of request handlers further includes a critical signal thread detecting one or more critical signals directed to a particular active connection thread within such request handler, wherein the critical signal thread terminates only the particular active connection thread that caused one of the detected critical signals, thereby keeping other active connection threads in the request handler functioning. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A computer system for accessing electronic mail messages stored in a message store, the system comprising:
-
means for accepting message store connection requests from a plurality of clients;
means for maintaining a multiplicity of connection threads; and
a shared memory including one or more request handler identifiers identifying one or more request handlers and one or more connection thread identifiers identifying one or more connection threads, the shared memory being accessible by a plurality of request handlers such that one request handler in the plurality of request handlers can share activity information indicating activity of the one request handler with one or more other request handlers in the plurality of request handlers;
wherein each means for accepting message store connection requests further includes means for detecting critical signals directed to a particular active connection thread, wherein the critical signal thread terminates only the particular active connection thread that caused a detected critical signal, thereby keeping other active connection threads functioning. - View Dependent Claims (16, 17, 18)
-
-
19. A computer-readable medium containing programming instructions for accessing electronic mail messages in a message store, the computer-readable medium comprising computer program code devices configured to cause a computer to execute the steps of:
-
receiving a connection request at a request routing process;
determining whether a multi-threaded request handling process has an available connection thread for handling a connection corresponding to the connection request;
transferring responsibility for the connection request to a selected multi-threaded request handling process;
initializing a selected connection thread within the selected multi-threaded request handling process to manage the connection;
managing client requests for accessing electronic mail messages stored within the message store wherein the selected connection thread is responsible for managing the client requests for accessing electronic mail messages; and
terminating the selected connection thread when either a termination request is received or when a predetermined condition has been met;
wherein the computer program code devices configured to cause a computer to manage client requests further includes computer program code devices configured to cause a computer to execute the steps of running a critical signal thread in the selected request handling process for managing critical signals directed to an active connection thread in the selected request handling process such that only the active connection thread that caused a critical signal terminates and other connection threads in the selected request handling process remain functional. - View Dependent Claims (20, 21, 22, 23)
determining whether a request handling process with less than a predetermined number of active connection threads exists by scanning a list of request handling processes contained in the request routing process; and
creating a new request handling process if all existing request handling processes contain a predetermined number of connection threads.
-
-
21. A computer-readable medium as recited in claim 19 wherein the computer program code devices configured to cause a computer to initialize a selected connection thread within the selected request handling process further includes computer program code devices configured to cause a computer to execute the step of allocating a cell corresponding to the selected connection thread in a shared memory for storing a request handler process identifier and a connection thread identifier.
-
22. A computer-readable medium as recited in claim 19 wherein the computer program code devices configured to cause a computer to manage client requests further includes computer program code devices configured to cause a computer to execute the steps of:
-
alerting the selected request handling process of an incoming client request; and
routing the incoming client request to the connection thread associated with the selected request handling process for processing.
-
-
23. A computer-readable medium as recited in claim 19 wherein the computer program code devices configured to cause a computer to alert the selected request handling process of an incoming client request further includes computer program code devices configured to cause a computer to execute the steps of running an input polling thread detecting when the incoming client request is received by the selected request handling process.
Specification