Multilayer player management

I am planning to make a multilayer turn based city building game for android. (to see if i can do or not)
My question is the flowing:

  • In first glance ill have around 1K variable/player. I need a way to identify players, store their data under that identifier.
  • Then get all data player by player (for each loop i guess) in the end of every turn to run calculations on it, then write it back.
  • Meanwhile the connected client can address its own data, making adjustments in the city setting (queue some building to build, or launch an army) in real time manner (like: out of space you can’t build that!). And store those changes for the end turn calculations.

I see that i bite bigger than i can chew. And has no clue where to start ( all game mechanic math and etc. are seems easy compared to this.)

I need some guidance: where can i found materials, tutorials, already existing code parts (probably need a login system or tie the player to device ID but don’t know how) I know that this is probably a lot but i welcome any suggestion or help.