API’s

API’s

MediaRich is an application server designed specifically to make it easy to create images & videos from flexible and efficient image & video templates. The platform consists of several components:

API
Client APIs

The client APIs allow end-users to generate requests and process responses. MediaRich includes support for standard HTTP URLs, Web Services, and COM.

Media Generator Server

The Media Generator server is a multi-threaded application server which accepts incoming requests and either returns a previously cached response or executes the appropriate MediaScript to handle the request.

MediaScript

MediaScript is an interpreted scripting language based on the ECMAScript (commonly known as JavaScript) language specification. MediaScript extends ECMAScript with several new objects which provide image processing and general application server functionality.

MediaRich SDK

The MediaRich SDK allows developers to extend the built-in functionality with new filesystems, file format support, and image processing functions.

MediaRich uses a simple stateless protocol for forming image processing requests and streaming back the resulting image data. The life-cycle of a MediaRich request follows these steps:

API---flow
1. Request Creation

Clients create requests to apply an image template (written in MediaScript) to a specific set of parameters. A MediaRich request consists of several elements: a MediaScript file path, the name of a function within that script to execute, arguments to that function, and other user- and system-defined parameters.

2. Request Execution

Once a request has been created, it can be executed by using one of the client APIs: HTTP URLs, Web Services, or COM. HTTP URLs are usually embedded in HTML <img src=”…”> tags, in which case the web browser executes the request. Alternatively, applications can send requests directly to the Media Generator via Web Services or COM.

3. Cache Lookup

When the Media Generator receives a request, it first checks its internal cache for a previously generated and cached response. If one is found it is returned as the response and the MediaScript execution step is skipped. Otherwise, the requested MediaScript is executed.

4. MediaScript Execution

The requested MediaScript function is executed using the arguments and parameters supplied in the request. The MediaScript sets the response object (usually an image) and whether the response should be cached or streamed directly to the client. When the script terminates, the response is sent to the client.

5. Response Handling

Finally, the client processes the response. A response can be either a path (in the case of a cached or file path response) or the actual binary data (in the case of a streamed response).

Back to Developer Resources

MediaRich Brochure

Equilibrium Solutions Brochure