Scalable private message system

232 Views Asked by At

My first post on stackoverflow!

I know there is some debate here about this subject but I didn't come to any definitive deciision ( to this specific situation ). So, I have this question ! I'm building a store finder website (php, javascript and mysql based app) and I'm in the final stages so I'm just needing to code the private message and notification system.

Since I'm starting it and I don't have that much cash I'm on shared hosting ( I know... ) and I have to build this notification system the best I can with the resources I have.

I'm using server sent events and I'm thinking of 2 possibilitys :

  • storing the last read id in the html code and mysql querying every notification / pm prior it ( to save space ).

  • storing the notification / pm id's in a txt file and cleaning the file after read so I don't do many database connections. ( like: if file has numbers written , query those id numbers , else dont do anything ).

So , in your opinion what would you if you'd face my problem? ( my business plan plans on scalling this website to 10.000 users on the first 6 months so I definitivelly have to upgrade the server but until I'm done with the beta tests I'm sticking to SSE and mySQL.

Thanks in advance!

0

There are 0 best solutions below