From: Nicolas T. <ni...@co...> - 2010-12-23 22:07:10
|
> What about allowing > the user to pass a write Fun, a read Fun and a Traverse Fun into > yaws_session server. > Move the lookup function cookieval_to_opaque into the server loop. Sweet ! I will have a look at this. Nicolas On Thu, 23 Dec 2010 12:50:14 +0100, Claes Wikstrom <kl...@ta...> wrote: > On 12/23/2010 11:22 AM, Nicolas Thauvin wrote: > >> >> That's the tricky thing with mnesia, isn't it ;) ? >> >> I think there is a documentation effort to make it possible. >> Proposition: >> * First, nodes have to be named and provided the -M option when >> started >> with appropriate mnesia session backend parameter >> * When nodes start the first time with the mnesia backend parameter, >> they >> drop an error report to signal the mnesia session system is not ready, >> reverting back to ets backend. >> * Once all the nodes are started in ETS mode, we could explain in the >> documentation: >> * how to create a schema if not already created (need to do >> application:stop(mnesia) first...) >> * how to issue a command to create the table on the >> running_db_nodes (or >> a subset of nodes) using for example >> yaws_session_server:init_mnesia(Nodes) >> * how to issue another command to switch to the new backend system >> without restarting Yaws >> * Upon next restart, if mnesia table exists and the mnesia session >> backend parameter is set, use mnesia as a backend > > All of this should just be kept out of Yaws entirely. What about allowing > the user to pass a write Fun, a read Fun and a Traverse Fun into > yaws_session server. > Move the lookup function cookieval_to_opaque into the server loop. > > Then a mnesia user can just pass in their own funs reading from mnesia > > /klacke > > |