METHOD AND APPARATUS FOR MESSAGE ROUTING TO SERVICES
An approach is provided for message routing to services. A publish request associated with a service is received from a user equipment. A query is generated to determine a plurality of locations of the service. Each location corresponds respectively to a plurality of clusters. Transmission of the query is initiated to a home locator. The locations from the home locator are received. One of the locations is selected. Transmission of the publish request to the selected location is initiated.
1 . A method comprising:
receiving a publish request associated with a service from a user equipment;
generating a query to determine a plurality of locations of the service, wherein each location corresponds respectively to a plurality of clusters;
initiating transmission of the query to a home locator;
receiving the locations from the home locator;
selecting one of the locations; and
initiating transmission of the publish request to the selected location.
2 . A method of claim 1 , wherein the selection of the one location is based on a predetermined criteria.
3 . A method of claim 2 , wherein the selection of the one location is performed either statically or dynamically according to the predetermined criteria.
4 . A method of claim 3 , wherein the criteria includes a first parameter specific to a home location of the user equipment and a second parameter specific to the service.
5 . A method of claim 3 , wherein the selecting step further comprises:
determining a lack of connectivity of the selected location; and
selecting another one of the locations based on the determination.
6 . A method of claim 1 , wherein the service is an owner of a channel associated with the publication request.
7 . A method of claim 1 , wherein the locations are prioritized into a priority list used for the selection of the one location.
8 . An apparatus comprising:
at least one processor; and
at least one memory including computer program code,
the at least one memory and the computer program code configured to, with the at least one processor, cause the apparatus to perform at least the following,
receive a publish request associated with a service from a user equipment,
generate a query to determine a plurality of locations of the service, wherein each location corresponds respectively to a plurality of clusters,
initiate transmission of the query to a home locator,
receive the locations from the home locator,
select one of the locations, and
initiate transmission of the publish request to the selected location.
9 . An apparatus of claim 8 , wherein the selection of the one location is based on a predetermined criteria.
10 . An apparatus of claim 9 , wherein the selection of the one location is performed either statically or dynamically according to the predetermined criteria.
11 . An apparatus of claim 10 , wherein the criteria includes a first parameter specific to a home location of the user equipment and a second parameter specific to the service.
12 . An apparatus of claim 10 , wherein the apparatus is further caused to:
determine a lack of connectivity of the selected location; and
select another one of the locations.
13 . An apparatus of claim 8 , wherein the service is an owner of a channel associated with the publication request.
14 . An apparatus of claim 8 , wherein the locations are prioritized into a priority list used for the selection of the one location.
15 . A computer-readable storage medium carrying one or more sequences of one or more instructions which, when executed by one or more processors, cause an apparatus to perform at least the following:
receive a publish request associated with a service from a user equipment,
generate a query to determine a plurality of locations of the service, wherein each location corresponds respectively to a plurality of clusters,
initiate transmission of the query to a home locator,
receive the locations from the home locator,
select one of the locations, and
initiate transmission of the publish request to the selected location.
16 . A computer-readable storage medium of claim 15 , wherein the selection of the one location is based on a predetermined criteria.
17 . A computer-readable storage medium of claim 16 , wherein the selection of the one location is performed either statically or dynamically according to the predetermined criteria.
18 . A computer-readable storage medium of claim 17 , wherein the criteria includes a first parameter specific to a home location of the user equipment and a second parameter specific to the service.
19 . A computer-readable storage medium of claim 17 , wherein the apparatus is further caused to:
determine a lack of connectivity of a primary selection location, and
select a secondary selection location.
20 . A computer-readable storage medium of claim 15 , wherein the locations are prioritized into a priority list used for the selection of the one location.