No description
  • JavaScript 78.2%
  • Shell 14.2%
  • Makefile 7.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Manikandan Arjunan 7d3aa952ed
Update README.md
2025-04-10 22:17:42 +05:30
db node streams example on application layer 2025-04-10 22:13:46 +05:30
.gitignore node streams example on application layer 2025-04-10 22:13:46 +05:30
delete.js node streams example on application layer 2025-04-10 22:13:46 +05:30
docker-compose.yml node streams example on application layer 2025-04-10 22:13:46 +05:30
Makefile node streams example on application layer 2025-04-10 22:13:46 +05:30
package-lock.json node streams example on application layer 2025-04-10 22:13:46 +05:30
package.json node streams example on application layer 2025-04-10 22:13:46 +05:30
README.md Update README.md 2025-04-10 22:17:42 +05:30
script.sh node streams example on application layer 2025-04-10 22:13:46 +05:30
with-stream.js node streams example on application layer 2025-04-10 22:13:46 +05:30
without-stream.js node streams example on application layer 2025-04-10 22:13:46 +05:30

Use case for Streams

This repo will setup a postgres db in local with user and normalized_user table, the scope is on setup will create by default 500MB of records inside user table, our goal is to read from user table and do some pretty complex(YESS) transformation and then feed that complexed data into normalized_user table.

Prerequisites

Of course this repo, docker and node installed(>=20)

How this works

I have done this in two ways, one typical way of selecting the whole data do the transformation and batch/bulk insert. two is using the streams way.

How to run

Clone this repo.

  1. make setup
  2. make without-stream.js
  3. make with-stream.js

Note

Just see the memory difference(Thats all i can say :()