Skip to content

vkstack/notificationSystem

Repository files navigation

Notification Management

What Technologies and Framework isused( developed on Ubuntu machine )

  1. nodeJS 4.4 as backend server. [install]
  2. rabbitMQ for queuing server. [install]
  3. Mongodb as data store. [install]
  4. Materializecss as front-end CSS framework.
  5. AngularJS as frontend javascript framework.
  6. SailsJS applications framework.
  7. Git (for pulling from repo).

Installing and setup on Ubuntu machine

Install nodeJS(4.4)

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -

sudo apt-get install -y nodejs

Install RabbitMQ

Using rabbitmq.com APT Repository. see here

  1. Execute the following command to add the APT repository to your /etc/apt/sources.list.d:

  2. echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list

  3. (Please note that the word testing in this line refers to the state of our release of RabbitMQ, not any particular Debian distribution. You can use it with Debian stable, testing or unstable, as well as with Ubuntu. We describe the release as "testing" to emphasise that we release somewhat frequently.)

  4. (optional) To avoid warnings about unsigned packages, add our public key to your trusted key list using apt-key(8):

  5. wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -

  6. Our public signing key is also available from Bintray.

  7. Run the following command to update the package list:

  8. sudo apt-get update

  9. Install rabbitmq-server package:

  10. sudo apt-get install rabbitmq-server

Start rabbitMQ-server by this: sudo service rabbitmq-server start

Install MongoDB

Complete installation method

After installing mongo do the following.

  1. sudo mkdir -p /data/db
  2. Start mongod in master mode
  3. sudo mongod --master --fork --logpath /var/log/mongodb.log

All applications which were required are installed.

Setup Project

In terminal fire the following comands

  1. git clone https://github.com/vkstack/notificationSystem.git
  2. cd notificationSystem
  3. mongorestore dump
  4. npm install
  5. **(**Make sure mongodb & rabbitMQ server is running.)
  6. node app.js

Now got to localhost:1337 in the browser.

You can create user by signing up.Or you can login with following users:

Usernames Password

vajahat admin (Only this is admin user.This will be notified for every single change. Rest are normal users they will subscribe for collection or documents)

jack normal

jim normal

bob normal

tim normal

Update notifications is enabled only on news collection.

insert /update/delete notifications in news channel is rendered in raw json format on the notification panel.

Resoureces:

  1. https://www.compose.io/articles/node-js-and-mongo-oplog-elegant-oplog-consumption/
  2. https://www.compose.io/articles/the-mongodb-oplog-and-node-js/
  3. Notification technique from (This was very challenging and interesting task)
  4. http://stackoverflow.com/questions/1086380/how-does-facebook-gmail-send-the-real-time-notification
  5. RabbitMQ help http://stackoverflow.com/questions/37695995/remove-a-consumer-in-rabbitmq-with-nodejs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published