Skip to content

J-hon/the-publisher

Repository files navigation

The publisher

A simple notification service that pushes notifications to subscriber endpoints when messages are published on their subscribed topics.

Features Implemented

  • Subscription to a topic
  • Publishing to a topic
  • Subscriber endpoints getting notifications of published topics

Tools and Languages

  • Laravel - Laravel is a PHP framework and was chosen because of the ease and speed of writing backend applications.
  • Redis - Redis is an in-memory data structure, which is also used a database, cache and message broker. Redis was chosen because of its R/W speed.

Setup and Installation

This project requires the following dependencies to run

Clone the project, install the dependencies and dev dependencies.

git clone https://github.com/J-hon/the-publisher
cd the-publisher
composer install

Create .env file

cp .env.example .env

Start the publisher server (you can use any port of your choice, pass your desired port number after the --port=)

php artisan serve --port=8001

Start the subscriber(s) server(s) (you can use any port of your choice, pass your desired port number after the --port=).

NB: Be sure the port is free.

php artisan serve --port=8002
php artisan serve --port=8003

Start queue (Or depending on your OS, you can configure a supervisor)

php artisan queue:work

Start the redis server

redis-server

Endpoints

A postman collection for the endpoints has been added

The Publisher Collection

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages