Managing Connection Pools for User Devices
In one embodiment, a first computing device, maintains a set of connections for the first computing device; intercepts a request from a software application executing on the first computing device to establish a connection with a second computing device; selects from the set of connections an available connection; and assigns the available connection to the software application for connecting to the second computing device.
1 . A method comprising: by a first computing device,
maintaining a set of connections for the first computing device;
intercepting a request from a software application executing on the first computing device to establish a connection with a second computing device;
selecting from the set of connections an available connection; and
assigning the available connection to the software application for connecting to the second computing device.
2 . The method of claim 1 , wherein one or more connections in the set of connections are reserved for and dedicated to one or more tasks.
3 . The method of claim 2 , wherein a first connection in the set of connection is reserved for receiving communications pushed to the first computing device by a social-networking system.
4 . The method of claim 2 , wherein the available connection is not a reserved connection and is not currently assigned to any software application executing on the first computing device.
5 . The method of claim 1 , further comprising:
if no connection in the set of connections is available, then:
establishing a new connection for the first computing device;
adding the new connection to the set of connections; and
assigning the new connection to the software application for connecting to the second computing device.
6 . The method of claim 1 , wherein the set of connections comprises one or more network connections and one or more communication connections.
7 . A first system comprising:
a memory comprising instructions executable by one or more processors; and
the one or more processors coupled to the memory and operable to execute the instructions, the one or more processors being operable when executing the instructions to:
maintain a set of connections for the first system;
intercept a request from a software application executing on the first system to establish a connection with a second system;
select from the set of connections an available connection; and
assign the available connection to the software application for connecting to the second system.
8 . The first system of claim 7 , wherein one or more connections in the set of connections are reserved for and dedicated to one or more tasks.
9 . The first system of claim 8 , wherein a first connection in the set of connection is reserved for receiving communications pushed to the first system by a social-networking system.
10 . The first system of claim 8 , wherein the available connection is not a reserved connection and is not currently assigned to any software application executing on the first system.
11 . The first system of claim 7 , wherein the one or more processors are further operable when executing the instructions to:
if no connection in the set of connections is available, then:
establish a new connection for the first system;
add the new connection to the set of connections; and
assign the new connection to the software application for connecting to the second system.
12 . The first system of claim 7 , wherein the set of connections comprises one or more network connections and one or more communication connections.
13 . One or more computer-readable non-transitory storage media embodying software operable when executed by a first computer system to:
maintain a set of connections for the first computer system;
intercept a request from a software application executing on the first computer system to establish a connection with a second computer system;
select from the set of connections an available connection; and
assign the available connection to the software application for connecting to the second computer system.
14 . The media of claim 13 , wherein one or more connections in the set of connections are reserved for and dedicated to one or more tasks.
15 . The media of claim 14 , wherein a first connection in the set of connection is reserved for receiving communications pushed to the first computer system by a social-networking system.
16 . The media of claim 14 , wherein the available connection is not a reserved connection and is not currently assigned to any software application executing on the first computer system.
17 . The media of claim 13 , wherein the software is further operable when executed by the first computer system to:
if no connection in the set of connections is available, then:
establish a new connection for the first computer system;
add the new connection to the set of connections; and
assign the new connection to the software application for connecting to the second computer system.
18 . The media of claim 13 , wherein the set of connections comprises one or more network connections and one or more communication connections.