[erlang-questions] Beginner gen_server and child monitoring

Giovanni Giorgi jj@REDACTED
Thu Jul 28 07:47:37 CEST 2016

Hi all,
 I am an erlang newbies.
I am developing a small stock exchange monitoring application, after reading Francesco Cesarini Erlang book and wpriting some small libraries:


I have a gen_server which take a monitor request, in the form {StockTicker, Market, droplimitvalue}.
Then the gen_server spawn a child process which track the price, sleeping at some interval.
The child process is monitored.
The child process die when the stock goes below the price drop but before that sends a notification to its gen_server

Now the question is: Is a correct approach?
What is the best way of spawn-ing child which must loop and loop?

I think the child cannot be a gen_server because its interface did not seem to be thinked for continuing monitoring process.
There is some idiomatic behavior must I implement?
I can spawn_monitot child by hand? It is a good strategy?
Giovanni Giorgi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160728/b74c2ee4/attachment.htm>

More information about the erlang-questions mailing list