Since i have zero experience in developing web applications which can be scaled up horizontally, i need someone with experience guide me in right direction.
I had difficulties to figure out the right way of storing login sessions in database, so i came to the question is that even right to store them in databases when i am planing to use replication in future ? and if not what are the alternates ??
I need different clients(android,Windows, ...) be connected to server with their own sessions related to the same user and i am using:
1 - Cent-OS as OS
2 - PostgreSQL as DBMS
3 - Tomee as HTTP server and Servlet container
4 - Partitioned Tables (Inherited Tables in PostgreSQL) to improve performance, chance of in memory index scan, prevent fragmentation and etc
My problem raise from the fact that i need to check session availability in every received request from clients (every session has its own encryption keys) and it is possible to have millions of sessions, in a distributed environment i can not be sure that the created session will be available in replicated database at the right time.
Thanks for helping