This is a schematic implementation of global and request fragments given converters:
type%server 'a frag = Global of int | Request of int
type%server fragment = { clojure_id : string ; args : poly array }
Two tables, on both side
On the server side:
global_fragments : id_r -> fragment
request_fragments : id_g -> fragment
The tables are built during execution of Eliom_runtime.fragment. On the first request, both tables are sent. On subsequent requests, only request_fragments is sent.
On the client side,
global_fragments : id_r -> Obj.t
request_fragments : id_g -> Obj.tclose_server_section populates the global table. A function in init (to be implemented) executes fragment requests and populates the fragment table.
The deserialize function for fragments will do a lookup in the appropriate table and return the value of the fragment.
This is a schematic implementation of global and request fragments given converters:
Two tables, on both side
On the server side:
global_fragments : id_r -> fragment
request_fragments : id_g -> fragment
The tables are built during execution of
Eliom_runtime.fragment
. On the first request, both tables are sent. On subsequent requests, onlyrequest_fragments
is sent.On the client side,
global_fragments : id_r -> Obj.t
request_fragments : id_g -> Obj.t
close_server_section
populates the global table. A function ininit
(to be implemented) executes fragment requests and populates the fragment table. Thedeserialize
function for fragments will do a lookup in the appropriate table and return the value of the fragment.