Programming with the ESE API

The ESE API enables IDL programs to perform remote processing using the ESE Rest API provided by the Geospatial Services Framework. To use the API, you need IDL and an GSF that is running locally or remotely.

The benefits of remote processing are:

The benefits of using the ESE API to run tasks are:

The API can be used by IDL desktop applications and tasks since they are written in IDL. For example, a task could be implemented as an amalgamation of several other tasks that are chained or even running concurrently.

Getting Started with the ESE API

The ESE API provides classes that represent ESE Rest API endpoints. There is an ESETask class that allows setting of input and task execution. There is an ESEJob that provides information on job output from task execution.

There is an ESE static class that provides a starting point to writing an ESE client application. It is never instantiated and has only static methods. Typically applications will start by using ESE::FindTask, ESE::GetTask or ESE::GetServer, depending on whether you want to quickly run a task, or introspect the available services and tasks. The ESE class also has mechanisms for controlling jobs that are running concurrently and for handling custom data types.

A common pattern for running a task is:

For example:

Task = ESE.GetTask('http://localhost:9191/ese/services/IDL/addition')

 

Job = Task.Run(a=2, b=2)

 

Info = Job.Info()

 

IF (Info.Status eq ESE.jobSucceeded) THEN BEGIN

PRINT, strtrim(job.a, 2) + ' + ' + strtrim(job.b, 2) + ' = ' + strtrim(job.c, 2)

ENDIF ELSE BEGIN

PRINT, 'Error: ' + Info.Status

ENDELSE

Highlights of the ESE API

As described previously, you can use the ESE API can to find tasks, run them, and get results. The ESE API topics provide details of the API's capabilities. Some highlights of those capabilities are: