Method for inter-process communication between at least two processes
AssigneeBull SAS
InventorThomas Goncalves
Life of this patent
Estimating the term…
Abstract
An inter-process communication method for remote processes. The method implements a resource allocation mechanism via a token system that allows a communication operation to be performed only when the target process of the operation has available resources. Each operation costs one token. Tokens are consumed locally and obtained by remote request. This maximizes chances of successful operations and minimizes the bandwidth used to manage these operations.
Claims11
A method for inter-process communication between at least two processes, each process of said at least two processes being hosted by a node on a communication network, the node further hosting a further process including a resource manager, wherein the resource manager includes at least one resource counter for a target process of a communication, the method comprising:
- emission by a first process of a first node, to a resource manager of the first node, a business request for a second process of a second node;
- verification by the resource manager of the first node, that there is locally at least one token associated with the second process:
- if there is a local token then:
- the business request is transmitted to the second process;
- a number of local tokens associated with the second process is decreased by one by the resource manager of the first node;
- a number of remote tokens associated with the second process is increased by one by a resource manager of the second node;
- if there is no local token:
- emission by the resource manager of the first node, to the resource manager of the second node, a first allocation request for tokens associated with the second process, the first allocation request including a parameter N representing a number of tokens requested;
- reception by the resource manager of the first node a response to the first allocation request, the response including a parameter M representing a number of remote tokens associated with the second process prior to receiving the first allocation request;
- evaluating a value of M−N:
- if the value of M−N is greater than or equal to a predetermined threshold then the resource manager of the first node increases the number of local tokens associated with the second process by N and returns to the verification;
- if the value of M−N is less than the predetermined threshold then the value of M is evaluated:
- if the value of M is greater than the predetermined threshold then the resource manager of the first node transmits a second allocation request with a parameter having a value of M−N, increases the number of local tokens by M, returns to the verification;
- if the value of M is less than or equal to the predetermined threshold then, the resource manager of the first node:
- emits, to the resource manager of the second node, a third allocation request for the second process with a parameter having a value of −N,
- emits, to the resource manager of the second node, a notification that it is waiting for N tokens for the second process;
- places itself in a state of waiting for a response to the notification;
- when it receives a response to the notification, the notification includes a parameter N′ representing the number of tokens allocated, the resource manager of the first node increases the number of local tokens associated with the second process by N′ and returns to the verification.
A non-transitory computer program for performing inter-process communications configured to implement an inter-process communication method between at least two processes, each process of said at least two processes being hosted by a node on a communication network, the node further hosting a further process including a resource manager, wherein the resource manager includes at least one resource counter for a target process of a communication, the inter-process communication method comprising:
- emission by a first process of a first node, to a resource manager of the first node, a business request for a second process of a second node;
- verification by the resource manager of the first node, that there is locally at least one token associated with the second process:
- if there is a local token then:
- the business request is transmitted to the second process;
- a number of local tokens associated with the second process is decreased by one by the resource manager of the first node;
- a number of remote tokens associated with the second process is increased by one by a resource manager of the second node;
- if there is no local token:
- emission by the resource manager of the first node, to the resource manager of the second node, a first allocation request for tokens associated with the second process, the first allocation request including a parameter N representing a number of tokens requested;
- reception by the resource manager of the first node a response to the first allocation request, the response including a parameter M representing a number of remote tokens associated with the second process prior to receiving the first allocation request;
- evaluating a value of M−N:
- if the value of M−N is greater than or equal to a predetermined threshold then the resource manager of the first node increases the number of local tokens associated with the second process by N and returns to the verification;
- if the value of M−N is less than the predetermined threshold then the value of M is evaluated:
- if the value of M is greater than the predetermined threshold then the resource manager of the first node transmits a second allocation request with a parameter having a value of M −N, increases the number of local tokens by M, returns to the verification;
- if the value of M is less than or equal to the predetermined threshold then, the resource manager of the first node:
- emits, to the resource manager of the second node, a third allocation request for the second process with a parameter having a value of −N,
- emits, to the resource manager of the second node, a notification that it is waiting for N tokens for the second process;
- places itself in a state of waiting for a response to the notification;
- when it receives a response to the notification, the notification includes a parameter N′ representing the number of tokens allocated, the resource manager of the first node increases the number of local tokens associated with the second process by N′ and returns to the verification.
A non-transitory recording medium on which a non-transitory computer program is recorded for performing inter-process communications configured to implement an inter-process communication method between at least two processes, each process of said at least two processes being hosted by a node on a communication network, the node further hosting a further process including a resource manager, wherein the resource manager includes at least one resource counter for a target process of a communication, the inter-process communication method comprising:
- emission by a first process of a first node, to a resource manager of the first node, a business request for a second process of a second node;
- verification by the resource manager of the first node, that there is locally at least one token associated with the second process:
- if there is a local token then:
- the business request is transmitted to the second process;
- a number of local tokens associated with the second process is decreased by one by the resource manager of the first node;
- a number of remote tokens associated with the second process is increased by one by a resource manager of the second node;
- if there is no local token:
- emission by the resource manager of the first node, to the resource manager of the second node, a first allocation request for tokens associated with the second process, the first allocation request including a parameter N representing a number of tokens requested;
- reception by the resource manager of the first node a response to the first allocation request, the response including a parameter M representing a number of remote tokens associated with the second process prior to receiving the first allocation request;
- evaluating a value of M−N:
- if the value of M−N is greater than or equal to a predetermined threshold then the resource manager of the first node increases the number of local tokens associated with the second process by N and returns to the verification;
- if the value of M−N is less than the predetermined threshold then the value of M is evaluated:
- if the value of M is greater than the predetermined threshold then the resource manager of the first node transmits a second allocation request with a parameter having a value of M −N, increases the number of local tokens by M, returns to the verification;
- if the value of M is less than or equal to the predetermined threshold then, the resource manager of the first node:
- emits, to the resource manager of the second node, a third allocation request for the second process with a parameter having a value of −N,
- emits, to the resource manager of the second node, a notification that it is waiting for N tokens for the second process;
- places itself in a state of waiting for a response to the notification;
- when it receives a response to the notification, the notification includes a parameter N′ representing the number of tokens allocated, the resource manager of the first node increases the number of local tokens associated with the second process by N′ and returns to the verification.
Dependencies are inferred from the claim text.