cybercog / laravel-love

Add Social Reactions to Laravel Eloquent Models. It lets people express how they feel about the content. Fully customizable Weighted Reaction System & Reaction Type System with Like, Dislike and any other custom emotion types. Do you react?

Home Page:https://komarev.com/sources/laravel-love

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why is there a rate limit of 99.99?

logan-jobzmall opened this issue · comments

Hi,

This is just an architectural question. We wanted to try to add more to the rate depending on the user, but noticed it is capped at 99.99. What was the idea behind this cap? Thanks for the information.

Logan

Here is a link on Reaction System v2 design process

Reaction type has mass. It multiplies on reaction rate to receive weight of the reaction. I decided to limit this value because in v3 system it will be multiplied on reaction force and then we might have too big numbers in final values. We need to store aggregated counters in database, and if these values will be too big - we might need to switch from bigint to varchar column.