PDF version
Gomba - Java RESTful web services
What is it?
Gomba is a collection of Java servlets that allow developers to quickly build RESTful web services. Gomba acts as an interface between relational databases and the Web.
Features
- Read from and write to a RDBMS using HTTP and XML.
- Render SQL resultsets to XML.
- Customizable XML output using XSLT.
- Build dynamic SQL using JSP and JSTL.
- Support for BLOB and CLOB SQL data types.
- Multipart form request handling.
- RESTful transactions.
- RESTful error handling using XML responses.
- Works with any database that supports JDBC (MySQL, PostgreSQL, Oracle, etc.)
Simple
Simple web services can be created by just editing the Web Application Deployment Descriptor (web.xml). User knowledge requirements are SQL, HTTP and being able to run a Servlet container. Gomba fits nicely into the Servlet framework, so any previous knowledge of the Servlet API, JSP, JSTL and XSLT will be helpful.
Lightweight
The basic idea is that Gomba streams data and never holds large buffers in memory. This is accomplished by using the SAX API to generate and transform XML and Java IO streams to transfer data around.
By design Gomba does not feature a cache, leaving that kind of work to a dedicated HTTP cache (proxy) such as Apache mod_cache or Squid or to an in-process Java cache such as OSCache.
Secure
Gomba always uses prepared statements so it is impossible for a client to modify the SQL by passing in single quotes and other tricks.
Open Source
Gomba is Open Source software, and you are welcome to modify it and redistribute it under certain conditions. See the Legal page for details. Here's a list of tools used by Gomba:
- Apache Jakarta Commons BeanUtils is used to perform conversions from strings to other Java types.
- Apache Jakarta Commons FileUpload is used to read multipart requests.
- Apache Jakarta Taglibs JSP Standard Tag Library implementation. JSTL can be optionally used to dynamically generate SQL statements.
Status
Gomba is ready for production and is actively mantained. Gomba is currently used to build middletier services for Kataweb and Repubblica.it.