
Grapes algo seems weird/broken.
I just joined this app yesterday and now have around 700 grapes. I haven't made any posts, just some comments. Still it doesn't add up to 700 grapes. Does anyone have any ideas?
Notification says that I have accumulated 400 grapes, but it's displayed as 388 on home page.
Also, not able to add more than one screenshot to show the home page screenshot
This is called caching. Basically, they want to avoid making unnecessary API calls since every request cost them something ( the amount is however not substantial ) . They might be storing this data , let’s say in Redis which is a caching system. It has its predefined Time to live ( TTL ) . Once the TTL is expired , only then API call is made again and hence you see the delay in updating the grapes in home page.
Notification is independent of this concept
This is on client side so redis is not the issue or even something to discuss here, gcp, aws, azure everyone charges for egress and they want to reduce this as much as possible hence the caching on client side. A better approach would have been a background thread which makes this API call in some duration and updates the object store, the rest pages can use this information. A properly defined schema to fetch current grapes will be in 2 digit ms, this is not a youtube hitcounter which is updating every ms
Makes sense. I like the approach that you specified
Go to your profile and come back to feed it will sync, looks like its cached and the API call only happens when visiting the profile page, the notifications is independent of the state of the value cached in feed page hence the old value
thanks....this worked
Need some more grapes
Sorry it takes some time to refresh up
Eventual consistency bro
I just joined this app yesterday and now have around 700 grapes. I haven't made any posts, just some comments. Still it doesn't add up to 700 grapes. Does anyone have any ideas?
Saw this new feature called grapes on home screen. Description talks about how to earn it. How use these grapes? When would these grapes ferment to wine🍷
I am not able to post anything with an attached image. Once I create the post and try to post it on a thread, it throws internal server error. Have tried to reinstall app a couple of times.