On Wed, Dec 22, 2010 at 5:58 AM, Nicolas Thauvin <nicolas@...> wrote:
> Hi to the list !
> We are using Yaws and yaws_session to store some authentication tokens.
> The main drawback is that when we restart Yaws, (yeap.. it's a pain to do
> everything hot-upgradable), autenticated users become anonymous.
> We are thinking about implementing a mnesia version of yaws_session, and
> why not share the module with the community. The idea would be to pass the
> backend engine as an argument when starting yaws_session_server (ets would
> still be the default, and a parameter could be added in yaws.conf).
> But as Klacke said someday :
> "If we involve mnesia or external ldap or what ever, it becomes quite more
> I agree with that, using mnesia would imply that the schema is already
> created as Yaws cannot guess the context in which it is executed. The best
> we can do is to create the table from yaws_session_server using the nodes
> appearing in the schema, assuming all the nodes are here...
> What do you think ? Would this kind of patch make this way into the Yaws
> release ?
I can't speak for Klacke (who might be away on holiday at the moment,
not sure) but my opinion is that we would likely accept such a patch,
since as you say it seems like it could be useful for the community.
In addition to code changes, it would need doc changes to allow users
to find out how to set it up and use it, and including some tests for
the new feature would be great too. And as you said, we'd definitely
want to keep the ets default as it currently is.