The present disclosure relates generally to the use of application programming interfaces. More particularly, the present disclosure relates to the use of application programming interfaces in complex integration environments for multi-tenant, multi-data center applications.
Historically, the preferred way to deliver web services is through HTTP, which typically means browsers communicating with web servers. However, the stateless nature of HTTP requires the use of some method for identifying the actions of a particular user in a particular user session. Web based companies have used the concept of session IDs as a way to maintain session, using primarily three methods: (1) session id information embedded in the URL, which is received by the application through HTTP GET requests when the user clicks on links embedded in a page, (2) session id information stored within the fields of a form and submitted to the application (e.g. a hidden field submitted with the HTTP POST command), or (3) using cookies. There are many drawbacks to these methods, particular in the area of security. Session ids may be hacked fairly easily, cookies may be deleted.
Traditionally, e-commerce communications from a user shopping on a merchant web site involves the browser calling the e-commerce system directly. This works for sites that are hosted by the e-commerce provider. The e-commerce system drops cookies on the browser, telling the requests how to route. As e-commerce providers turned to the use of web APIs, such as RESTful APIs, a cookieless solution is required. API gateways have been used to create tokens for session management. A token may be stored in a data base so that the session may be recognized with each request. Problems arise when more than one gateway is used and synchronization is required. If the system has more than one gateway that routes all requests, the multiple gateways require synchronization, which adds a lot of complexity.
Prior session management solutions have not addressed the special issues of an application with multiple data center locations. A global e-commerce provider may have multiple data center locations located anywhere in the world. In addition, the client and user can both be located anywhere in the world. An application located in multiple locations provides an added complexity to the situation. A global e-commerce application, for example, may support world-wide commerce by locating data centers throughout the world. Session management in this multi-tenant, multi data center environment is challenging, particularly when all servers are active at all times. The present disclosure provides a solution to these needs and other problems, and offers other advantages over the prior art.
E-commerce providers may offer a wide variety of services to online merchants and distributors. The global nature of e-commerce services may require multiple data centers with multiple servers located throughout the world. This system and method allows formerly web-page driven transactions to be API driven instead. APIs may be added to access e-commerce systems without making changes in the e-commerce system itself. This allows the merchant/client to host their own web pages and use APIs to connect to the backend commerce system. Of particular importance is the use of the solution in multi-data center environments, such as those used by a global e-commerce system. To maintain performance, load balancing and local features, the system may have data centers distributed throughout the world. When a user shops a client store, the transactions should be sent to the data center local to the user, regardless of where in the world the client store is located.
An API gateway is employed to authenticate incoming traffic based on a previously provided key (usually created from the client id and the site id—a client may have several sites) and to route API traffic to the appropriate data center. When the authenticated transactions reach the appropriate data center, a token is created from various transaction-related properties, including the key, currency, and locale, and possibly other properties including the cookie identifier. The token is encrypted for enhanced security. The token is then passed between the systems thereafter identifying the appropriate data center comprising the session.
Additional advantages and features of the disclosed system and method will be set forth in part in the description which follows, and in part, will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the system and method disclosed.
A system and method for managing user sessions in a multi-tenant, multi-data center environment is disclosed. A user session is generally understood to be the period of time that a user with a unique IP address interacts with an application. For the purpose of the disclosed embodiments, a “session” will also include the activities performed by the user during that period of time. A multi-tenant environment is one in which there are numerous users accessing an application through numerous client websites over a communication network such as the internet, each using the same API set to do so. A multi-data center environment is one in which multiple data centers exist for an application, each data center consisting of multiple servers, each with memory storing modules containing program code which when executed by the server's processor performs the functionality of the application. The data centers may be identical versions of the application and may be located throughout the world. In one embodiment, the multi-tenant, multi-data center environment comprises numerous shopping websites (merchants/clients) through which users perform shopping behaviors and transactions against an e-commerce application system. A session management system and method provides an accurate and efficient means for maintaining internet communication session connections in a multi-tenant, multi-data center environment using APIs.
Referring to
In a web environment, communications between a merchant web site and an e-commerce system may mean accessing a multi-data center system coincident with thousands of others making similar requests. As was discussed above, session management in a web environment was previously maintained using techniques, such as cookies, to carry information identifying the calling device and transaction in order to maintain continuity of transactions. However, when the merchant uses APIs to access back end e-commerce system processes, a different solution is required. Use of multiple data centers 118 with multiple active servers per data center 118 adds additional complexity to these communications.
The use of APIs offer various benefits over cookies and redirection techniques, including enhanced security; the ability for web sites outside of the e-commerce system's own network to access the e-commerce back end functionality; the ability to build separate applications that support the system's functionality such as reviewing order history, using merchandizing features, and searching for products; and the ability to tap into individual or global modules, to name a few. Multiple data centers allow an application to distribute its transactions/traffic in a way that most efficiently addresses the needs of both the application system and the user.
Referring again to
In another embodiment, the browser may call directly to the gateway with cookies comprising the API key. Authentication and validation are performed. If the API key is valid, the gateway sends the request to the data center depending on geolocation. The data center creates the session and returns the token with the key and the session id and domain encrypted. From then on, all calls to that come in from the user have the key, which is decrypted and validated by the gateway, and are routed to the appropriate data center.
Because the token knows the cookie values and vice versa, communications may switch from cookies (session management for web transactions) to token (session management for API transactions) to cookies (returning web transactions). Both token and cookie have the ability to establish a session. Having both allows the communication to sync back and forth between the token and the cookie using the cookie with the web offering, passing the token identifier and information to the cookie and accessing the backend system with an API (token) versus going through a web browser. This allows the use of front end technologies with the cookie, and backend technologies with the token, and allows the developer to combine disparate technologies.
The method is illustrated in
As was mentioned above, the token may comprise various properties that facilitate the user's transactions. Information related to the session may be included, such as the e-commerce system token identifier, the web session cookie, a shopper domain, cart id, shopper id, currency, locale, and the client key which may be further comprised of the site id and a company id.
Referring again to
The environment in which a session management system and method operates is necessarily composed of a number of electronic components. E-commerce systems are hosted on servers located in data centers that are accessed by networked (e.g. internet) users through a web browser on a remote computing device and an API request created by the client website. One of ordinary skill in the art will recognize that a “host” is a computing system that is accessed by a user, usually over cable or phone lines, while the user is working at a remote location. The system that contains the data and functionality is the host, while the computing system at which the user sits is the remote system. Software modules may be referred to as being “hosted” by a server. In other words, the modules are stored in memory in the system for execution by a processor. The various components of an e-commerce service provider include modules performing catalog, merchandising, shopping cart, pricing, payments, tax, and fulfillment, among others. The e-commerce application may further comprise application interfaces, application programming interfaces (APIs), a commerce engine, services, third party services and solutions, and client and partner integrations. The application interfaces may include tools that are presented to a user for use in implementing and administering online stores and their functions, including, but not limited to, store building and set up, merchandising and product catalog (user is a store administrator or online merchant), or for purchasing items from an online store (user is a shopper). For example, users may access the client website from a computer workstation or server, a desktop or laptop computer, or a mobile device. The client may then access the e-commerce system using APIs, which provide communications from the client's web servers to the e-commerce system data center application servers. A commerce engine comprises a number of components required for online shopping, for example, modules with instructions stored in memory that when executed by the processor perform functions related to customer accounts, orders, catalog, merchandizing, subscriptions, tax, payments, fraud, administration and reporting, credit processing, inventory and fulfillment. Services support the commerce engine and comprise one or more of the following: fraud, payments, and enterprise foundation services (social stream, wish list, saved cart, entity, security, throttle and more). Third party services and solutions may be contracted with to provide specific services, such as address validation, payment providers, tax and financials. Client integrations may include fulfillment partners, client fulfillment systems, and warehouse and logistics providers.
As is well known in the art, an electronic computing device, such as a server, laptop, tablet computer, smartphone, or other mobile computing device typically includes, among other things, a processor (central processing unit, or CPU), memory, a graphics chip, a secondary storage device, input and output devices, and possibly a display device, all of which may be interconnected using a system bus. Input and output may be manually performed on a sub-component of the computer or device system such as a keyboard or disk drive, but may also be electronic communications between devices connected by a network, such as a wide area network (e.g. the Internet) or a local area network. The memory may include random access memory (RAM) or similar types of memory. Software applications stored in the memory or secondary storage for execution by a processor are operatively configured to perform the operations in one embodiment of the system. The software applications may correspond with a single module or any number of modules. Modules of a computer system may be made from hardware, software, or a combination of the two. Generally, software modules are program code or instructions for controlling a computer processor to perform a particular method to implement the features or operations of the system. The modules may also be implemented using program products or a combination of software and specialized hardware components. In addition, the modules may be executed on multiple processors for processing a large number of transactions, if necessary or desired.
A secondary storage device may include a hard disk drive, floppy disk drive, CD-ROM drive, DVD-ROM drive, or other types of non-volatile data storage, and may correspond with the various equipment and modules shown in the figures. The processor may execute the software applications or programs either stored in memory or secondary storage or received from the Internet or other network. The input device may include any device for entering information into computer, such as a keyboard, joy-stick, cursor-control device, or touch screen. The display device may include any type of device for presenting visual information such as, for example, a computer monitor or flat-screen display. In the context of the presently described invention, the output device may include any type of device used to provide information in machine-readable form. Although the computer, computing device or server has been described with various components, it should be noted that such a computer, computing device or server can contain additional or different components and configurations.
It is to be understood that even though numerous characteristics and advantages of various embodiments of the present invention have been set forth in the foregoing description, together with details of the structure and function of various embodiments, this disclosure is illustrative only, and changes may be made in detail, especially in matters of structure and arrangement of parts within the principles of the present invention to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed. For example, the particular properties of a token may vary depending on the particular application, while maintaining substantially the same functionality without departing from the scope and spirit of the present invention.
This application claims the benefit of U.S. Provisional Patent Application No. 61/922,280 filed on 31 Dec. 2013, titled “Session Management in a Multi-Tenant, Multi-Data Center Environment System and Method,” and which application is incorporated herein by reference. A claim of priority is made.
Number | Date | Country | |
---|---|---|---|
61922280 | Dec 2013 | US |