TECHNICAL FIELD

Various embodiments described herein relate to techniques for efficiently managing session state during a series of requests/responses and for managing execution of a process in a request/response framework, including for managing session state, and for suspending execution of an executing process. In some embodiments, when execution is suspended, execution state of the process (which may include session state) may be serialized and stored. Examples are described of approaches to using session state management techniques in implementing and operating server-side conversational agents, but other embodiments are not limited in this respect and the techniques could be used in other contexts.

BACKGROUND

In many client/server systems, there may be multiple client devices and/or client-side users interacting with the server side of a system. The load of interacting with the multiple client devices/users may be distributed between multiple different server-side processes, with each server-side process interacting with one or more client-side devices or users. Such server-side processes may each be an instance of a server-side application. The server-side processes may be run on one or more computing devices.

In some cases, one of the server-side cases may occasionally wait for input from one or more of the client-side devices/users. In such a case, a server-side process may not have tasks to perform, but may be maintained as an active and executing process by an operating system of a computing device on which the server-side process is running.

SUMMARY

In one embodiment, there is provided a method comprising instantiating a request/response application as at least a first process, the first process being associated with an execution state. The method further comprises, in response to receiving a request from the first process to suspend execution of the first process, serializing execution state of the first process and terminating the first process. The execution state comprises one or more data objects indicating a session state for a series of one or more request/response interactions between the request/response application and at least one other entity. Serializing the execution state comprises converting a first plurality of data objects of the execution state to a byte string. The first plurality of data objects comprise at least some of the one or more data objects indicating the session state. The method further comprises, in response to receiving a new request from the at least one other entity following terminating of the first process, instantiating the request/response application as at least a second process, deserializing the execution state of the first process, and configuring execution state of the second process based on the second plurality of data objects and the new request received from the at least one other entity. Deserializing the execution state comprises converting the byte string to a second plurality of data objects. The second plurality of data objects includes the at least some of the one or more data objects indicating the session state for the series of one or more request/response interactions of the request/response application.

In another embodiment, there is provided at least one computer-readable storage medium having encoded thereon executable instructions that, when executed by at least one processor, cause the at least one processor to carry out a method. The method comprises receiving a request to suspend execution of an executing process, the executing process being an instance of a request/response application and, in response to the request, serializing execution state of the executing process. Serializing the execution state comprises converting a plurality of data objects of the execution state to a byte string, wherein the plurality of data objects comprise one or more data objects indicating a session state for a series of one or more request/response interactions between the instance of the request/response application and at least one other entity. The method further comprises outputting the byte string and terminating the executing process.

In a further embodiment, there is provided an apparatus comprising at least one processor and at least one storage medium having encoded thereon executable instructions that, when executed by at least one processor, cause the at least one processor to carry out a method. The method comprises serializing execution state of an executing process, the executing process being an instance of a request/response application and corresponding to a session between the request/response application and at least one other entity. The execution state comprises a first plurality of data objects, the first plurality of data objects comprising one or more data objects indicating a session state for the session. The session state indicates at least a result of a series of one or more request/response interactions of the request/response application and the at least one other entity. The serializing comprises identifying, in the first plurality of data objects of the execution state, one or more second data objects that are global variables for the request/response application, and converting at least some of the first plurality of data objects to a byte string, wherein the converting comprises refraining from converting the one or more second data objects that are global variables.

The foregoing is a non-limiting summary of the invention, which is defined by the attached claims.

