alvaromb
alvaromb

Reputation: 4856

System architecture for location-based message system using message queues

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:

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.

Upvotes: 1

Views: 261

Answers (2)

Ben ODay
Ben ODay

Reputation: 21015

off the top, a couple of thoughts on this...

  • use topics instead of queues to "broadcast" messages to multiple subscribers, etc.
  • dynamically subscribing based on location doesn't seem like a good fit for JMS technology to me
  • consider using something with geospatial (aka location based) indexing/searching built-in (like mongoDB or spatial databases)

Upvotes: 2

duffymo
duffymo

Reputation: 308918

One problem is that adding a new user means adding a new queue. How is that done? Doesn't this put a limit on the number of users your system can support?

You can have your users produce messages to send to a topic and register as consumers as well.

Another approach would be non-blocking IO and Netty.

Upvotes: 0

Related Questions