Jarvis
The Jarvis Web Gateway is a lightweight web-service designed to give Rich Internet Applications a rapid, powerful and secure mechanism to access and update server-side databases. Jarvis can be configured to use Apache’s mod_perl
or FCGI
for better performance than simple CGI.
Jarvis supports fetch, create, update and delete with additional support for custom plug-in features. Jarvis is based on the RESTful approach to HTTP web services. It provides JSON, XML interfaces, with additional support for CSV and MS Excel downloads.
Jarvis works with most modern JavaScript web frameworks such as Angular providing a RESTful interface backed by any database for which a Perl DBI driver exists. This include Oracle, PostgreSQL, MySQL, SQL Server, SQLite and more.
Introduction
Jarvis is “helper glue”. It is designed to bridge the gap between your web-apps and your back-end database.
The three standard components in a solution using Jarvis are:
- Rich Internet Application. Ajax (JSON) requests and responses.
- Jarvis.
- Database. Accessible via SQL/DBI, MongoDB, or SDP.
Front-end RIAs are often written using technologies such as Angular. These are often simple CRUD (CReate, Update, Delete) applications which simply wish to perform basic operations on a back end database.
This requires some server script to handle data requests over HTTP and perform the corresponding back-end database transactions in a manner which is secure, extensible, standards-based and reasonably efficient.
Jarvis is that server script, and meets those three key requirements.
Secure
- Jarvis can run over HTPS.
- Jarvis uses single-login and CGI cookies to maintain authenticated sessions.
- Jarvis uses parameterized statements to prevent against SQL injection.
- Jarvis provides group-based access control.
Extensible
- Jarvis provides independent
datasets
, defined as simple XML files containing SQL. - Jarvis provides configurable
exec
extensions (e.g. running external reporting). - Jarvis provides a
plugin
mechanism for adding custom Perl modules.
Standards-Based
- Jarvis is based on JSON (or XML), HTTP/S and REST.
Reasonably Efficient
- Jarvis is “plenty fast enough”.
- Jarvis is written in a scripted language as many back end services are.
- Jarvis can cache database connections under Fast CGI.
In practical use, the load added by Jarvis appears to be very minimal - and Jarvis performance isn’t likely to become a major concern unless you are running a very intensive application.