Generating different randoms valid for a day on different independent devices?
Posted
by Pentium10
on Stack Overflow
See other posts from Stack Overflow
or by Pentium10
Published on 2010-05-26T13:39:56Z
Indexed on
2010/05/26
13:41 UTC
Read the original article
Hit count: 220
Let me describe the system. There are several mobile devices, each independent from each other, and they are generating content for the same record id.
I want to avoid generating the same content for the same record on different devices, for this I though I would use a random and make it so too cluster the content pool based on these randoms.
Suppose you have choices from 1 to 100.
Day 1
- Device#1 will choose for the record#33 between 1-10
- Device#2 will choose for the record#33 between 40-50
- Device#3 will choose for the record#33 between 50-60
- Device#1 will choose for the record#55 between 40-50
- Device#2 will choose for the record#55 between 1-10
Device#3 will choose for the record#55 between 10-20
Device#1 will choose for the record#11 between 1-10
- Device#2 will choose for the record#22 between 1-10
- Device#3 will choose for the record#99 between 1-10
Day 2
- Device#1 will choose for the record#33 between 90-100
- Device#2 will choose for the record#33 between 1-10
- Device#3 will choose for the record#33 between 50-60
They don't have access to a central server.
Data available for each of them:
- IMEI (unique per mobile)
- Date of today (same on all devices)
- Record id (same on all devices)
What do you think, how is it possible?
ps. tags can be edited
© Stack Overflow or respective owner