4 ms·
I'm not showing them all that user-provided data, all I'm showing them is the position of their last post relative to the position of 'another post' in the data
by owkaye 18y ago
I'm not showing them all that user-provided data, all I'm showing them is the position of their last post relative to the position of 'another post' in the database.
The 'other post' changes from time to time based on an algorithm that takes into account all the currently existing posts. This means I must determine the position of the 'other post' each time, and then relate it to the position of the member's new post. Once I know their relative positions I can return the correct positioning data to the member.
- lacker 18y agoThis logic sounds like the important part of your application, but I don't get it yet. Why does the user care about the position of their post relative to some other post? Could it be approximate instead? Also, does it have to be accurate up to the second, or would a slower update cycle work? I feel like maybe you could make some very small changes to the algorithm, and make it much more tractable on the backend.
- owkaye 18y agoI've created a (hopefully) more organized thread with some details this one does not have. Please go to this thread to continue this discussion, thanks: http://news.ycombinator.com/item?id=362810 http://news.ycombinator.com/item?id=362810
- cstejerean 18y agoThe details of what exactly is important for the purpose of determining the "other post" can significantly impact how you need to store the data and the performance implications of doing so. Does it depend on the time the request is made or just based on the data in the database? Can you determine approximately when that other post is likely to change or do you have to try to compute it on every request? Is the "other post" the same for all the users? For a subset of users? Is it unique for every user?