Skip to content

syndr7/banking-and-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note to Readers

This project was a class assignment for CSC-4770 Distributed Systems and Cloud Computing. It was assigned on Oct 1 and due on Oct 10, 2025. This was hell. Please don't copy this verbatum and submit if you're working on this too.

Distributed Banking System Assignment

Introduction

In this lab, students will design and implement middleware for a distributed banking system using Remote Procedure Calls (RPC). The goal is to simulate a virtual banking environment where clients interact with multiple bank services through a unified interface.

Learning Objective

  • Understand the principles of RPC in distributed systems.
  • Design middleware that integrates multiple services.
  • Implement client-server communication using RPC.
  • Use SQLite3 for persistent storage in distributed services.

Project Overview

You will implement a distributed banking system with the following architecture:

image
  • A client can perform operations: credit, debit, and transfer.  Client use RPC to communication with the middleware.
  • A virtual bank middleware maps account numbers to banks and delegates operations to the correct bank.  Middleware acts as an RPC server to accept service calls from the client, and acts and an RPC client to request services from the bank.
  • BANK1 and BANK2 are individual RPC servers managing their own accounts.
image

Note that for the purposes of this assignment, the Bank should never let an account go negative. In such a case, the bank should return an error value indicating that the transfer, credit, or debit is not allowed.

Platform

  • Use the Course provided Debian VM (VirtualBox version for Intel users, UTM version for Apple Silicon users).

  • Install RPC tools: sudo apt-get install rpcbind\

  • Install SQLite3:\

    sudo apt install sqlite3
    sudo apt install libsqlite3-dev
    
  • A tutorial for programming SQLite3 in C++ follows: [sqlite3 tutorial{rel="noopener" target="_blank"}[]{.panorama-alternative-formats-button-container title="Alternative Formats for sqlite3_tutorial.html" style="width: 20px !important; height: 20px !important; margin-left: 5px;"}]{.pano-wrapper-div style="line-height: 1.9;" accessibility_injected="true"}

    ::: {.panorama-alternative-formats-button tabindex="0" role="button" panorama-document-type="file" style="width: 20px; height: 20px;" aria-label="Alternative Formats for sqlite3_tutorial.html"} :::

  • A tutorial for programming RPC in C++ follows: [rpc tutorial{rel="noopener" target="_blank"}[]{.panorama-alternative-formats-button-container title="Alternative Formats for rpc_tutorial.html" style="width: 20px !important; height: 20px !important; margin-left: 5px;"}]{.pano-wrapper-div style="line-height: 1.9;" accessibility_injected="true"}

    ::: {.panorama-alternative-formats-button tabindex="0" role="button" panorama-document-type="file" style="width: 20px; height: 20px;" aria-label="Alternative Formats for rpc_tutorial.html"} :::

Requirements

  • Implement all services in C/C++.
  • Use SQLite3 for persistent account storage.
  • The client reads commands from standard input.
  • Include a Makefile with the following targets:
    • all: builds client, virtual bank, BANK1, and BANK2.

    • clean: delete all generated file

    • test: initializes databases, runs services, and performs test operations:\

      credit A12345 100
      credit B12345 100
      transfer A12345 B12345 25
      transfer B12345 A12345 10
      transfer B12345 A12345 120
                          
      

      After tests, print contents of BANK1 and BANK2 databases using SQLite3 CLI.

Timeline

  • Estimated Effort: 6--8 hours

Rubric


Criteria Points Correct implementation of RPC services 30 Middleware logic and account mapping 20 SQLite3 integration and persistence 20 Makefile and test automation 15 Code quality and documentation 10 Proper client interaction 5 Total 100


Submission Procedure

Submit a single compressed archive (zip, 7z, or tar.gz) named:

yourMoodleId_a2.zip

Upload it to the iLearn dropbox associated with this assignment.  When the professor decompresses your submission on on his computer, it should create a directory call yourMoodleId_a2 with all of you source code in it.  Your source code will include the Makefile.

About

Assignment from Tennessee Tech University

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors