Skip to content

defaultcute12/ID2203-Distributed-Systems-Advance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ID2203 Project 2017 Starter Code

This project contains some code to get you started with the project. You are encourage to create your own forks and work on them, modifying everything and anything as you desire it.

Overview

The project is split into 3 sub parts:

  • A common library shared between servers and clients, containing mostly messages and similar shared types
  • A server library that manages bootstrapping and membership
  • A client library with a simple CLI to interact with a cluster of servers

The bootstrapping procedure for the servers, requires one server to be marked as a bootstrap server, which the other servers (bootstrap clients) check in with, before the system starts up. The bootstrap server also assigns initial partitions.

Getting Started

Clone (your fork of) the repository to your local machine and cd into that folder.

Building

Build the project with

maven clean install

Running

Bootstrap Server Node

To run a bootstrap server node cd into the server directory and execute:

java -jar target/project17-server-1.0-SNAPSHOT-shaded.jar -p 45678

This will start the bootstrap server on localhost:45678.

Normal Server Node

After you started a bootstrap server on <bsip>:<bsport>, again from the server directory execute:

java -jar target/project17-server-1.0-SNAPSHOT-shaded.jar -p 56789 -c <bsip>:<bsport>

This will start the bootstrap server on localhost:56789, and ask it to connect to the bootstrap server at <bsip>:<bsport>. Make sure you start every node on a different port if they are all running directly on the local machine.

By default you need 3 nodes (including the bootstrap server), before the system will actually generate a lookup table and allow you to interact with it. The number can be changed in the configuration file (cf. Kompics docs for background on Kompics configurations).

Clients

To start a client (after the cluster is properly running), cd into the client directory and execute:

java -jar target/project17-client-1.0-SNAPSHOT-shaded.jar -p 56787 -b <bsip>:<bsport>

Again, make sure not to double allocate ports on the same machine.

The client will attempt to contact the bootstrap server and give you a small command promt if successful. Type help to see the available commands.

Issues

If you find a bug please create an issue on git, or create a pull request with a fix.

If there are other questions, try to talk to the other students and only if that doesn't help write me an email at lkroll@kth.se. Or, of course, ask at a lab session.

About

Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published