Process pooling for application services
Aspects of the present disclosure relate to process pooling for application services. In examples, a pool of utility processes is maintained, such that a preexisting utility process is identified from the process pool based on a set of criteria and used to host a service accordingly (e.g., in response to a service request from an application or other software). In instances where the process pool does not include a utility process that matches the set of criteria, a new utility process may be created and used to host the service. Further, the new utility process may be added to the process pool, such that a future service having the same or a similar associated set of criteria may be hosted using the new utility process accordingly.
1 . A system comprising:
at least one processor; and
memory storing instructions that, when executed by the at least one processor, cause the system to perform a set of operations, the set of operations comprising:
receiving, from an application, a request for processing by a service;
determining, based on a set of criteria associated with the request, whether a process pool of utility processes for hosting services for the application includes a utility process with which to host the service;
based on determining the process pool does not include a utility process with which to host the service, generating a new utility process for the service based on the set of criteria; and
configuring the new utility process to host the service for the application, wherein the new utility process is separate from a main process of the application, and wherein the configuring comprises establishing an inter-process communication channel between the application and the new utility process.
2 . The system of claim 1 , wherein the set of operations further comprises:
based on determining the process pool includes a utility process with which to host the service, configuring the utility process of the process pool to host the service for the application.
3 . The system of claim 1 , wherein the set of operations further comprises:
based on determining the process pool includes a utility process with which to host the service, determining whether the utility process can be used to host the service; and
based on determining the utility process cannot be used to host the service:
generating a second utility process; and
configuring the second utility process to host the service for the application.
4 . The system of claim 3 , wherein determining whether the utility process can be used to host the service comprises determining whether the utility process has exceeded a resource limit.
5 . The system of claim 1 , wherein the set of operations further comprises adding the new utility process to a process pool map that includes an association between the new utility process and a utility process descriptor for the utility process.
6 . The system of claim 5 , wherein determining whether the process pool includes a utility process with which to host the service comprises evaluating the process pool map based on the set of criteria.
7 . A method for process pooling, the method comprising:
receiving, from an application, a request for processing by a service;
determining, based on the request, a set of criteria for a utility process with which to host the service;
identifying, from a process pool of utility processes for hosting services for the application and based on the determined set of criteria, a preexisting utility process to host the service; and
configuring the identified preexisting utility process to host the service for the application, wherein the identified preexisting utility process is separate from a main process of the application, and wherein the configuring comprises establishing an inter-process communication channel between the application and the identified preexisting utility process.
8 . The method of claim 7 , wherein the set of criteria comprises at least one of:
security criteria;
privacy criteria; or
reliability criteria.
9 . The method of claim 7 , wherein the set of criteria is determined based on at least one of the application or content of the application.
10 . The method of claim 9 , wherein the application is a web browsing application and the content is a website.
11 . The method of claim 10 , wherein:
the request is a first request that is associated with a first website;
the service is a first service; and
the method further comprises:
receiving a second request for processing by a second service, wherein the second request is associated with a second website;
determining, based on a set of criteria associated with the second website, that the process pool does not include a utility process with which to host the second service; and
generating a new utility process for the second service based on the set of criteria associated with the second website.
12 . The method of claim 11 , wherein the set of criteria associated with the second website indicates a higher security level than the set of criteria associated with the first website.
13 . A method for process pooling, the method comprising:
receiving, from an application, a request for processing by a service;
determining, based on a set of criteria associated with the request, whether a process pool of utility processes for hosting services for the application includes a utility process with which to host the service;
based on determining the process pool does not include a utility process with which to host the service, generating a new utility process for the service based on the set of criteria; and
configuring the new utility process to host the service for the application, wherein the new utility process is separate from a main process of the application, and wherein the configuring comprises establishing an inter-process communication channel between the application and the new utility process.
14 . The method of claim 13 , wherein:
the request is a first request;
the service is a first service; and
the method further comprises:
receiving a second request for processing by a second service;
determining, based on a set of criteria associated with the second request, whether the process pool includes a utility process with which to host the second service; and
based on determining the process pool includes a utility process with which to host the second service, configuring the utility process of the process pool to host the second service.
15 . The method of claim 13 , wherein determining that the process pool does not include a utility process with which to host the service comprises:
identifying a utility process of the process pool that matches the set of criteria; and
determining the identified utility process cannot be used to host the service.
16 . The method of claim 15 , wherein determining the identified utility process cannot be used to host the service comprises determining that the utility process has exceeded a resource limit.
17 . The method of claim 13 , further comprising adding the new utility process to a process pool map that includes an association between the new utility process and a utility process descriptor for the utility process.
18 . The method of claim 17 , wherein determining whether the process pool includes a utility process with which to host the service comprises evaluating the process pool map based on the set of criteria.