Databases Reference
In-Depth Information
Application Server
DB
Cache
Cached Results
Climate Data
Application
Programming
Interface
Tile Mapping
Web
Service
Interface
JSON/XML
PNG/JPEG
PNG/JPEG
HTML
Mobile Clients
Web Browsers
Fig. 2 . The application server
as well as allowing for greater design flexibility. The 10Green application server
uses a REST-based design for two main reasons: First, REST facilitates rapid
and effective scaling of the number of server instances from a single instance
to tens or hundreds during periods of high usage. The fundamental principles
of the REST style require that clients interact with the server through a stan-
dardized interface and that all necessary state is encoded entirely within each
transactions made between the client and the server. A request made to the
server is not dependent on any implicit state maintained by the server (there is
none). Thus, any available server instance can service any incoming request from
clients. Scalability is important for the 10Green application, which experiences
large spikes in load after media coverage while the average load is very low. Sec-
ond, the REST approach facilitates the development of client applications and
application components for specialized needs. Implementing a RESTful client
requires very little overhead, which is favorable in resource constrained environ-
ments such as mobile devices [11,13]. In addition to easing development of the
10Green mobile app, this design also makes it easy for developers not familiar
with the main 10Green code-base to incorporate some of the underlying data,
metrics, maps, and other items in their own applications.
2.2 Application Programming Interface (API)
In order to request data from the server, a client interacts with one of the avail-
able resources that are published by the server using a set of global identi-
fiers (HTTP URIs). For example, the client may retrieve information about the
10Green carbon monoxide parameter using an HTTP GET request for the URI
http://www.10green.org/api/parameters/co . The 10Green API transfers the
requested resources in a structure that facilitates programmatic access. The two
representations currently supported are JSON (JavaScript Object Notation) [5]
and XML (Extensible Markup Language) [3]. The API imposes no usage pat-
terns beyond the REST principles and so allows flexible and creative uses of the
underlying data, metrics, and map features.
Search WWH ::




Custom Search