Skip to content

omjadas/distributed-banking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

distributed-banking

Java CI with Maven CodeFactor

Distributed banking application written in Java that utilizes Snapshot recovery algorithms such as those proposed by Chandy-Lamport and Friedemann Mattern.

Building

To build the program use Maven.

mvn package

An uber JAR will be created in the target directory.

Usage

To start the program specify the port to listen on as an argument.

java -jar <path-to-jar> <port>

Once you have started the program you will be presented with a prompt where you are able to enter commands to interact with the system.

open <account-id> # open an account with a given ID
deposit <account-id> <amount> # deposit into an account
withdraw <account-id> <amount> # withdraw from an account
transfer <source-id> <dest-id> <amount> # transfer from one account to another
connect <hostname> <port> # connect to a remote branch
balance <account-id> # print the balance for an account
list # print all known accounts
mattern # initiate Mattern's algorithm
chandy-lamport # initiate the Chandy Lamport algorithm
delay # wait for 10 seconds
exit # exit the program

About

Simulation of a distributed banking system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages