Quantcast
Channel: User Eric Guan - Software Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 7

Is my use case for Redis appropriate?

$
0
0

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?

  1. I keep track of logged in users locations in Redis.
  2. User creates event and I store it in Redis.
  3. I find all users that are in the 30 mile radius of event, and notify them thru socket.io
  4. The host and users who sign up for event are entered into Redis pub/sub for any kind of notifications.
  5. 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?


Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images