I’m currently designing a mobile application that can send and read messages to a timeline based on users location. Actual development version is using ActiveMQ to send and consume messages, but it’s still not finished so I prefer to define how the architecture should be to avoid future problems before continuing the development. I’m not sure that this is the correct approach, but here’s what I thought:
- Every user is a producer that sends message to its queue. Queue name could be user’s unique ID.
- Users can subscribe to others users queue, if they’re close enough. This involves something like Topics to a group of users queues. This queue should be dynamic, generated by retrieving the users that are inside a fixed radius, being the center of the circle the position of the consumer. Each user would have it’s own Topic or queue like this one (very similar concept to Twitter’s timeline). This means that each user queue will have more than one consumer.
From the client side, I’ve been using an Objective-C stomp client as the connectivity protocol with the queues.
My question is, is this a good approach to the problem? I’m not sure that the user subscription to near users is a feasible architecture with ActiveMQ and Topics. Do you have any suggestions to this timeline-subscription problem? On the other side, it’s clear to me that every user needs to be the producer for its own queue, but maybe I’m wrong too.
EDIT
Any reference, link, book, etc. with more info about the subject will be highly appreciated.
off the top, a couple of thoughts on this…