Skip to content

AlexandrZloy/player-communication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

player-communication

Task description

Having a Player class - an instance of this class with that can communicate with other Player(s) (other instances of this class)

The use case for this task is as bellow:

  1. create 2 players

  2. one of the players should send a message to second player (let's call this player "threadedInitiator")

  3. when a player receives a message should send back a new message that contains the received message concatenated with the message counter that this player sent.

  4. finalize the program (gracefully) after the threadedInitiator sent 10 messages and received back 10 messages (stop condition)

  5. both players should run in the same java process (strong requirement)

  6. document for every class the responsibilities it has.

  7. opposite to 5: have every player in a separate JAVA process (different PID).

Please use pure Java as much as possible (no additional frameworks like spring, etc.) Please deliver one single maven project with the source code only (no jars). Please send the maven project as archive attached to e-mail (eventual links for download will be ignored due to security policy). Please provide a shell script to start the program. Everything what is not clearly specified is to be decided by developer. Everything what is specified is a hard requirement. Please focus on design and not on technology, the technology should be the simplest possible that is achieving the target. The focus of the exercise is to deliver the cleanest and clearest design that you can achieve (and the system has to be functional).

Execution

Verifying fulfillment of the requirement No. 5

Execute test cases with Maven:

mvn test

In the console log you can see the result of Players communication.

Verifying fulfillment of the requirement No. 7

Build package with Maven:

mvn package -Dmaven.test.skip=true

Then execute the shell script:

./launch.sh

In the console log you can see the result of Players communication. After the execution finishes, press ENTER key to exit.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors