requires updating the number of players when new devices join. Drop requirement that cid be unique.
meet that constraint. Figure out next cid using a query at startup.
simplify things by using a db to survive a crash/reboot. So far (with next checkin) manages to update a db. Next need to do queries instead of searches through in-memory data.