RAPID (Replicant API Daemon)

RAPID is a web service that translates HTTP requests into SQL Stored Procedures, then returns the response encoded within a JSON response.

The intended configuration is for web browser based Javascript code to interact with the RAPID service.

By default browser communicate with a RAPID service on port 8080.

A RAPID service is able to be configured to accept and forward requests to any database. The domain requested is used to generate a domain name that is then queried using DNS to resolve to an target database.

For example, the 'MyService' app may want to connect to a database that exists behind the following URL:

http://api.myservice.com:8080

By convention, the RAPID service assumes that DNS information correponding to the database can be found by prefixing "db-" to the domain, e.g:

db-api.myservice.com

If the requested domain ends in '.local', due to being a local development domain, 'local-db-' is instead prefixed to the domain, e.g:

local-db-api.myservice.com

This is required so that public DNS can be used to return DNS information associated with a local domain.

The reason why the requested domain is modified using '-' rather than creating a new subdomain using '.' is so that an exisitng wildcard SSL certificate can be easily used for the RAPID server, if required.