JIT Templates
From KallestadWiki
Overview
Just In Time Templates are templates that contain a mixed amount of changing data. Just In Time templates are compiled with a subset of variable data and placed in shared memory. Information that needs to be updated at time of access is applied to these templates just prior to access. They are optionally additionally compiled with static data for high access situations.
Take for instance, a web page with a "Welcome <TMPL_VAR NAME=username>" section in the header, and a daily list of updated articles in the content section. The list of updated articles really only needs to be updated once a day. The "Welcome <TMPL_VAR NAME=username>" section needs updating on each access, and for 80% of page access, "Welcome <TMPL_VAR NAME=username>" translates into "Welcome Unknown" because the user is not logged in.
For 80% of the page accesses, the output process can be a simple read straight from memory. For 20% of the page accesses, the output can be processed using in-memory session information. The most taxing page building process needs to take place only once per day - and that can either be scheduled or on the first access for any given day.
The use of Just In Time templates can reduce the overall payload of a site significantly and ensures that the dynamic page serving bottleneck is widened as much as possible. This also means that applications served up by the KDF framework benefit because server load and database access are reduced significantly. It can mean the difference between being able to serve up 20 pages per second versus 650 pages per second.
Kallestad Development Framework Topics
- KDF Home
- Project Overview
- Technical Information
- Licensing
