Giter VIP home page Giter VIP logo

thebigbangserver's Introduction

The Big Bang Server

CodeQL Java CI with Maven SonarCloud

Installation

git clone https://github.com/theadambyrne/thebigbangserver.git
cd thebigbangserver

# install dependencies
mvn clean install

# run tests
mvn test

Usage

# generate executable jar files
mvn clean package

# run server and client
java -jar target/TBBS-server-1.jar
java -jar target/TBBS-client-1.jar

thebigbangserver's People

Contributors

newsyd04 avatar theadambyrne avatar

Stargazers

 avatar

Watchers

 avatar  avatar

thebigbangserver's Issues

Multithreading

Currently the server is single-threaded.

We need to be able to accept multiple clients at once and process their requests in seperate threads rather than filling up the activation records in the main thread,

Logging

Add a logging framework to handle recording interactions for debugging.

Message stream

The current implementation has a Message object stream server-side but not client-side.
Refactoring the in/out from the server in the the Client class will allow better validation and a more clean architecture.

Note: It also might be worth piping these streams as then the project will be wrapped.

Resource

Commands

Enable clients to use commands in there input to make use of more potential features

Executables

Setup maven build to generate executables for deployment.

Use .jar for the moment, potentially .war for the future if deploying to production.

Stream closing

When a client quits, the server's buffered reader fails to read from the client as that thread/reader is not being joined/closed effectively.

Server Output of Events:

INFO: Server started
[Server]: adam has joined the chat
[adam]: /quit
May 15, 2023 10:28:56 AM CS4442.OS.Server$ClientHandler run
WARNING: Client disconnected
java.io.IOException: Stream closed
        at java.io.BufferedReader.ensureOpen(BufferedReader.java:122)
        at java.io.BufferedReader.readLine(BufferedReader.java:317)
        at java.io.BufferedReader.readLine(BufferedReader.java:389)
        at CS4442.OS.Server$ClientHandler.run(Server.java:111)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)```

Joke function

Create a command that executes a Server API to send a joke to all clients

Bidirectional messaging

Allow client to input text via standard input.
This text should be sent to the server and returned reversed.
:: Proof of concept

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.