Veil
|
With modern web-based applications, database connections are often pooled, with each connection representing many different users. In order to reduce the overhead of connection functions for such applications, Veil provides a serialisation API. This allows session variables for a connected user to be saved for subsequent re-use. This is particularly effective in combination with pgmemcache http://pgfoundry.org/projects/pgmemcache/
Only session variables may be serialised.
The following functions comprise the Veil serialisatation API:
function veil.serialise(varname text) returns text
This creates a serialised textual representation of the named session variable. The results of this function may be concatenated into a single string, which can be deserialised in a single call to veil_deserialise(). Implemented by C function veil_serialise().
function veil.deserialise(stream text) returns text
This takes a serialised representation of one or more variables as created by concatenating the results of veil_serialise(), and de-serialises them, creating new variables as needed and resetting their values to those they had when they were serialised. Implemented by C function veil_deserialise().
function veil.serialize(varname text) returns text
Synonym for veil_serialise()
function veil.deserialize(stream text) returns text
Synonym for veil_deserialise()
Next: Veil Control Functions