I'm writing a web app that is basically facebook events, but more impromptu and real time. A user can create an event, and other online users in the area (30 mile radius) should immediately see the event. Users can sign up for events, and the host should see the invites. The host can cancel the event, and all participants should receive notice. No long polling or refreshing is needed, and i'll most likely be using websockets (socket.io)
This concept is simple to describe, but i've gotten a headache just thinking how exactly this can be implemented. Especially if a user has multiple sessions..
Redis has captured my attention recently. Can i receive suggestions on my implementation plan, to make sure i'm not going down some crazy path?
- I keep track of logged in users locations in Redis.
- User creates event and I store it in Redis.
- I find all users that are in the 30 mile radius of event, and notify them thru socket.io
- The host and users who sign up for event are entered into Redis pub/sub for any kind of notifications.
- Once event is over, i remove event from Redis and store in MySQL
Is my implementation doable? Does it make sense to use Redis here?