01-02-14, 14:03 #1Registered User
- Join Date
- Jan 2014
Sending a message to a user on mutliple lists
I am working with a team who is creating an iOs app for my company. The application we have sends out push notifications to our users. We have lists, which contains users in it. For eg. there is favourite list, there is primary list, there is abc list....and they contain users. This helps us to send out messages to the user group through our lists.
Now, there are users who are present in more than one list. Say there is user xyz who is part of favourite and primary list. Now, when we send a message to both these groups, we don't want two push notifications to be received by user xyz.
So, what is the best way to implement this? Should we have a db table that stores user_id-message_id relation ship? If yes, wouldn't this require us to read the table each time we send the messages to multiple groups? Is there any other more efficient way to do this?
Your thoughts please.
01-02-14, 14:38 #2Resident Curmudgeon
- Join Date
- Feb 2004
- In front of the computer
The simplest way would be to do an aggregate query on user name based on membership in a group or groups. Without knowing your intended architecture I can't be more specific, but the idea is pretty simple. If you want more help, you'll need to specify at least the database engine (SQL, MongoDB, CSV file, etc.) and the primary delivery platform (C#, php, etc.) to help me give you a more specific answer.
-PatPIn theory, theory and practice are identical. In practice, theory and practice are unrelated.