synchronous diameter_app:handle_request() -- how to spawn a worker?
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
Or are you looking for more control over the request processes?
> Date: Mon, 03 Jul 2017 02:07:52 +0200
> From: Rick van Rein <[hidden email]>
> To: Questions erlang-questions <[hidden email]>
> Subject: [erlang-questions] synchronous diameter_app:handle_request()
> -- how to spawn a worker?
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1
> 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?