Abstract:
To provide proxy address neutrality, in particular for mobile server devices, a server application can register its network address with a discovery application. Whenever the server application acquires a new network address, the server application updates the discovery application. A client application providing proxy services for the server application can invoke calls to the server client using the network address for the server application that is currently stored in the client device. If the current network address is invalid, the client application obtains an updated network address from the discovery application.

Description:
FIELD OF THE INVENTION 
       [0001]    This disclosure relates to distributed computing applications and in particular to the use of proxies in distributed computing environments. 
       BACKGROUND OF THE INVENTION 
       [0002]    In a distributed computing application, the proxy pattern is commonly used to represent software services running on another device. The proxy typically contains the network address of the device, which is necessary to communicate with that service. Modern mobile devices support multiple means for connecting to the Internet, e.g. WiFi, WiMAX, 3G, 4G, etc. In addition, their network address is subject to change with high frequency in comparison to more stationary devices such as servers and desktop computers. When a device&#39;s network address changes, any remote proxies that have the device&#39;s old address will no longer be usable. The application must update all proxies to contain the new address. 
         [0003]    The application developer is normally responsible for handling proxies that become invalid. Each proxy in use must be recreated or updated to use the new network address of the service it is a proxy to. This process is error-prone and places a burden on the application developer to ensure all proxies have been updated. 
         [0004]    What is required is an improved system and method for providing proxies in distributed computing applications. 
       SUMMARY OF THE INVENTION 
       [0005]    To provide proxy address neutrality, in particular for mobile server devices, a server application can register its network address with a discovery application. Whenever the server application acquires a new network address, the server application updates the discovery application. A client application providing proxy services for the server application can invoke calls to the server client using the network address for the server application that is currently stored in the client device. If the current network address is invalid, the client application obtains an updated network address from the discovery application. 
         [0006]    In one aspect of the disclosure, there is provided a method for providing a proxy service. A client application may invoke a remote call from a proxy service of the client application to a service of a server application using a network address obtained from the client application. If the network address is not valid, the client application may retrieve an updated network address from a discovery application and perform the remote call using the updated network address. 
         [0007]    In one aspect of the disclosure, there is provided a server application that executes on a server device. The server application may be configured to generate a server context for one or more services. The server context may comprise a unique identifier and a network address, which are registered with a discovery application. When the server application acquires a new network address, the new network address is registered with the discovery application for the one or more services. 
         [0008]    In one aspect of the disclosure, there is provided a system for providing proxy address neutrality comprising a discovery application, a server device and at least one client device. The server device may comprise a network address and may execute at least one server application. The server application may comprise a server context configured to register the network address with the discovery application, and at least one server service. The client device may execute a client application comprising a client context and at least one proxy service to the at least one server service. The client context may be configured to retrieve the network address from the discovery application. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0009]    Reference will now be made, by way of example only, to specific embodiments and to the accompanying drawings in which: 
           [0010]      FIG. 1  shows a system for providing proxy address neutrality; 
           [0011]      FIG. 2  shows a method for executing a server application; 
           [0012]      FIG. 3  shows the message flows when establishing a server context; 
           [0013]      FIG. 4  shows the message flows for updating a network address of the server context; 
           [0014]      FIG. 5  shows a method for establishing a client context; 
           [0015]      FIG. 6  shows the message flows for establishing the client context; 
           [0016]      FIG. 7  shows a method for performing a remote call from the client context; and 
           [0017]      FIG. 8  shows the message flows for performing the remote call. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0018]    As will be apparent from the following, the system to be described below provides a means by which all proxies for a service or services hosted remotely can be updated without programmer intervention to use a new address when the remote device&#39;s network address changes. The system can be used to provide Proxy address neutrality for improved service reliability in distributed applications. 
         [0019]    An embodiment of the system is depicted in  FIG. 1 . The system  10  includes a server application  12  which creates a server context  13  that has a unique identity (GUID)  14 . A method of operation of the server application  12  is shown in the flowchart  100  of  FIG. 2 . At step  101 , the server application creates the server context  13 , which starts a server listener (step  102 ) that receives and processes communications from client applications. The server listener opens a server socket on a designated network address  15  associated with the server device. The server application  12  registers the server context  13  with a discovery application  30  (step  103 ). The registration information includes at least the server listener&#39;s network address  15  and server context GUID  14 . 
         [0020]    The server application  12  creates one or more services (step  104 ), e.g. Service 1   16 , Service 2   17 , etc. and registers them with the server context  13 . Each service has a unique service identifier (ID). The message flows for initializing the server application (steps  101  to  104 ) are depicted in  FIG. 3 . 
         [0021]    The server then proceeds to monitor the network status (step  105 ). If the device hosting the service changes its network address  15  (determination  106 ), the server context  13  restarts the server listener (step  107 ) and re-registers with the discovery application to include the new network address (step  108 ). The message flows for re-registering the network address (steps  106  to  108 ) are depicted in  FIG. 4 . 
         [0022]    The system  10  also includes one or more client applications  22 . The client application is initialized following the procedure depicted in the flowchart  200  of  FIG. 5 . The message flows of the procedure  200  are depicted in  FIG. 6 . The client application  22  creates a client context  23  (step  201 ). The client context  23  is a client logical representation for a remote server context  13 . The client context  23  uses the discovery application  30  to retrieve the information necessary to create a proxy to a service (e.g. Service_ 1   16 , Service_ 2   17 ), including the server context GUID  14 , server context network address  15 , and service identifier  18  for the remote service (step  202 ). The client context retains a local copy of the server context GUID  24  and network address  25 . The client context  23  creates a proxy to the service (e.g. Proxy_ 1   26 , Proxy_ 2   27 , etc.) (step  203 ). The proxy  26 ,  27  has a reference to the client context  23 . Each proxy for a service hosted in a given server application server context references the same client context object. 
         [0023]    The discovery application  30  is accessible via the network by both the server application and client application. It contains entries describing server contexts. Each entry includes at least the server context&#39;s unique GUID and one network address for the server context. Entries may also include additional information required by the client application to determine which server context is the most appropriate to use, or information required by the discovery application to properly resolve a server context when a client performs a discovery request. The discovery application runs on a system with a stable network address, to ensure reliable connectivity by both server application and client application. It establishes a listener on an address/port that is known to the server application and client application. The server application connects to the discovery application to register server contexts. The client application connects to the discovery application to obtain the network address for a server context. The exact mechanism for obtaining a server context will vary. Examples include: 
         [0024]    A client provides a well-known server context name to the discovery application to obtain its network address. In this implementation, when a server application registers a server context with the discovery application, it provides the discovery application with the name of the server context. The discovery application can then associate the name to the registration of the server context, and look up the registration when the client provides the name; 
         [0025]    A client provides a description of a service to the discovery application to obtain the network address of a server context that hosts the service. In this implementation, when a server application registers a service with the server context, the server context provides the discovery application a description of the service. The description may consist of a set of attributes consisting of name-value pairs. The discovery application can then associate the service description to the server context registration, and look up the registration when the client provides a service description by matching the requested description to the description registered. 
         [0026]    A client provides a server context GUID to the discovery application to obtain the server context&#39;s network address. In this implementation, the client must have a priori knowledge of the server context GUID: typically, either the GUID is well-known to both server application and client application, or, the client application obtained the GUID from the discovery application through a previous lookup using another discovery request mechanism. 
         [0027]    Other examples will be apparent to a person skilled in the art and all such examples are intended to be encompassed herein. 
         [0028]    A process for using the proxy service will now be described with reference to the flowchart  300  of  FIG. 7 . When a client application proxy  26 ,  27  invokes a remote call on the service  16 ,  17  (step  301 ), the client context obtains the locally stored network address  25  for the server context  13  (step  302 ) and attempts to establish a network connection to the server application&#39;s  12  server listener using the current network address  25 . If the network connection is successfully established and the service is available on the server context as identified by the server context GUID and service ID, the network address is valid; otherwise, if the connection could not be established or the service is unavailable or the server context does not exist, the address is invalid (determination step  303 ). If the network address is valid, the remote call is performed (step  304 ). However, if the network address is no longer valid for that service, the relevant client context  23  attempts to re-discover the service by performing a discovery request using the discovery application  30 . The client context  23  retrieves the server listener&#39;s new network address using the discovery application  30  (step  305 ), stores the updated server context GUID and address locally, and performs the call (step  304 ) using the updated address. Since all proxies reference the client context in this fashion, each proxy automatically has its service&#39;s new network address via the updated client context. 
         [0029]    The above described systems and methods may be implemented as part of a software library for general purpose use by distributed applications running in mobile devices. The invention may be a stand-alone library or provided as part of a larger product such as a web browser client library, Web Services library, or RPC/ORB library. 
         [0030]    The components of the system  10  may be embodied in hardware, software, firmware or a combination of hardware, software and/or firmware. The server, client and discovery application devices may each comprises one or more processors that are each operatively associated with one or more memories that store executable instructions for implementing the methods described above. 
         [0031]    The described proxy updating methods benefit developers implementing distributed applications by reducing the effort needed to manage and maintain proxies. Since proxies are updated automatically, the chance of error is reduced, and the maintenance burden is also reduced. Advantages of these embodiments include the reduction of programmer effort, allowing a device&#39;s services to be accessed remotely more reliably when the device&#39;s network address is changed, and reducing errors in updating proxy addresses, thus making applications more reliable. 
         [0032]    Although embodiments of the present invention have been illustrated in the accompanied drawings and described in the foregoing description, it will be understood that the invention is not limited to the embodiments disclosed, but is capable of numerous rearrangements, modifications, and substitutions without departing from the spirit of the invention as set forth and defined by the following claims. For example, the capabilities of the invention can be performed fully and/or partially by one or more of the blocks, modules, processors or memories. Also, these capabilities may be performed in the current manner or in a distributed manner and on, or via, any device able to provide and/or receive information. Further, although depicted in a particular manner, various modules or blocks may be repositioned without departing from the scope of the current invention. Still further, although depicted in a particular manner, a greater or lesser number of modules and connections can be utilized with the present invention in order to accomplish the present invention, to provide additional known features to the present invention, and/or to make the present invention more efficient. Also, the information sent between various modules can be sent between the modules via at least one of a data network, the Internet, an Internet Protocol network, a wireless source, and a wired source and via plurality of protocols.