A practical thing to experiment transactional processes with Node.js and Redis Pub/Sub Events.
- Node.js / as Javascript hero
- Babel (ES6) / as ES6 dialect
- Express / as middleware for server-side and client-side
- Redis / as key-value hulk
- Bolt / as common event system
- Server-Sent Events / as events sending from server-side
- React / for client-side view, functionality and state control
- Webpack / as development bundler
- Google Maps API / as map provider
- Grunt / as paranoid android
- Less / as more for CSS
- Karma / as spectacular goal
- 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.
- Node.js
- Babel :
npm install babel -g
- Redis
- Grunt :
npm install grunt-cli -g
- Node Dependencies :
npm install
- 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/
- 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 :)
- 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