How to implement authentication using remote actors?

1.5k Views Asked by At

I'm working on a card game and it seems like actors - specifically remote actors - would be a good fit. I'm having trouble figuring out how to implement the notion of logging in using remote actors. If a player starts up a fat client and enters a username and password, what should happen next? Should the client:

  • have a User remote actor where some state changes to represent a successful login?
  • call a method on an Authentication remote actor and get back a handle to a logged in User remote actor?
  • something else entirely?

I'm also wondering how this would fit in with reconnecting after a network issue.

1

There are 1 best solutions below

2
On

Send an authentication message to a known remote actor, he responds with an actor you can talk to if successful, and a failure message if login failed. Profit