hibernate

59 views
Skip to first unread message

masked...@gmail.com

unread,
Feb 24, 2012, 3:47:22 AM2/24/12
to soc...@googlegroups.com
Hello everybody,

Have you considered using hibernate? Or even better - something like a parameter,
so one can choose to hibernate or not.

Best wishes

Marek Majkowski

unread,
Feb 24, 2012, 5:07:17 AM2/24/12
to maske...@gmail.com, soc...@googlegroups.com

What exactly are you referring to?

Marek

masked...@gmail.com

unread,
Feb 24, 2012, 5:21:57 AM2/24/12
to soc...@googlegroups.com, maske...@gmail.com
I mean return values for gen_server, gen_event that can contain hibernate atom.
Ex.: {reply,Reply,NewState,hibernate} or {ok,NewState,hibernate}

I use it in my app. But it only relates to processes that spawned by me. I would
like to squeeze processes that are spawned by the library (read: sockjs) and
the web server (namely, cowboy)

Best wishes,
Max

Marek Majkowski

unread,
Feb 24, 2012, 5:36:37 AM2/24/12
to maske...@gmail.com, soc...@googlegroups.com

Oh, right: sockjs-erlang :)

Hibernating processes too often is rather inefficient, but certainly,
we could hibernate sockjs_session processes and probably cowboy
processes handling websockets sometimes.

Hibernating processes handling polling/streaming transports won't
be that easy, as the code is constructed to hang on a selective receive:
https://github.com/sockjs/sockjs-erlang/blob/master/src/sockjs_action.erl#L192-217

But yes, hibernating some things is certainly worth doing. I filed an issue:
https://github.com/sockjs/sockjs-erlang/issues/15

Thanks,
Marek

masked...@gmail.com

unread,
Feb 24, 2012, 5:46:49 AM2/24/12
to soc...@googlegroups.com, maske...@gmail.com
Oh, yeah, sorry. I haven't realized that people can work with
something besides sockjs-erlang :)

Thank you.

Best wishes,
Max
Reply all
Reply to author
Forward
0 new messages