gen_server
Inswitch Solutions - Erlang Evaluation
erlang@REDACTED
Tue Dec 16 00:04:03 CET 2003
Hi Lennart,
Suppose Pid0 is the gen_server Pid
I execute in two different processes (clients):
- Pid1 gen_server:call to Pid0 gen_server
- Pid2 gen_server:call to Pid0 gen_server
Is the gen_server blocked while processing Pid1 or Pid2 request?
The pattern is clients calling a server, so the implementation of gen_server
(behavior) should resolve this problem in some way (spawning processes for
each client sync. request for example).
As far as I know this is what OO design patterns implementation are supposed
to solve. Does OTP behavior in Erlang mean the same as OO design patterns?
Thanks again,
Eduardo Figoli
----- Original Message -----
From: "Lennart Öhman" <lennart.ohman@REDACTED>
To: "Inswitch Solutions - Erlang Evaluation" <erlang@REDACTED>
Cc: <erlang-questions@REDACTED>
Sent: Monday, December 15, 2003 7:48 PM
Subject: Re: gen_server
> A client making a request using gen_server:call (hopefully
> hidden in an API function) waits until a response is sent
> back from the gen_server process. That response (message)
> makes the gen_server:call function return a return value.
>
> /Lennart
>
> Inswitch Solutions - Erlang Evaluation wrote:
>
> > When calling gen_server:call, does it blocks the gen_server process?
> >
> > From another point of view does gen_server solve the pattern of multiple
> > clients requests calling in a synchronous way (gen_server:call)?
> > For each client a process should be spawned.
> >
> > Thanks,
> > Eduardo Figoli
> >
> >
>
> --
> -------------------------------------------------------------
> Lennart Ohman phone : +46-8-587 623 27
> Sjoland & Thyselius Telecom AB cellular: +46-70-552 6735
> Sehlstedtsgatan 6 fax : +46-8-667 8230
> SE-115 28 STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED
>
More information about the erlang-questions
mailing list