Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
ALLOCATING OR ANNOUNCING AVAILABILITY OF A SOFTWARE CONTAINER
Document Type and Number:
WIPO Patent Application WO/2016/195562
Kind Code:
A1
Abstract:
It is provided a method for allocating a software container executing on a server of a set of servers. The method is performed in a container allocator and comprising the steps of: receiving a request to invoke a software container for a client; calculating a lookup key associated with the software container; performing a lookup in a distributed peer-to-peer repository using the lookup key, giving a result set of active software containers; selecting one software container from the set of software containers; and connecting to the selected software container to allocate the selected software container to the client.

Inventors:
KRISTIANSSON JOHAN (SE)
ESPLING DANIEL (SE)
LUNDBERG JONAS (SE)
SANDGREN NICKLAS (SE)
Application Number:
PCT/SE2015/050749
Publication Date:
December 08, 2016
Filing Date:
June 26, 2015
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ERICSSON TELEFON AB L M (PUBL) (SE)
International Classes:
G06F9/50
Domestic Patent References:
WO2014171810A22014-10-23
Foreign References:
US20140280433A12014-09-18
US20120179778A12012-07-12
Other References:
CHUNYI PENG ET AL: "VDN: Virtual machine image distribution network for cloud data centers", INFOCOM, 2012 PROCEEDINGS IEEE, IEEE, 25 March 2012 (2012-03-25), pages 181 - 189, XP032178917, ISBN: 978-1-4673-0773-4, DOI: 10.1109/INFCOM.2012.6195556
RAJIV RANJAN ET AL: "Peer-to-Peer Cloud Provisioning: Service Discovery and Load-Balancing", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 10 December 2009 (2009-12-10), XP080381624
DUA RAJDEEP ET AL: "Virtualization vs Containerization to Support PaaS", 2014 IEEE INTERNATIONAL CONFERENCE ON CLOUD ENGINEERING, IEEE, 11 March 2014 (2014-03-11), pages 610 - 614, XP032647689, DOI: 10.1109/IC2E.2014.41
Attorney, Agent or Firm:
EGRELIUS, Fredrik (Patent Unit Kista DSM, Stockholm, SE)
Download PDF:
Claims:
CLAIMS

1. A method for allocating a software container (2) executing on a server (4) of a set of servers, the method being performed in a container allocator (1) and comprising the steps of:

receiving (40) a request to invoke a software container for a client (5); calculating (42) a lookup key associated with the software container (2); performing (44) a lookup in a distributed peer-to-peer repository (10) using the lookup key, giving a result set (20) of active software containers (2); selecting (46) one software container (2) from the set of software containers (2); and

connecting (47) to the selected software container to allocate the selected software container to the client (5).

2. The method according to claim 1, further comprising the step of:

when the software container is successfully allocated to the client (5), removing (48) the allocated software container from the repository (10).

3. The method according to any one of the preceding claims, wherein the distributed repository is based on a distributed hash table.

4. The method according to any one of the preceding claims, further comprising the step of:

starting (43) a fallback software container in a server (4) of the set of servers.

5. The method according to claim 4, further comprising the step of:

when the software container fails to be allocated to the client (5), connecting (49) to the fallback software container to allocate the fallback software container to the client (5).

6. The method according to claim 5, wherein the step of selecting (46) and connecting (47) are repeated a predetermined number times and wherein the software container is determined to fail to be allocated to the client (5) when none of the instances of connecting to the selected software container results in a successful allocation to the client (5).

7. A container allocator (1) configured to allocate a software container (2) executing on a server (4) of a set of servers, the container allocator

comprising:

a processor (60); and

a memory (64) storing instructions (66) that, when executed by the processor, cause the container allocator (1) to:

receive a request to invoke a software container for a client (5);

calculate a lookup key associated with the software container (2);

perform a lookup in a distributed peer-to-peer repository (10) using the lookup key, giving a result set (20) of active software containers (2);

select one software container (2) from the set of software containers (2); and

connect to the selected software container to allocate the selected software container to the client (5).

8. The container allocator (1) according to claim 7, further comprising instructions (66) that, when executed by the processor, cause the container allocator (1) to: when the software container is successfully allocated to the client (5), removing the allocated software container from the repository (10).

9. The container allocator (1) according to claim 7 or 8, wherein the distributed repository is based on a distributed hash table.

10. The container allocator (1) according to any one of claims 7 to 9, further comprising instructions (66) that, when executed by the processor, cause the container allocator (1) to: start a fallback software container in a server (4) of the set of servers.

11. The container allocator (1) according to claim 10, further comprising instructions (66) that, when executed by the processor, cause the container allocator (1) to: when the software container fails to be allocated to the client (5), connect to the fallback software container to allocate the fallback software container to the client (5).

12. The container allocator (1) according to claim 11, further comprising instructions (66) that, when executed by the processor, cause the container allocator (1) to repeat the instructions to select and connect a predetermined number times and to determine the software container to have failed to be allocated to the client (5) when none of the instances of connecting to the selected software container results in a successful allocation to the client (5).

13. A container allocator (1) comprising:

means for receiving a request to invoke a software container for a client

(5);

means for calculating a lookup key associated with the software container (2);

means for performing a lookup in a distributed peer-to-peer repository (10) using the lookup key, giving a result set (20) of active software

containers (2) executing on respective servers of a set of servers;

means for selecting one software container (2) from the set of software containers (2); and

means for connecting to the selected software container to allocate the selected software container to the client (5).

14. A computer program (91) for allocating a software container (2) executing on a server (4) of a set of servers, the computer program

comprising computer program code which, when run on a container allocator (1) cause the container allocator (1) to:

receive a request to invoke a software container for a client (5);

calculate a lookup key associated with the software container (2);

perform a lookup in a distributed peer-to-peer repository (10) using the lookup key, giving a result set (20) of active software containers (2);

select one software container (2) from the set of software containers (2); and connect to the selected software container to allocate the selected software container to the client (5).

15. A computer program product (90) comprising a computer program according to claim 14 and a computer readable means on which the computer program is stored.

16. A method for announcing availability of a software container, the method being performed in a server (4), the method comprising the steps of: initialising (51) execution of the software container in the server;

calculating (52) a lookup key associated with the software container (2); storing (54) an address of the server in association with the lookup key in a distributed peer-to-peer repository (10);

receiving (56) a connection request to allocate the software container to a client (5); and

transmitting (58) an allocation acceptance message. 17. The method according to claim 16, further comprising the step of:

removing (59) the allocated software container from the repository (10).

18. The method according to claim 11, further comprising the step of:

when the client (5) releases communication with the server, ending (59) execution of the software container. 19. The method according to claim 16 or 18, wherein the distributed repository is based on a distributed hash table.

20. The method according to any one of claims 16 to 19, further comprising the step of:

injecting (50) an allocation agent in the software container, the allocation agent being a software process configured to perform the mentioned steps.

21. A server (4) configured to announce availability of a software container, the server (4) comprising:

a processor (70); and a memory (74) storing instructions (76) that, when executed by the processor, cause the server (4) to:

initialise execution of the software container in the server;

calculate a lookup key associated with the software container (2);

store an address of the server in association with the lookup key in a distributed peer-to-peer repository (10);

receive a connection request to allocate the software container to a client (5); and

transmit an allocation acceptance message. 22. The server (4) according to claim 11, further comprising instructions (76) that, when executed by the processor, cause the server (4) to: end execution of the software container when the client (5) releases

communication with the server.

23. The server (4) according to claim 21 or 22, wherein the distributed repository is based on a distributed hash table.

24. The server (4) according to any one of claims 21 to 23, the server further comprising instructions that, when executed by the processor, cause the server to inject an allocation agent (11) in the software container, the allocation agent (11) being a software process configured to perform the mentioned instructions.

25. A server (4) comprising:

means for initialising execution of a software container in the server; means for calculating a lookup key associated with the software container (2);

means for storing an address of the server in association with the lookup key in a distributed peer-to-peer repository (10);

means for receiving a connection request to allocate the software container to a client (5); and

means for transmitting an allocation acceptance message.

26. A computer program (91) for announcing availability of a software container, the computer program comprising computer program code which, when run on a server (4) cause the server (4) to:

initialise execution of the software container in the server;

calculate a lookup key associated with the software container (2);

store an address of the server in association with the lookup key in a distributed peer-to-peer repository (10);

receive a connection request to allocate the software container to a client (5); and

transmit an allocation acceptance message.

27. A computer program product (90) comprising a computer program according to claim 26 and a computer readable means on which the computer program is stored.

Description:
ALLOCATING OR ANNOUNCING AVAILABILITY OF A

SOFTWARE CONTAINER

TECHNICAL FIELD

The invention relates to methods, a container allocator, a server, computer programs and computer program products for allocating a software container or announcing availability of a software container.

BACKGROUND

Recently, microservices have become a popular architecture to build modern Web services. By breaking down a complex monolithic application into small independent services it becomes possible to develop services that are more resilient to error and more scalable. For example, if a particular microservice would fail, it would not affect the entire service. However, if a component part of a monolithic service would fail, the entire service would have to be restarted. Also, the only way to scale a monolithic service is to duplicate the whole monolith by adding more instances of it. In a microservice based architecture on the other hand, only the services that need to be scaled need to be duplicated.

Software containers are commonly used to implement microservice-based architectures and make sure services can run independently of each other. In contrast to virtual machines, software containers are more lightweight and can instantly be started, similar to standard Unix processes, assuming the server has all images required to start the container. Another advantage is that software containers provide a reliable execution environment allowing developers to develop and test their services locally on their machine and then upload the image to a cloud platform and still be sure the containers behave similarly as running them locally.

Docker is an example of a container runtime that has recently gained popularity. By allowing container images to be stacked in a so-called union file system, container images can more efficiently be distributed. However, when adopting a microservice based container architecture, designers and developers still need to figure out how to manage the life cycle of individual components, for example when to start a new service, when to scale it, how to handle fault recovery and so on. Additionally, a general problem with current container based architectures is that it takes time to start new containers. This is particularly a problem when using cluster management platforms such as Apache Mesos where the startup delay can vary from a couple of seconds up to several minutes depending if the selected server in the cluster already has the necessary container images required to start the container in local storage or not. Without taking precautionary actions, a fresh new server added to the cluster has typically no container images at all, and will thus cause a significant delay. Also, finding a suitable server in the cluster for running the container as well as starting it up adds to the delay. From a user perspective, the service should start without noticeable delay or at least with acceptable delay. To give a perspective, a common practice is to minimize the size of JavaScript code loaded by Web browser to more quickly start a Web application. Waiting several minutes for deploying a container would in many cases not be a practical solution. Consequently, adopting a design principle where containers are started on demand would not be possible in such a case.

SUMMARY

It is an object to enable lower start-up times for software containers.

According to a first aspect, it is provided a method for allocating a software container executing on a server of a set of servers. The method is performed in a container allocator and comprising the steps of: receiving a request to invoke a software container for a client; calculating a lookup key associated with the software container; performing a lookup in a distributed peer-to- peer repository using the lookup key, giving a result set of active software containers; selecting one software container from the set of software containers; and connecting to the selected software container to allocate the selected software container to the client.

According to a second aspect, it is provided a container allocator configured to allocate a software container executing on a server of a set of servers. The container allocator comprises: a processor; and a memory storing

instructions that, when executed by the processor, cause the container allocator to: receive a request to invoke a software container for a client; calculate a lookup key associated with the software container; perform a lookup in a distributed peer-to-peer repository using the lookup key, giving a result set of active software containers; select one software container from the set of software containers; and connect to the selected software container to allocate the selected software container to the client.

According to a third aspect, it is provided a container allocator comprising: means for receiving a request to invoke a software container for a client; means for calculating a lookup key associated with the software container; means for performing a lookup in a distributed peer-to-peer repository using the lookup key, giving a result set of active software containers executing on respective servers of a set of servers; means for selecting one software container from the set of software containers; and means for connecting to the selected software container to allocate the selected software container to the client.

According to a fourth aspect, it is provided a computer program for allocating a software container executing on a server of a set of servers. The computer program comprises computer program code which, when run on a container allocator cause the container allocator to: receive a request to invoke a software container for a client; calculate a lookup key associated with the software container; perform a lookup in a distributed peer-to-peer repository using the lookup key, giving a result set of active software containers; select one software container from the set of software containers; and connect to the selected software container to allocate the selected software container to the client. According to a fifth aspect, it is provided a computer program product comprising a computer program according to the fourth aspect and a computer readable means on which the computer program is stored.

According to a sixth aspect, it is provided a method for announcing availability of a software container. The method is performed in a server, and comprises the steps of: initialising execution of the software container in the server; calculating a lookup key associated with the software container;

storing an address of the server in association with the lookup key in a distributed peer-to-peer repository; receiving a connection request to allocate the software container to a client; and transmitting an allocation acceptance message.

According to a seventh aspect, it is provided a server configured to announce availability of a software container. The server comprises: a processor; and a memory storing instructions that, when executed by the processor, cause the server to: initialise execution of the software container in the server; calculate a lookup key associated with the software container; store an address of the server in association with the lookup key in a distributed peer-to-peer repository; receive a connection request to allocate the software container to a client; and transmit an allocation acceptance message. According to an eighth aspect, it is provided a server comprising: means for initialising execution of a software container in the server; means for calculating a lookup key associated with the software container; means for storing an address of the server in association with the lookup key in a distributed peer-to-peer repository; means for receiving a connection request to allocate the software container to a client; and means for transmitting an allocation acceptance message.

According to a ninth aspect, it is provided a computer program for

announcing availability of a software container, the computer program comprises computer program code which, when run on a server cause the server to: initialise execution of the software container in the server; calculate a lookup key associated with the software container; store an address of the server in association with the lookup key in a distributed peer-to-peer repository; receive a connection request to allocate the software container to a client; and transmit an allocation acceptance message. According to a tenth aspect, it is provided a computer program product comprising a computer program according to the ninth aspect and a computer readable means on which the computer program is stored.

Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to "a/an/the element, apparatus, component, means, step, etc." are to be interpreted openly as referring to at least one instance of the element, apparatus, component, means, step, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated. BRIEF DESCRIPTION OF THE DRAWINGS

The invention is now described, by way of example, with reference to the accompanying drawings, in which:

Fig l is a schematic drawing illustrating an environment in which

embodiments presented herein can be applied; Fig 2 is a schematic drawing illustrating a server shown in Fig l;

Figs 3A-B are flow charts illustrating embodiments of methods for allocating a software container;

Figs 4A-B are flow charts illustrating embodiments of methods for

announcing availability of a software container; Fig 5 is a schematic diagram illustrating components of the container allocator of Fig 1;

Fig 6 is a schematic diagram illustrating components of the servers of Fig 1; Fig 7 is a schematic diagram showing functional modules of the container allocator of Fig 5 according to one embodiment;

Fig 8 is a schematic diagram showing functional modules of the server of Fig 6 according to one embodiment; and Fig 9 shows one example of a computer program product comprising computer readable means.

DETAILED DESCRIPTION

The invention will now be described more fully hereinafter with reference to the accompanying drawings, in which certain embodiments of the invention are shown. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided by way of example so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Like numbers refer to like elements throughout the description.

Fig 1 is a schematic drawing illustrating an environment in which

embodiments presented herein can be applied.

There are here a number of servers 4a-e forming part of a set 8 of servers. While there are five servers 4a-e shown here, the set 8 of servers can contain any suitable number of servers. Each one of the servers 4a-e can execute software containers when required, as described in more detail below.

For instance, the software containers can be containers running on a Docker platform. The software containers are distributed as images being files (images are here not to be confused with illustrations/photographs).

Moreover, a method called process injection is used to transparently add additional processes into the container and then modify the boot order. This makes it possible to inject management processes into the containers, for example service composition processes allowing containers to self-configure. Here, process injection can be used to inject a process for an allocation agent in the software container. The allocation agent communicates with a container allocator 1 to assist in the allocation of software containers to one or more clients 5. Each client 5 here at some point wants to make use of a software container. It is to be noted that each client can also be a server for another context; it is only in relation to a software container described here that the client 5 is a client.

A deployment tool 7 is used when new software containers are to be deployed. The deployment tool 7 communicates with the container allocator 1 for the deployment.

The set of servers 8 is organised in a decentralized peer-to-peer network, which can be implemented on an underlying network, such as an IP (Internet Protocol) network. Some of the software containers in the network are active but not allocated to any clients. The active but not allocated containers can be discovered by clients using the container allocator 1 such that once they have been discovered it is ensured that the software container is not allocated multiple times by other clients. Since the containers are already active, i.e. executing, the start up time when a client requests a software container is minimal. This mechanism makes it possible to implement transient containers, which are containers allocated on demand to clients and only exist for a limited amount time.

Once the client 5 releases communication with the server, the execution of the software container ends. Each software container is here an instance of a software image. Using the peer-to-peer network, the presented embodiment is decentralized; meaning that there is no directory service or central controller that is responsible for allocation. Every server in the network is equal, and it is the network itself, which provides the proposed discovery mechanism to allocate containers. Hence, there may be several container allocators 1 executing in parallel for the same set of servers 8. To provide the decentralized solution, the proposed discovery algorithm can be based on a Distributed Hash Table (DHT) algorithm, such as Kademlia, Chord or Pastry.

The allocation agent which is injected at deployment connects to the peer-to- peer network 8 and publishes a checksum (e.g. SHA (Secure Hash

Algorithm)-i) of a blueprint for the software container and information how to connect to the allocation agent. The blueprint contains information such or metadata of the image, e.g.: { "container": {"image":

"docker :///sampledockerregistry.foo.com:443/videoconf'}}, here containing container image(s) URL, etc. needed to start the container. The blueprint may optionally contain additional metadata, such as version numbers or memory or CPU constraints. The blueprint may also be a reference, a checksum (such as Secure Hash Algorithm ι (SHA-i)) or a other identifier (e.g. UUID) as long as the underlying system can resolve the identifier and retrieve information on how to deploy the containers.

When a client 5 needs the services of a software container executing a particular functionality (provisioned by the software image), the container allocator calculates the checksum (being a lookup key) of a blueprint of the requested image and performs a lookup of the checksum in the peer-to-peer repository implemented e.g. by the DHT. In this way, the container allocator discovers the allocation agents of the software containers matching the specified blueprint. The container allocator 3 then randomly selects an allocation agent and tries to connect to it. An allocation agent will only accept one single connection during its lifetime, and a container is successfully allocated to a particular client 5 if the Container Allocator managed to connect to the selected Allocation Agent.

Different instances of the same software container can execute in parallel on different servers to thereby achieve transient containers. In Fig 1, a first software container 2a is a pre-started instance of a particular image executing on a first server 4a. In parallel, a second software container 2b is a pre- started instance executing on a second server 4b. The second software container 2b is an instance of the same image which is used for the first software container 2a. Hence, their blueprints are the same and their checksums are the same.

This structure allows the use of transient containers, where software containers are allocated on demand, for example triggered by an external event such as a user loads a particular web page (URL).

The client 5 can be any suitable type of client. One non-limiting example is that the client 5 could be a client for a communication session, e.g. in accordance with Matrix.org which is an open standard for a protocol that can be used to set up communication sessions, where each session corresponds to an online virtual room. When users enter a virtual room (e.g. by opening a URL in a web browser) they will join the meeting or conference to meet other participants connected to the same room.

An interesting characteristic of an online virtual room is that resources connected to room (e.g. a video conferencing service or a data

synchronization service) only needs to be allocated as long as there are participating users. Using the structure provided here, all needed resources can be allocated on demand, for example by starting all needed containers when the first user join the room, and then stop all containers when all users have left. The concept of transient containers could therefore be an efficient design principle for implementing online video conferencing services.

Using the embodiment of Fig 1, it is possible to more or less instantly start containers, and it is thus possible to use transient containers as a design pattern to more efficiently implement new Internet services and applications. As a container is created on demand when needed and only exists for a limited time, it is very easy to scale a service by adding more hardware, for example adding more servers to the set of servers 8 (peer-to-peer network). This architecture supports great scalability and can support massive amounts of servers. If a transient container crashes, it will not affect the entire service, but only the clients connected to the container that crashed are affected. Also, as the containers are never reused, a client will always connect to a fresh instance. This eliminates effects of software bugs such as memory leaks that could otherwise drain computational resources over time.

As transient containers are shutdown after being used, all states stored in the container are lost, making it harder to hack the system to retrieve historical data.

It becomes possible to introduce a new version of particular container without affecting previously running sessions, e.g. a videoconference session. The videoconference session will eventually be upgraded once all users have left the conference and then join the same conference room at a later occasion. Also, all new conference sessions will immediately start using the new containers images once they have been introduced. Again, this will not affect already running sessions.

Fig 2 is a schematic drawing illustrating a server 4 shown in Fig 1. The server 4 can be any of the servers 4a-e shown in Fig 1.

The server 4 comprises one or more software containers 2. Each software container is an instance of an image and contains, apart from its operative software, an allocation agent 11, injected at deployment and a peer-to-peer repository 10. The peer-to-peer repository is implemented e.g. using DHT as described above.

Each software container can be active and not allocated, active and allocated or not running. Each software container 2 can be allocated to only one session (or client) and after the client releases the software container, the execution of the software container 2 ends and is not started again. However, the server can start a new software container 2 being an instance of the same or a different image. Now an embodiment of the peer-to-peer network for the servers will be described based on Bitverse. Bitverse is a framework to build decentralized peer-to-peer application. Bitverse is based on the Kademlia DHT algorithm and provides a messaging API (Application Programming Interface) and a key value store API. In both APIs, self-generated SHA-i strings are used to identify node end-points and data objects. Bitverse is thus a DHT

implementation of a decentralised repository.

Bitverse consists of two different types of nodes, super nodes and edge nodes. Edge nodes are connected using web sockets to a super node and thus forms a star topology. An edge node can either run as a library in a web browser client or in a server component directly.

Super nodes communicate using UDP (User Datagram Protocol). Messages are routed using a routing table provides by Kademlia. The routing table consists of i6o buckets where each bucket contains a limited list of contacts (typically 20) discovered by the super node. XOR (Exclusive OR) is used to determine the distance between two different nodes in the network and which bucket a contact should be stored in. This makes it possible to implement an iterative protocol where a node calculates which contacts in its routing table that has the shortest distance to a particular string, or the SHA- 1 of the string to be more specific. These contact are then queries until there are no more nodes to query. This makes it possible to find the nodes in the whole network that has the shortest distance to a particular string. Like all DHTs, this procedure is very efficient, typically 0(log n) messages need to be sent, where is n is the number of nodes in the network and O denotes order. By calculating a SHA-i of the key it becomes possible to calculate which nodes in the network a particular key-value pair should be stored, and thus implement a distributed data repository where data is replicated in the network. In Bitverse, the value is represented as an unordered set, which makes it possible to store multiple values associated with a specific key. This special key-value(s) pair is called a SetMap. Below is an example of SetMap storing 5 values, identified by the key "hello". "hello" => {value2, valuei, values, va.lu.e4, values}

The SetMap provides a simple API, for example setmap = bitverse.getSetMap ("hello") setMapAddValue("value6 ") The SetMap API can be used by the allocation agents to store registration data for a software container. The SetMap is also used internally in Bitverse to provide a messaging service. When an edge node connects to a super node, the super node will store IP number and UDP port of the super node as a value in a SetMap, where the self-generated SHA-i id of the edge node is used as a key. This makes it possible for an edge node to send messages to any other edge node in the network, by allow the super nodes to use the information stored in the SetMap to set up tunnels between different super nodes.

Below is an example of a messaing API call to send a message to an edge node, where 4cd ei8o4bad563d32a4i6dfsf9i5eft>boi3ee6f ' is the address of the receiving edge node. biWerse.sendM essage("4cd7ei 8o4bads63d32a4i 6dfsf9i5efbboi3ee6f', "hello")

The message will then be sent to the connected super node, which will if necessary tunnel the message to a foreign super node where the receiving edge node is connected.

As used herein, the lookup key can be the checksum of the blueprint of a software container and the values are the Bitverse edge node addresses to the injected allocation agents executing on servers. Note that it would also be possible to use regular TCP or UDP to communicate with the allocation agents. Also, to authenticate the container allocator, in one embodiment, the container allocator uploads a public key to the allocation agents and signs outgoing messages from the container allocator. Figs 3A-B are flow charts illustrating embodiments of methods for allocating a software container. The method is performed in a container allocator. First the method illustrated by Fig 4A will be described.

In a receive request step 40, a request to invoke a software container for a client is received. The request can be received from the client.

In a calculate lookup key step 42, a lookup key associated with of the software container is calculated. The lookup key can e.g. be a checksum of a blueprint for the software container as described above. The blueprint can include or consist of metadata for the software container. In a perform lookup step 44, a lookup is performed in a distributed peer-to- peer repository using the lookup key. This gives a result set of active software containers. The set can contain zero, one or more active software containers, or more accurately references to the zero, one or more active software containers. The distributed repository may be based on a distributed hash table.

When SetMap is used as described above, the perform lookup can be performed like the following example: allocationSet =

bitverse.getSetM ap("452ofbc786i2aeb22f53fi56a4a2592952i 6fcfa") where the string between the quotes is the lookup key. In our example, this can give the result of two Bitverse edge node addresses:

C724i88d998c768c5ddda850ac3064a3fc623864, and

c8ea48d i 68cbi 07ai 6id7f5bd7277ao2344bb82.

In a select SW container step 46, one software container (or its allocation agent) is selected from the set of software containers. The choice can e.g. be a random (or pseudo-random) selection from the set of software containers. For instance, the software container with address C8ea48d7i68cbi07ai6id f5bd72yya02344bb82 could be selected in our example.

In a connect step 47, the container allocator connects to the selected software container to allocate the selected software container to the client. For example, the container allocator can connect to an allocation agent having been injected in the software container.

At this point, the client and the software container can communicate and use each other's functionality. Optionally, the client connects through the container allocator and does not know the exact location or IP (Internet Protocol) address of the server running the software container.

Looking now to Fig 3B, only new or modified steps compared to the method illustrated by the flow chart of Fig 3A will be described.

In an optional start fallback SW container step 43, a fallback software container is started in a server of the set of servers. Optionally, several fallback software containers can be started in one or more of the servers.

In an optional conditional success step 45, it is determined when the software container is successfully allocated to the client. If this is the case, the method proceeds to a remove SW container step 48. Otherwise, the method proceeds to an optional conditional max nbr step 41, or when that step is not performed, to an optional connect to fallback SW container step 49. The determination of success is particularly useful when there are several container allocators using the same peer-to-peer network, in which another container allocator could allocate the selected software container between the selection in step 46 and a confirmed connection in step 47. The success can be based on signalling received from the server based on the connect step 47.

In the optional conditional max nbr step 41, it is determined whether a maximum number of attempts of connecting have been performed. If this is the case, the method proceeds to the connect to fallback SW container step 49. Otherwise, the method returns to the select SW container step 46 to select a new SW container to attempt to connect to. In other words, a software container is determined to fail to be allocated to the client when none of the instances of connecting to the selected software container results in a successful allocation to the client. In an optional remove SWcontainer step 48, the allocated software container is removed from the repository. This prevents any other client from being allocated the software container which has just successfully been allocated to the client. It is only possible to connect once to a software container.

In an optional connect to fallback SWcontainer step 49, the container allocator connects to the fallback software container to allocate the fallback software container to the client. This was started in step 43 and has had some time to initialise, whereby any delay experienced by the client is reduced compared to starting a software container at this point.

Optionally, a separate process checks if the number of containers in the distributed peer-to-peer repository is below a certain threshold and then pre- start new containers if that is the case. It would also be possible to develop a decentralized algorithm executed by each container to self-replicate the containers to make sure there are enough instances in the repository.

After this method is performed, the client can connect to the software container. One embodiment could be that the container allocator receives connection information when connecting to a software container how to further connect to a process (such as a Unix process) running inside the container. Another embodiment could be to develop a rendezvous protocol, for example using a Bitverse SetMap to discover the allocated container. Figs 4A-B are flow charts illustrating embodiments of methods for

announcing availability of a software container. The method is performed in a server such as one or all of the servers of Fig 1. l6

In an initialise execution step 51, execution of the software container is initialised in the server. This can be triggered by the server or from signalling from another node, such as the container allocator.

In a calculate lookup key step 52, a lookup key associated with the software container is calculated. This step corresponds to step 42 of Figs 3A-B.

In a store step 54, an address of the server is stored in association with the lookup key in a distributed peer-to-peer repository. This allows the server to be located based on the lookup key. At this stage, the software container has been started but not allocated to a client. In a receive connection request step 56, a connection request to allocate the software container to a client is received. This can be received from the container allocator.

In a conditional ok step 55, the server determines whether to grant the connection request. For instance, each software container can only be allocated once, whereby the connection request is only granted if the software container in question has not been allocated at this time. If the connection request is granted, the method proceeds to a transmit allocation acceptance step 58. Otherwise, the method ends.

In the transmit allocation acceptance step 58, an allocation acceptance message is transmitted, e.g. to the container allocator. This can be sent to the container allocator. This indicates success of the allocation to the recipient.

Looking now to Fig 4B, only new or modified steps compared to the method illustrated by the flow chart of Fig 4A will be described.

In an optional inject allocation agent step 50, an allocation agent is injected in the software container. The allocation agent is a software process configured to perform all following steps of the method.

In an optional remove SWcontainer step 55, the allocated software container (or more specifically the reference to it) is removed from the repository. In an optional conditional released step 57, it is determined whether the software container has been released, i.e. when it is not needed by any client any more. When this is the case, the method proceeds to an optional end execution of SW container step 59. Otherwise, the method re-executes this step, optionally after a delay (not shown).

In the optional end execution of SW container step 59, the execution of the software container ends. This ends the lifetime of the software container, forming part of the transient container concept.

Fig 5 is a schematic diagram illustrating components of the container allocator 1 of Fig 1. A processor 60 is provided using any combination of one or more of a suitable central processing unit (CPU), multiprocessor, microcontroller, digital signal processor (DSP), application specific integrated circuit etc., capable of executing software instructions 67 stored in a memory 65, which can thus be a computer program product. The processor 60 can be configured to execute the method described with reference to Figs 3A-B above.

The memory 65 can be any combination of read and write memory (RAM) and read only memory (ROM). The memory 65 also comprises persistent storage, which, for example, can be any single one or combination of magnetic memory, optical memory, solid state memory or even remotely mounted memory.

A data memory 66 is also provided for reading and/or storing data during execution of software instructions in the processor 60. The data memory 66 can be any combination of read and write memory (RAM) and read only memory (ROM).

The container allocator 1 further comprises an I/O interface 62 for communicating with other external entities. Optionally, the I/O interface 62 also includes a user interface. l8

Other components of the container allocator 1 are omitted in order not to obscure the concepts presented herein.

Fig 6 is a schematic diagram illustrating components of the each one of the servers 4 of Fig 1, here represented by a single server 4. A processor 70 is provided using any combination of one or more of a suitable central processing unit (CPU), multiprocessor, microcontroller, digital signal processor (DSP), application specific integrated circuit etc., capable of executing software instructions 77 stored in a memory 75, which can thus be a computer program product. The processor 70 can be configured to execute the method described with reference to Figs 4A-B above.

The memory 75 can be any combination of read and write memory (RAM) and read only memory (ROM). The memory 75 also comprises persistent storage, which, for example, can be any single one or combination of magnetic memory, optical memory, solid state memory or even remotely mounted memory.

A data memory 76 is also provided for reading and/ or storing data during execution of software instructions in the processor 70. The data memory 76 can be any combination of read and write memory (RAM) and read only memory (ROM). The server 4 further comprises an I/O interface 72 for communicating with other external entities. Optionally, the I/O interface 72 also includes a user interface.

Other components of the server 4 are omitted in order not to obscure the concepts presented herein. Fig 7 is a schematic diagram showing functional modules of the container allocator 1 of Fig 5 according to one embodiment. The modules are implemented using software instructions such as a computer program executing in the container allocator 1. The modules correspond to the steps in the methods illustrated in Figs 3A and 3B. A receiver 80 corresponds to step 40. A calculator 82 corresponds to step 42. A fallback manager 83 corresponds to step 43. A repository manager 84 corresponds to step 44 and step 48. A selector 86 corresponds to step 46.

A connector 87 corresponds to step 47 and step 49. A success determiner 85 corresponds to step 45. A counter 81 corresponds to step 41.

Fig 8 is a schematic diagram showing functional modules of the server 4 of Fig 6 according to one embodiment. The modules are implemented using software instructions such as a computer program executing in the server 4. The modules correspond to the steps in the methods illustrated in Figs 4A and 4B.

An execution manager 92 corresponds to step 50, step 51 and step 59. A calculator 93 corresponds to step 52.

A repository manager 94 corresponds to step store 54.

A receiver 96 corresponds to step 56.

A transmitter 98 corresponds to 58.

A release determiner 97 corresponds to 57. Fig 9 shows one example of a computer program product comprising computer readable means. On this computer readable means a computer program 91 can be stored, which computer program can cause a processor to execute a method according to embodiments described herein. In this example, the computer program product is an optical disc, such as a CD (compact disc) or a DVD (digital versatile disc) or a Blu-Ray disc. As explained above, the computer program product could also be embodied in a memory of a device, such as the computer program product 67 of Fig 5 or 77 of Fig 6. While the computer program 91 is here schematically shown as a track on the depicted optical disk, the computer program can be stored in any way which is suitable for the computer program product, such as a removable solid state memory, e.g. a Universal Serial Bus (USB) drive.

The invention has mainly been described above with reference to a few embodiments. However, as is readily appreciated by a person skilled in the art, other embodiments than the ones disclosed above are equally possible within the scope of the invention, as defined by the appended patent claims.