mike-marcacci / gandhi

The open source, online grant management system.
GNU Affero General Public License v3.0
36 stars 16 forks source link

Move application logic from ReQL to node #81

Closed mike-marcacci closed 9 years ago

mike-marcacci commented 9 years ago

The bulk of the API's logic has been written in ReQL which, despite showcasing the incredible flexibility of the language, has become a bottleneck when querying collections of projects above 1000 or so. This was mitigated by moving to burden of heavy calculations into writes where embedded caches were maintained. While this solution fixed the performance issues, it added considerable complexity and increased the importance of precise event scheduling (for recalculating cached data after a change).

It's quite important for the maintainability of this project that the API logic is appropriately divided between model and controller layers in a way that is performant even when doing read-time calculations.

This change is purely a code refactor and will not change the API or the underlying data structure.