Hello I have a question, regarding `actors` . I wa...
# coroutines
k
Hello I have a question, regarding
actors
. I want to confine access to a resource based on user id. For example let's say I have Server A calling Server B and in Server B I want to confine access based on user id contained in the http requests. I was thinking of creating a WeakHashMap in Server B where I would store Kotlin Coroutine
actor
and using the
userId
as an key. Then I would use the
actor
to confine access to a resource. Would that work ? Do you have any alternative proposals?
a
Why would you need actors for this?
k
I was thinking of 1 actor per userId. So that when, for example 10 concurrent requests for the same user id reach the server that the actor would confine access to the resource. What would be your suggestion ?
a
Normal HTTP server with basic concurrent access to a resource? I fail to see why actors are needed here.