Erlang and external authentication

A simple scenario. The user registers through a form baked by some high-level structure (say, rails) and begins to chat. Chat is erlang-written and only authenticated users can participate. This means that every request (containing some session identifier) ​​sent from the client side must be verified (authenticated) inside the erlang code in some way. Obviously, erlang does not know anything about registered users and must request a structure for this information.

The question is how to create a connection between erlang and the framework so as not to cause additional bottlenecks?

I was thinking about saving session identifiers in erlang as well. but the extra effort associated with synchronization (when new users log in) and session timeouts cause a headache.

+3
source share
2 answers

In this case, there is nothing to do with a free lunch. If you retain authentication credentials outside of erlang, you will have to deal with all this headache. You can provide some caching inside erlang to improve speed, but this will be a bottleneck, and you will also have to solve all cache consistency issues. IMHO's best solution is erlang authentication authorization and authentication for a high-level platform.

+1
source

Rails, , Erlang ( , db ). Rails .

+1

All Articles