You are viewing a single comment's thread from:

RE: @tipU Investors Update 11.02.2019: STEEM POWER Inflation, Curation Rewards Distribution

in #steem5 years ago (edited)

But since I'm already updating some values in the database automatically every 30 seconds, I've figured out it would be nice to also distribute curation reward every 30 seconds. In other words every investor's profit balance will slightly increase every 30 seconds, even if no new vote requests payments are coming.

That's not where 30 seconds comes from. You don't seem to be following me at all. This is just good programming practice. It has nothing to do with steem. It could be any software that @tipu is operating against. @tipu is what we're discussing.

You're right though. I should take into account the block update. Taking into account block update (every 3 seconds), this means that that conversion values persisted will only actually be good for 3 seconds. Which also means that only conversion values read within 3 seconds of the conversion being persisted will actually be accurate. That's the best case scenario (values are persisted nearly on or right after a block update). It's possible conversion values persisted just before (maybe 1 second) a block update. This would cause persisted conversion values to only be good for one second which would be your worst case scenario. IMHO, those are ideal conditions for on-the-fly conversion. Instead of persisting it.

But since I'm already updating some values in the database automatically every 30 seconds

Now that I reread this, it seems other values are affecting things as well. Updating values every 30 seconds turns records/documents/whatever into index entries because they can only live for 30 seconds. I think it's a good idea not to do this. Instead of updating the values every 30 seconds, store original values.

Sort:  

Thank you for your feedback but there are other reasons to update those values. For example I will be able to present them to the users and everyone likes to watch his investment grow in (almost) real time :)

Just trying to be helpful here. I assure you, you can get actual real-time, protect data from half-life, and reduce the number of extra tasks your app is doing by converting on-the-fly. It can be as easy as adding a decorator to your models that include VESTS which includes a formatter/converter. This way, you can get both values and be real-time accurate.

Thank you :)

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 57676.72
ETH 2356.36
USDT 1.00
SBD 2.39