agco / harvesterjs

Create JSONAPI-compliant APIs over a Node.js + MongoDB stack in an easy, boilerplate-free manner
http://agco.github.io/harvesterjs/
MIT License
68 stars 13 forks source link

Add checkpoint writer #202

Closed waldemarnt closed 7 years ago

waldemarnt commented 7 years ago

The goal of this pull request is decrease the amount of I/O operations to the database.

To do that we extracted the write checkpoints responsibility from the events-reader to another module and we make the communication based on events to propagate changes asynchronously. We tried to modify events-reader as little as possible.

The image below represents the before state without any debouncing or change on the writing checkpoint:

screen shot 2017-03-23 at 5 33 27 pm

The image below represents the after state using the new module that listen to events from updateReschedule:

screen shot 2017-03-23 at 5 33 33 pm

This change is Reviewable

  

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.3%) to 84.474% when pulling 4a22a58f0d4c8f92c946980067811d14f9016668 on add-checkpoint-writer into cd4ba0f6d7a23181ae9370016460d53a77bb82a6 on develop.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 84.361% when pulling 2738a1facf4279780015f48f759fad2ea93460fa on add-checkpoint-writer into cd4ba0f6d7a23181ae9370016460d53a77bb82a6 on develop.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 84.361% when pulling c695b927a6ed560077fc5c22401adac9e2f84fdd on add-checkpoint-writer into cd4ba0f6d7a23181ae9370016460d53a77bb82a6 on develop.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 84.338% when pulling 20cc3babc9abcbddb60d41e896c25afbd2f97cc4 on add-checkpoint-writer into cd4ba0f6d7a23181ae9370016460d53a77bb82a6 on develop.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 84.164% when pulling 8df134b7313698624eb355835fa67460e692463b on add-checkpoint-writer into cd4ba0f6d7a23181ae9370016460d53a77bb82a6 on develop.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 84.164% when pulling 1f530b27dc334ead9c80045bd14bb029bea889ad on add-checkpoint-writer into cd4ba0f6d7a23181ae9370016460d53a77bb82a6 on develop.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 84.164% when pulling bdf284de274c03d7651c51bbed6393b3d2e7d15d on add-checkpoint-writer into cd4ba0f6d7a23181ae9370016460d53a77bb82a6 on develop.