Method, system, and computer program product for routing sessions to a specific URL in a multi-site environment

The present invention provides a method, system, and computer program product for routing sessions to a specific Uniform Resource Locator (URL) in a multi-site environment. An ordered list of servers is provided in a multi-site environment. Upon receipt of a session request submitted by a user, the ordered list of servers is looped through until a valid URL is found. When a valid URL is found, the session request is redirected to the server in the multi-site environment specified by the valid URL.

FIELD OF THE INVENTION

The present invention generally relates to computing systems, and more specifically relates to a method, system, and computer program product for routing sessions to a specific Uniform Resource Locator (URL) in a multi-site environment.

BACKGROUND OF THE INVENTION

In a multi-site “high availability” environment, routing a request to a particular site within the multi-site environment can be problematic. There are many factors that need to be designed into a solution. The solution must address balancing requests between sites, and must be able to fail over to a working site if a site is unavailable. The solution must also have the flexibility to allow a developer to generate robust and dynamic URL strings. There are no known solutions to this problem.

An illustrative high availability multi-site environment10is depicted inFIG. 1. The multi-site environment10includes a plurality of substantially identical, independent sites12A,12B, . . . ,12N, each including a plurality of servers14.

At any given time, a browser session16may be directed to a server14on any of the sites12A,12B, . . . ,12N in the multi-site environment10available at that time. For example, on a first day a user's browser session16may be directed to a server14at site12A, while on the next day the user's browser session16may be directed to a server14at site12B. This is done without the knowledge of the user. This can create a problem when, for example, two or more users at different sites12A,12B, . . . ,12N wish to collaborate using a application (e.g., a chat application) that is unaware of the existence of other sites12A,12B, . . . ,12N in the multi-site environment10. One problem to be solved, therefore, is how to route a plurality of independent browser sessions16to the same server14at the same site12A,12B, . . . ,12N in the multi-site environment10.

SUMMARY OF THE INVENTION

In general, the present invention provides a method, system, and computer program product for routing sessions to a specific Uniform Resource Locator (URL) in a multi-site environment.

The present invention provides a set of URL helper classes that generate a URL based on an array of ordered servers and associated information including the protocol, port, and path. Using the list of possible servers, a valid URL is determined by looping through the list until a successful connection can be found. Once a valid connection has been found, variables and their values are appended to the URL string. The URL helper classes allow a developer to define both global and runtime variables. The URL can be pushed to one or more users to route a browser session to a particular server at a particular site in a multi-site environment.

A first aspect of the present invention is directed to a method for routing sessions to a specific URL in a multi-site environment, comprising: providing an ordered list of servers in the multi-site environment; receiving a session request submitted by a user; looping through the ordered list of servers until a valid URL is found; and redirecting the session request to the server in the multi-site environment specified by the valid URL.

A second aspect of the present invention is directed to a system for routing sessions to a specific URL in a multi-site environment, comprising: a system for providing an ordered list of servers in the multi-site environment; a system for receiving a session request submitted by a user; a system for looping through the ordered list of servers until a valid URL is found; and a system for redirecting the session request to the server in the multi-site environment specified by the valid URL.

A third aspect of the present invention is directed to a program product stored on a computer readable medium for routing sessions to a specific URL in a multi-site environment, the computer readable medium comprising program code for performing the following steps: providing an ordered list of servers in the multi-site environment; receiving a session request submitted by a user; looping through the ordered list of servers until a valid URL is found; and redirecting the session request to the server in the multi-site environment specified by the valid URL.

A fourth aspect of the present invention is directed to a method for deploying an application for routing sessions to a specific URL in a multi-site environment, comprising: providing a computer infrastructure being operable to: provide an ordered list of servers in the multi-site environment; receive a session request submitted by a user; loop through the ordered list of servers until a valid URL is found; and redirect the session request to the server in the multi-site environment specified by the valid URL.

A fifth aspect of the present invention is directed to computer software for routing sessions to a specific URL in a multi-site environment, the computer software comprising instructions to cause a computer system to perform the following functions: provide an ordered list of servers in the multi-site environment; receive a session request submitted by a user; loop through the ordered list of servers until a valid URL is found; and redirect the session request to the server in the multi-site environment specified by the valid URL.

The drawings are merely schematic representations, not intended to portray specific parameters of the invention. The drawings are intended to depict only typical embodiments of the invention, and therefore should not be considered as limiting the scope of the invention. In the drawings, like numbering represents like elements.

BEST MODE FOR CARRYING OUT THE INVENTION

The present invention provides a method, system, and computer program product for routing sessions to a specific Uniform Resource Locator (URL) in a multi-site environment.

A flow diagram of a method for routing sessions to a specific URL in a multi-site environment in accordance with an embodiment of the present invention is depicted inFIG. 2. The flow diagram will be described with reference to the illustrative multi-site environment20depicted inFIG. 3. The multi-site environment20includes a plurality (three in this example) of substantially identical, independent sites22A,22B,22C, each including a plurality of servers24.

In step S1, an ordered list26of servers24in the multi-site environment20is generated. First, each site22A,22B,22C is prioritized. For example, site22A can be set as the “primary” site, site22B can be set as the “secondary” site, and site22C can be set as the “tertiary” site. The sites can be prioritized based on predetermined criteria or in a random manner. For example, IM sessions can be grouped by topic to parallel SME (Subject Matter Experts) groups: Windows, Linux, AIX, etc. The priority of each group can be set based on the physical location of the central SME group to the hosting site. For instance, assume that the central location for a Windows SME group is Austin, Tex. and that hosting sites are located in Boulder, Colo., Research Triangle Park (RTP), N.C., and St. Louis, Mo. Since St. Louis is physically closest to Austin, it can be set as the “primary” site. Similarly, since Boulder is the next closest site and RTP is the farthest away, Boulder can be set as the “secondary” site and RTP can be set as the “tertiary” site. This prioritization scheme is based on the assumption that Austin would get better performance, even though it may be small, if their IM communications were routed to the site closest to them.

The servers24within each prioritized site22A,22B,22C are each assigned a different task. For example, one server24may be used to provide database services, one server24may be used to render static content, one server24may be used to provide portlet services, one server24may be used to provide Java servlet services, and one server24may be used to provide IM services. In order to maintain high availability, each “server”24can be implemented using a cluster comprising a plurality of individual servers. Clustering makes the individual servers behave as a single server regardless of where the request is actually being completed. The ordered list26of servers is provided to each site22A,22B,22C in the multi-site environment20. In this example, server #324in each site22A,22B,22C is an IM server.

Each site22A,22B,22C in the multi-site environment20includes a session routing portlet28. The session routing portlet28includes a URL helper service30. The URL helper service30includes a set of URL helper classes that are configured to generate a URL based on the ordered list26of servers24and associated information including the protocol, port, and path.

In step S2, in response to the receipt of an instant messaging (IM) session request32A at one of the sites22A,22B,22C in the multi-site environment20(site22B in this example), the session routing portlet28at site22B requests a URL from the URL helper service30and passes initialization parameters comprising the protocol, path, and port (these parameters are static—only the name of the server24changes). In general, all of the parameters could be different. In step S3, the URL helper service30builds and checks a URL by looping (step S4) through the ordered list26of servers24, from highest priority to lowest, until a valid URL (i.e., a valid connection) is found. Once a valid URL is found, variables and their values may be appended to the URL string. In this example, it is assumed that the IM server (i.e., server #324at the primary site22A) is not up and that the first valid URL for an IM server is found at server24#3at the secondary site22B.

In step S6, the URL helper service30appends runtime variables to the URL. For example, there may be two types of users involved in a chat: a user discussing a problem having a problem number (PMR) and a support representative (e.g., SME) of a company. To this extent, the PMR would be passed to the IM application as a runtime variable. This allows the support representative to look at the problem before beginning the chat with the user. In step S7, the generated URL is pushed to the user to redirect the IM session request32A to the IM server (i.e., server24#3) at the secondary site22B. This is indicated by arrow34A inFIG. 3.

The above process is repeated for each corresponding IM session request, using the same ordered list26of servers24, to ensure that all members of the IM session are directed to the same server24at the same site22A,22B,22C in the multi-site environment20. For example, a corresponding IM session request32B received at site22C would result in the generation of a URL redirecting the IM session request32B to the first valid connection on the ordered list26of servers24(i.e., the IM server (server24#3) at the secondary site22B). This is indicated by arrow34B inFIG. 3. Thus, both IM session requests32A,32B are directed to the same server24in the multi-site environment20.

In this implementation, the session routing portlet28is responsible for defining the protocol, servers, port, path, and variables and their values that are required to create a valid URL. These values are defined as initialization parameters in portlet.xml. The following code snippet is used to loop through the servers24in the ordered list26of servers24to determine a valid URL (NOTE: “servers” is an argument passed to the service):

// Loop through all of the possible servers, looking for a URL that// is valid. Use the same protocol and the same path, since the// only that should be different between the sites is the server name.for (int i = 0; i < servers.size( ); i++) {// If this seems to be a valid and working URL, build the// base URL before appending the parameters to the end of it.if (URLHelper.isValidURL(request, protocol, (String) servers.get(i), path)) {url =URLHelper.buildURLWithoutParams(protocol,(String) servers.get(i),path);break;}}}

The URLHelper.isValidURL call can be as simple or as complicated as needed. A more complicated call may include evaluation of return codes or checking for specific strings. The following code snippet is used in the URLHelper.isValidURL method called above to attempt a connection using each server24defined in the ordered list26of servers24:

Once a valid connection is found, the variables and their corresponding values are appended to the URL string. The URLHelper class defines global variables that may be set in the initialization parameters (portlet.xml) of the session routing portlet28. If global variables have been configured to be included in the URL, their value will be pulled from portlet.xml and appended to the URL string. If there are additional runtime variables and values that need to be added to the URL string, a class may created to implement the RunTimeReplacement interface. This will allow a developer/administrator to define his/her own runtime variables. In an embodiment of the present invention, runtime parameters are pulled from portlet.xml in a similar manner to the global variables.

The solution provided by the present invention tests a URL for availability, and allows a developer/administrator to define the order in which to try connections. It also allows for flexibility by allowing the developer/administrator to define both global and runtime variables and values.

It should be noted that other types of front ends, other than a portal (session routing portlet28), can be used to provide the session routing functionality of the present invention in response to a user request for an IM session. For example, the present invention can be implemented on a front end hosted on IIS, WAS, etc. In response to the request for an IM session, the user will be “routed” to a site using the criteria set forth herein.

It should also be noted that the present invention can be applied to resources other than IM. As an example, a multi-site environment may require a file storage system to store uploads to a SME. If the files which are being stored are too large to be transferred efficiently across a WAN to the different sites in real time, a user could be routed to the appropriate server to upload the requested file.

A computer system100for routing sessions to a specific URL in a multi-site environment in accordance with an embodiment of the present invention is depicted inFIG. 4. Computer system100is provided in a computer infrastructure102. Computer system100is intended to represent any type of computer system capable of carrying out the teachings of the present invention. For example, computer system100can be a laptop computer, a desktop computer, a workstation, a handheld device, a server, a cluster of computers, etc. In addition, as will be further described below, computer system100can be deployed and/or operated by a service provider that offers a service for routing sessions to a specific URL in a multi-site environment in accordance with the present invention. It should be appreciated that a user104can access computer system100directly, or can operate a computer system that communicates with computer system100over a network106(e.g., the Internet, a wide area network (WAN), a local area network (LAN), a virtual private network (VPN), etc). In the case of the latter, communications between computer system100and a user-operated computer system can occur via any combination of various types of communications links. For example, the communication links can comprise addressable connections that can utilize any combination of wired and/or wireless transmission methods. Where communications occur via the Internet, connectivity can be provided by conventional TCP/IP sockets-based protocol, and an Internet service provider can be used to establish connectivity to the Internet.

Computer system100is shown including a processing unit108, a memory110, a bus112, and input/output (I/O) interfaces114. Further, computer system100is shown in communication with external devices/resources116and one or more storage systems118. In general, processing unit108executes computer program code, such as session routing portlet28, that is stored in memory110and/or storage system(s)118. While executing computer program code, processing unit108can read and/or write data, to/from memory110, storage system(s)118, and/or I/O interfaces114. Bus112provides a communication link between each of the components in computer system100. External devices/resources116can comprise any devices (e.g., keyboard, pointing device, display (e.g., display120, printer, etc.) that enable a user to interact with computer system100and/or any devices (e.g., network card, modem, etc.) that enable computer system100to communicate with one or more other computing devices.

Computer infrastructure102is only illustrative of various types of computer infrastructures that can be used to implement the present invention. For example, in one embodiment, computer infrastructure102can comprise two or more computing devices (e.g., a server cluster) that communicate over a network (e.g., network106) to perform the various process steps of the invention. Moreover, computer system100is only representative of the many types of computer systems that can be used in the practice of the present invention, each of which can include numerous combinations of hardware/software. For example, processing unit108can comprise a single processing unit, or can be distributed across one or more processing units in one or more locations, e.g., on a client and server. Similarly, memory110and/or storage system(s)118can comprise any combination of various types of data storage media that reside at one or more physical locations. Further, I/O interfaces114can comprise any system for exchanging information with one or more external devices/resources116. Still further, it is understood that one or more additional components (e.g., system software, communication systems, cache memory, etc.) not shown inFIG. 4can be included in computer system100. However, if computer system100comprises a handheld device or the like, it is understood that one or more external devices/resources116(e.g., a display) and/or one or more storage system(s)118can be contained within computer system100, and not externally as shown.

Storage system(s)118can be any type of system (e.g., a database) capable of providing storage for information under the present invention. To this extent, storage system(s)118can include one or more storage devices, such as a magnetic disk drive or an optical disk drive. In another embodiment, storage system(s)118can include data distributed across, for example, a local area network (LAN), wide area network (WAN) or a storage area network (SAN) (not shown). Moreover, although not shown, computer systems operated by user104can contain computerized components similar to those described above with regard to computer system100.

Shown in memory110(e.g., as a computer program product) is a session routing portlet28for routing sessions to a specific URL in a multi-site environment system in accordance with embodiments of the present invention. The session routing portlet28includes a URL helper service30. The URL helper service30includes a set of URL helper classes that are configured to generate a URL based on an ordered list26of servers and associated information including the protocol, port, and path. The ordered list26of servers can be stored in storage unit118. A list generation system130can be provided to generate the ordered list26of servers. Using the ordered list26of servers, the URL helper service30determines a valid URL by looping through the list until a successful connection can be found.

The present invention can be offered as a business method on a subscription or fee basis. For example, one or more components of the present invention can be created, maintained, supported, and/or deployed by a service provider that offers the functions described herein for customers. That is, a service provider can be used to provide a service for routing sessions to a specific URL in a multi-site environment instant messaging system, as described above.

It should also be understood that the present invention can be realized in hardware, software, or any combination thereof. Any kind of computer/server system(s)—or other apparatus adapted for carrying out the methods described herein—is suitable. A typical combination of hardware and software can include a general purpose computer system with a computer program that, when loaded and executed, carries out the respective methods described herein. Alternatively, a specific use computer, containing specialized hardware for carrying out one or more of the functional tasks of the invention, can be utilized. The present invention can also be embedded in a computer program product, which comprises all the respective features enabling the implementation of the methods described herein, and which—when loaded in a computer system—is able to carry out these methods.

The medium can be an electronic, magnetic, optical, or semiconductor system (or apparatus or device). Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, removable computer diskette, random access memory (RAM), read-only memory (ROM), rigid magnetic disk and optical disk. Current examples of optical disks include a compact disk-read only disk (CD-ROM), a compact disk-read/write disk (CD-R/W), and a digital versatile disk (DVD).

Computer program, software program, program, or software, in the present context mean any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following: (a) conversion to another language, code or notation; and/or (b) reproduction in a different material form.