Hacker News new | past | comments | ask | show | jobs | submit login

Unless the amount of data you need to transmit is large, I always prefer that approach as it enables other UI features without any additional network trips by the client. Also, it lets one use the same mechanism for multiple uses (in this case, get latest messages), so it adds less complexity to the app.

In the articles example application, you can transmit the top X oldest messages after the last seen timestamp for each room, then have the client derive the unreadness of each room. You then can use that same info to do things like preview the oldest unread message for each room and hide latency when opening a room as you already have a screens worth of messages in hand. One doesn't need to get more recent messages as UIs generally don't have room to display large numbers and should switch to a "lots" indicator.




Sure, denormalize working storage in the app, fight to keep the "system of record" / "operational data store" clean.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: