[erlang-questions] synchronous diameter_app:handle_request() -- how to spawn a worker?

anders.gs.svensson <>
Mon Jul 3 12:22:15 CEST 2017


Each handle_request callback happens in a process that's spawned for
that purpose, so concurrency is already there. You can do what you
want in the callback as long as it (eventually) returns an answer (or
not).

Or are you looking for more control over the request processes?

Anders



 writes:
> Date: Mon, 03 Jul 2017 02:07:52 +0200
> From: Rick van Rein <>
> To: Questions erlang-questions <>
> Subject: [erlang-questions] synchronous diameter_app:handle_request()
> 	-- how	to spawn a worker?
> Message-ID: <>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Hi,
> 
> I built authorisation code in Erlang, and am now trying to put Diameter
> in front of it.
> 
> The code takes a fair bit of data and time, so I am preparing to split
> the data over nodes and redirect requests with Erlang's builtins, at the
> same time monitoring it for high availability.
> 
> In diameter_app however, the handle_request() callback wants a final
> response.  Deferring it with "noreply" is not mentioned as an option. 
> Is there another way to initiate concurrency in handling requests?
> 
> Thanks,
>  -Rick


More information about the erlang-questions mailing list