News for hackers. Stuff that matters.
Re:Erlang gen_server reloaded: manage server behaviour and m... by felixgallo on Wednesday March 30, 2016 @11:52AM (#11390176)
This looks like the 'gateway service' architectural pattern, in which you put a thin layer in front of your API service in order to perform activities common to all calls, like logging, metrics, authentication, session management, etc.

It's a little unusual to put that in as a proxy in front of a gen_server, because normally intra-erlang messaging doesn't need those facilities, which are normally handled at the border. But for metrics I can see it.

Re:Erlang gen_server reloaded: manage server behaviour and m... by gamache on Wednesday March 30, 2016 @12:10PM (#11390307)
Yeah, I'm a little surprised this didn't illustrate the metrics gathering part, because aside from that, there isn't a lot to be gained from using this pattern.
Re:Erlang gen_server reloaded: manage server behaviour and m... by zsoci on Wednesday March 30, 2016 @01:03PM (#11390873)
Would have been too much for the blog. Here is the stats functionality described: https://github.com/sqor/CommonServiceInterface#statistic-fun...
Re:Erlang gen_server reloaded: manage server behaviour and m... by zsoci on Wednesday March 30, 2016 @05:02PM (#11392972)
In addition to statistics, handling requests parallel is also a common pattern CSI implements.
Re:Erlang gen_server reloaded: manage server behaviour and m... by pessimizer on Wednesday March 30, 2016 @12:36PM (#11390549)
You could also use it for resource management, couldn't you? the csi server could handle calls differently based on reaction to the overview that it has. Not that you couldn't write something like this yourself without too much difficulty, but standardizing could mean not having to reinvent the wheel and might have some benefits for tooling?
Re:Erlang gen_server reloaded: manage server behaviour and m... by wcummings on Wednesday March 30, 2016 @11:56AM (#11390213)
Erlang's debugger lets you trace messages, I wonder how it achieves this.
Re:Erlang gen_server reloaded: manage server behaviour and m... by jerf on Wednesday March 30, 2016 @12:33PM (#11390524)
VM-level support.