2 Instaservlet API
The main function is go!:
| ||||||||||||||||||||||||||||||||||||||||||
servlet : (-> request any) | ||||||||||||||||||||||||||||||||||||||||||
port : integer/c = 8765 | ||||||||||||||||||||||||||||||||||||||||||
listen-ip : string? = "127.0.0.1" | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
mime-types-path : path? = default-mime-types-path | ||||||||||||||||||||||||||||||||||||||||||
|
Runs the given servlet in a web-server that has been setup (using Instaweb) with the given parameters (all of which are optional). By default the web server runs on port 8765 and listens only to connections from the localhost. Refer to the Instaweb documentation for more details.
2.1 How The Servlet Is Run
Instaweb takes care of some important servlet configuration details for you:
The servlet uses the web-server’s version 2 API
Memory is managed with the LRU manager, which is much more robust than the timeout manager. The memory limit is set to 64MB. Continuations start with 24 life points. Life points are deducted at the rate of one every 10 minutes, or one every 5 seconds when the memory limit is exceeded. Hence the maximum life time for a continuation is 4 hours, and the minimum is 2 minutes.
A default instance-expiration-handler is installed, so users see a sensible error message on continuation expiry.
These settings will be made customisable in future releases on Instaservlet.