@@ -3,8 +3,36 @@ mod_okioki - RESTful data service, apache module
33
44Okioki is a Maori word, meaning: to rest.
55
6- This module makes it easy to create a RESTful data service. Simply
7- by define urls and SQL statements in the apache configuration file.
6+ There is a lot of infrastructure build for webservices, such as load balances,
7+ caching/proxy servers, compression, encryption, authentication, auhtorization and logging.
8+ By having this Okioki module between the application server and its database as a shim will
9+ give you access to all this infrastructure. Okioki was designed to make it really easy
10+ to make such a RESTful data service.
11+
12+ Design constraints for this module are:
13+ - Correctness, i.e. everything is checked, don't allow sql injection.
14+ - Performance, the primary reason to make this in C.
15+ - Simple to use/configure.
16+
17+ Anatomy of a service
18+ --------------------
19+ A webservice is identified by the http method and url. In Okioki the url is defined
20+ with an extended regular expression, with optional groups.
21+
22+ Each of the webservices has an SQL statement associated with it. Parameters used by the
23+ SQL statement can be gotten from the http client in several ways.
24+ - The first set of parameters are parsed from the url using its matching regular
25+ expression and groups.
26+ - The second set is parsed from the query string.
27+ - The third set from the cookies
28+ - And the last set from the posted urlencoded form data.
29+
30+ The result of the SQL statement is written to the http client in a
31+ CSV (comman seperated values). The result may also be written to a cookie (only the
32+ value from the first row of the result).
33+
34+ It is recommended to create stored procedures for the more complicated services.
35+
836
937Example apache config
1038---------------------
0 commit comments