Serving assets in a networked environment

A method and system for serving assets is disclosed, comprising receiving an asset request to serve an asset, wherein the asset request originates at an application, and wherein the asset request comprises an advertisement of an asset to be served and a request for the network address of an asset server configured to serve the requested asset. The method further comprises causing a service discovery server to identify an asset server configured to serve the requested asset, and causing the requested asset to be served to the application.

TECHNICAL FIELD

The present disclosure relates to methods and systems of serving assets in a networked environment.

BACKGROUND

Cloud computing is a computing infrastructure for enabling ubiquitous access to shared pools of servers, storage, computer networks, applications and data assets, which can be rapidly provisioned, often over the Internet.

Hitherto, when applications have required data assets, these data assets have been served from the application itself. In such approaches, each application maintains its own local database containing the assets required by that application. This usual approach requires a full web server that can serve all API requests as well as all of the assets required by the application. In platforms intended to serve multiple application, such approaches lead to a large amount of code duplication.

SUMMARY

A first aspect provides a method comprising: receiving an asset request to serve an asset, wherein the asset request originates at an application, and wherein the asset request comprises an advertisement of an asset to be served and a request for the network address of an asset server configured to serve the requested asset; causing a service discovery server to identify an asset server configured to serve the requested asset; and causing the requested asset to be served to the application.

Causing the requested asset to be served to the application may comprise causing the service discovery server to send an asset service instruction message to the asset server configured to serve the requested asset to serve the requested asset to the application.

The method may further comprise: retrieving, by the asset server configured to serve the requested asset, the requested asset from an asset repository; and serving, by the asset server configured to serve the requested asset, the requested asset to the application.

The method may further comprise: identifying, by the asset server, one or more versions of the requested asset in the asset repository; selecting, by the asset server, a most recent version of the requested asset; and serving the most recent version of the requested asset to the application.

Identifying the one or more versions of the requested asset in the asset repository may comprise accessing an index file from the asset repository, the index file containing a list of versions of respective assets stored in the asset repository.

The method may further comprise causing an authentication procedure to be executed to determine whether the application is authorised to receive the requested asset.

The method may further comprise, if the application is positively authenticated, causing a virtual token to be issued to the application.

The virtual token may be incorporated in the asset request.

The method may further comprise identifying a permission level associated with the virtual token.

The method may further comprise identifying an asset associated with the permission level.

The virtual token may be a JSON web token.

The asset request may further comprise a version constraint specifying one or more versions of the requested asset to be served.

The asset may be a static asset.

A further aspect provides a computer program comprising computer readable code that, when executed by a computing apparatus, causes the computing apparatus to perform the method of any preceding definition.

A further aspect provides an apparatus comprising one or more processors or special-purpose computing hardware configured to perform the method of any preceding method definition.

A further aspect provides a non-transitory computer-readable storage medium having stored thereon computer-readable code, which, when executed by at least one processor, causes the at least one processor to perform a method, comprising: receiving an asset request to serve an asset, wherein the asset request originates at an application, and wherein the asset request comprises an advertisement of an asset to be served and a request for the network address of an asset server configured to serve the requested asset; causing a service discovery server to identify an asset server configured to serve the requested asset; and causing the requested asset to be served to the application.

A further aspect provides an apparatus, the apparatus having at least one processor and at least one memory having computer-readable code stored thereon which when executed controls the at least one processor: to receive an asset request to serve an asset, wherein the asset request originates at an application, and wherein the asset request comprises an advertisement of an asset to be served and a request for the network address of an asset server configured to serve the requested asset; to cause a service discovery server to identify an asset server configured to serve the requested asset; and to cause the requested asset to be served to the application.

DETAILED DESCRIPTION

In brief, this specification provides methods and systems that provide, as part of a central platform, a content delivery network comprising one or more asset servers configured to serve data assets to one or more applications that request particular data assets.

An application at the front end of a platform sends an asset request message that advertises what asset(s) are required by the application as well as requesting the network address of an asset server which is configured to serve the requested asset. The asset server which is configured to serve the requested asset is located using a service discovery mechanism. The requested asset is then provided to the application by the appropriate asset server. Example assets may include dynamic or static assets such as HTML pages, JavaScript files, Cascading Style Sheets (CS S) files and so forth.

This means that the requirement of storing data assets as part of the infrastructure of each individual application is eliminated. Thus, much of the backend functionality of each of the applications can be centralized within the central platform. Since the various applications that use a central platform are distributed remotely with respect to each other and with respect to the central platform, this leads to a considerable reduction in the overall amount of computational infrastructure that needs to be deployed for each application. In other words, this leads to a simplification of build processes. This, in turn, leads to significant cost savings, avoids code duplication and furthermore provides greater options for front end plugins.

The software platform may be an enterprise software platform associated with an enterprise platform provider. An enterprise software platform enables use by multiple users and applications, internal and external to the enterprise platform provider. The users may be users of different respective organisations, such as different commercial companies.

FIG. 1is a network diagram depicting a network system100comprising an application102and a central platform104. The application102and the central platform interact as front end and backend, respectively. For the sake of simplicity, only one application is depicted inFIG. 1. However, it should be understood that any number of applications may interact with the central platform104.

The central platform104comprises a service discovery system106, a content discovery network108comprising one or more asset servers110and an asset repository112. In some embodiments, such as the one shown inFIG. 1, the network system100further comprises an authenticator114. Each component of the central platform104, including each of the asset servers110, may be located in a separate physical location over a distributed network.

As the content delivery network108may be deployed over several machines, using a service discovery system106is advantageous since particular data assets may move over time. Using a service discovery mechanism ensures that the correct asset server is found in response to each asset request. In addition to the location of an asset changing, the content of a data asset can change over time. As applications request data assets, up-to-date versions of the requested assets can be provided for example as an application user refreshes a page displayed by the application. As such, updating data assets is simplified because newer versions of data assets only need to be saved into the asset repository112of the central platform104.

In some embodiments, access to data assets may be restricted by using an authentication system, such as the authenticator114ofFIG. 1. In this example embodiment, the authenticator114is configured to issue a virtual token in response to successful authentication of the application102. Authentication of the application may take the form of authenticating a user of an application for example, by requesting a username and password be input via a user interface of the application. The virtual token may then be incorporated into an asset request that is submitted to the service discovery system106of the central platform104. In other embodiments, other methods of authentication of an application and/or a user of the application, as well as protocols for communicating authentication information and securing access to the content delivery network108may be implemented.

FIG. 2is a block diagram showing the application102in more detail. In this example embodiment, the application102itself comprises front end and back end portions. At the application front end, a client device200may be provided. At the application back end, an application server202may be provided. The application server202may have access to a local database204which stores information relevant to the functionality of the particular application102. However, data assets that are used by other applications that interact with the central platform104are not stored in the local database204. Such data assets are, instead, stored in the asset repository112of the central platform104, and requested by the application102as needed. In some embodiments, a particular data asset may be requested from the asset repository112each time it is used by the application102, while in other embodiments the particular data asset may be requested again from the asset repository112only if a predetermined time has passed since the same asset was previously retrieved from the asset repository112.

The application102may be configured to interact with the central platform104via a network.

FIG. 3is a block diagram showing one embodiment of the client device200, the application server202and intermediate entities of an application network. The client device200comprises a computer system137. Depending on the implementation, computing systems discussed herein may include fewer or additional components, and the components may be configured in different arrangements, such as in various distributed configurations.

Computer system137includes a bus138or other communication mechanism for communicating information, and a hardware processor139coupled with bus138for processing information. Hardware processor139can be, for example, a general purpose microprocessor. Hardware processor139comprises electrical circuitry.

Computer system137includes a main memory140, such as a random access memory (RAM) or other dynamic storage device, which is coupled to the bus138for storing information and instructions to be executed by processor139. The main memory140can also be used for storing temporary variables or other intermediate information during execution of instructions by the processor139. Such instructions, when stored in non-transitory storage media accessible to the processor139, render the computer system137into a special-purpose machine that is customized to perform the operations specified in the instructions.

Computer system137further includes a read only memory (ROM)141or other static storage device coupled to the bus138for storing static information and instructions for the processor1139. A storage device142, such as a magnetic disk or optical disk, is provided and coupled to the bus138for storing information and instructions.

Computer system137can be coupled via the bus138to a display143, such as a cathode ray tube (CRT), liquid crystal display, or touch screen, for displaying information to a user. An input device144, including alphanumeric and other keys, is coupled to the bus138for communicating information and command selections to the processor139. Another type of user input device is cursor control145, for example using a mouse, a trackball, or cursor direction keys for communicating direction information and command selections to the processor139and for controlling cursor movement on the display143. The input device typically has two degrees of freedom in two axes, a first axis (for example, x) and a second axis (for example, y), that allows the device to specify positions in a plane.

Computer system137can implement the techniques described herein using customized hard-wired logic, one or more ASICs or FPGAs, firmware and/or program logic which in combination with the computer system causes or programs computer system137to be a special-purpose machine. According to some embodiments, the operations, functionalities, and techniques disclosed herein are performed by computer system137in response to the processor139executing one or more sequences of one or more instructions contained in the main memory140. Such instructions can be read into the main memory40from another storage medium, such as storage device142. Execution of the sequences of instructions contained in main memory140causes the processor139to perform the process steps described herein. In alternative embodiments, hard-wired circuitry can be used in place of or in combination with software instructions.

Various forms of media can be involved in carrying one or more sequences of one or more instructions to processor139for execution. For example, the instructions can initially be carried on a magnetic disk or solid state drive of a remote computer. The remote computer can load the instructions into its dynamic memory and send the instructions over a telephone line or other transmission medium using a modem. A modem local to computer system137can receive the data on the telephone line or other transmission medium and use an infra-red transmitter to convert the data to an infra-red signal. An infra-red detector can receive the data carried in the infra-red signal and appropriate circuitry can place the data on bus138. Bus138carries the data to the main memory140, from which the processor139retrieves and executes the instructions. The instructions received by the main memory140can optionally be stored on the storage device142either before or after execution by the processor139.

Computer system137also includes a communication interface146coupled to the bus138. The communication interface146provides a two-way data communication coupling to a network link147that is connected to a local network148. For example, the communication interface146can be an integrated services digital network (ISDN) card, cable modem, satellite modem, or a modem to provide a data communication connection to a corresponding type of telephone line. As another example, the communication interface146can be a local area network (LAN) card to provide a data communication connection to a compatible LAN. Wireless links can also be implemented. In any such implementation, the communication interface146sends and receives electrical, electromagnetic or optical signals that carry digital data streams representing various types of information.

The network link147typically provides data communication through one or more networks to other data devices. For example, the network link147can provide a connection through the local network148to a host computer149or to data equipment operated by an Internet Service Provider (ISP)150. The ISP150in turn provides data communication services through the world wide packet data communication network now commonly referred to as the “Internet”151. The local network148and internet151both use electrical, electromagnetic or optical signals that carry digital data streams. The signals through the various networks and the signals on the network link147and through the communication interface146, which carry the digital data to and from the computer system137, are example forms of transmission media. Through these intermediate network entities, the client device200can communicate with the application server202.

FIG. 4schematically illustrates a timeline of operations performed by the application102, service discovery system106, asset server110, asset repository112and authenticator114. These operations are shown in the context of the interactions between these entities.

At operation4.1, the application102submits an authentication request to the authenticator114. The authentication request may take the form of a user entering a username and password into a user interface displayed by the application via a client device.

At operation4.2, in response to a successful authentication of the application or of the user of the application, the authenticator114issues a virtual token to the application102. In one embodiment, the virtual token is a cryptographic statement confirming the identity of the application or of the user of the application. For example, the virtual token may be a JSON web token. The virtual token may indicate a permission level. For example, a first type of virtual token may be issued indicating that the user has an ‘Administrator’ status whilst a second type of virtual token may be issued indicating that the user only has a User′ status indicating a lower permission level.

At operation4.3, the application102sends an asset request message to the service discovery system106.

An example asset request message500is shown inFIG. 5. The asset request message500contains an asset advertisement501, a request502for the network address of the asset server configured to provide the requested asset. In embodiments where authentication is employed, the asset request message500also contains a virtual token503.

In some embodiments, the asset request message500further comprises a version constraint specifying one or more versions of the requested asset to be served. This allows the user greater flexibility to have assets served in accordance with a specification set by the user.

A request for the particular asset or assets, in the form of an asset advertisement501, serves to inform the central platform104which assets are to be served to the application102. This ensures that only those assets requested by the application102are served and that no unnecessary data assets are served. By providing the virtual token503in the asset request message500, it is possible for the elements within the central platform104to determine what permissions the application102or user of the application102has. This can help to ensure that assets are served to the user in accordance with that user's access rights.

The service discovery system106is configured to execute a service discovery mechanism to discover which asset server110within the content delivery network108is configured to serve the requested asset to the application102. Such service discovery may be performed using any suitable discovery protocol and may involve routing suitable remote procedure calls (RPC) through the content delivery network108to find the asset server110within the content delivery network108which is configured to serve the request asset to the application102.

Once the service discovery system106has identified the asset server110within the content delivery network108which is configured to serve the request asset to the application102, the service discovery system106sends an instruction message to the identified asset server110, at operation4.4. The instruction message may also contain the virtual token503.

At operation4.5, the asset server110retrieves the requested asset from the asset repository112. In embodiments using authentication, the asset request message and instruction message may both contain the virtual token which allows the retrieved asset to be in accordance with any permissions that are set for the application102or the particular user of the application102.

Depending on the type of asset, different versions thereof may be stored in the asset repository112. The asset server110may identify one or more versions of the requested asset in the asset repository112. The different versions of respective assets may be listed in an index file in the asset repository112which is readable by the asset server110. The asset server110may be configured to select the most recent version of the data asset, retrieve said most recent version and serve said most recent version to the application102. In some embodiments, different versions of an assets may be accessible by different asset servers110, such that selection of the appropriate asset server110by the service discovery system106considers which version of the assets to serve to the application102and selects the asset server110that is best suited to serve that version of the assets to the application102.

The asset server110may have access to a library containing permissions associated with different types of token. For example, certain data assets may be only be served in response to receipt of a request containing an ‘Administrator’ token. The asset server110may identify the permission level associated with the virtual token. The asset server110may then retrieve data assets in accordance with the identified permission level.

At operation4.6, the asset server110serves the requested asset to the application102. The application102can then consume the served asset. For example, the served asset may be an HTML page or CSS file which can then be used by the application to provide content to a user of the application102. In some embodiments, certain assets may not directly impact content that is provided to the user of the application102, and may initiate request for further assets, such as via the service discovery system106discussed herein. Thus, asset requests may be linked and automatically executed as other assets are retrieved from prospective as is110.

FIG. 6is a flow chart illustrating operations taken in embodiments of the disclosure.

At operation6.1, the central platform104receives an asset request to serve a data asset. The asset request originates at an application102. The asset request comprises an advertisement of an asset to be served and a request for the network address of an asset server configured to serve the requested asset. At operation6.2, a service discovery system identifies an asset server configured to serve the requested asset. At operation6.3, the requested asset is served to the application102.

In the foregoing specification, the example embodiment(s) of the present invention have been described with reference to numerous specific details. However, the details may vary from implementation to implementation according to the requirements of the particular implement at hand. The example embodiment(s) are, accordingly, to be regarded in an illustrative rather than a restrictive sense.