Skip to content

GeorgeGkas/fake-bank-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fake Bank APP

A (dead) simple RPC based banking application.

This app was created for educational purposes to test RPC capabilities in Node and is not suitable for production environments. Many things should be designed differently. For instance, this app was does not scale properly. Each exchange points to a queue that is consumed by only one consumer. For this architecture to be more effective, we should dynamically add more consumers when we find that a particular queue gets very big. This is a basic load balancing solution that could increase tasks resolving time.

Implementation details

This project was build with RabbitMQ message broker (through docker image) using amqplib Node client.

Installation

Note: The following commands might require admin privileges to execute.

Fetch the docker image of RabbitMQ:

$ docker pull rabbitmq

Start the container on localhost:

$ docker run -d -p 5672:5672 -p 15672:15672 --hostname localhost --name fake-bank rabbitmq:3

Install the required project dependencies:

/path/to/project$ npm i 

Run

Start the server:

/bin$ ./server.js 

Start the client

/bin$ ./client.js <endpoint> <payload>

The requested payload must be a JSON stringified value (eg "{\"payload\": \"value\"}").

About

A (dead) simple RPC based banking application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published