Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/parsonsmatt/write-buffer

If single writes are slowing you down, who you gonna call? WRITE BUFFER!
https://github.com/parsonsmatt/write-buffer

Last synced: 29 days ago
JSON representation

If single writes are slowing you down, who you gonna call? WRITE BUFFER!

Awesome Lists containing this project

README

        

# `write-buffer`

A stupid set of libraries for taking advantage of the speedup from bulk saving data.

Suppose you're saving, like, thousands of rows to a database.
If you're saving each row one at a time, then that is kind of terribly slow.
You can get big speedups by saving your rows in bulk.

However, that's kinda annoying to do. So this library makes it easier.

The `write-buffer-example` folder has a dumb example of this.
We setup a web server to listen for POST requests of a record we want to save, and we collect up to 1000 of these requests in a queue.
Every second, we save all of the stuff in the queue using a bulk insert.