Skip to content

An experimentation for eventful processes with Node.js and Redis Pub/Sub Events.

License

Notifications You must be signed in to change notification settings

hwclass/bobs-quest

Repository files navigation

bobs-quest

A practical thing to experiment transactional processes with Node.js and Redis Pub/Sub Events.

Deploy

Technical Spec

Technical Story

  • CvsNotifier, keeps eye on the sample data (data/sample.csv) and notifies that there is a change when the file is edited (row adding/removing/updating)
  • RedisSubscriber, tracks the traces of Redis instance if the event is fired or not. When new update comes, it makes Bolt informed over its mesh instance.
  • When the event with name 'event_founders_updated' triggered, the server-side file of Express, server.js sends its event to the client side.
  • In the client-side, our listener for Server-Side Events instance catches the data and refresh the list of the founders.

Setup

  • Node.js
  • Babel : npm install babel -g
  • Redis
  • Grunt : npm install grunt-cli -g
  • Node Dependencies : npm install

Initializing

  • Start Redis Server
npm run start-redis
  • Start our CSV file watcher for changes
npm run start-csv-notifier
  • Start our Redis watcher
npm run start-redis-subscriber
  • Start our Server instance
npm run start-server
  • Open the browser and hit the following:
http://localhost:3000/

Usage

  • See the client-side comes onto the browser screen
  • Add a new row into our sample.csv file
4,Ev,Barış Güler,İstanbul,TR,WA 34540,Bağcılar,https://pbs.twimg.com/profile_images/564347684136701952/it2qZsOR.jpeg,http://hwclass.in,41.038660,28.829092
  • Keep the changes in the client-side
  • Enjoy :)

Possible improvements

  • Put a mediator for the whole process into the middle managing the application
  • CouchDB & PouchDB integration for supporting offline data and synchronization
  • Celery for jobs [-] React / Flux / Redux integration for more decoupled store management in the client

twitter

About

An experimentation for eventful processes with Node.js and Redis Pub/Sub Events.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published