mkrupczak3 / CS4504-PROJ-P2

CS4504-PROJ-P2
0 stars 0 forks source link

Create Router.java, RequestorThread.java, and InterRouterThread.java #2

Open mkrupczak3 opened 1 year ago

mkrupczak3 commented 1 year ago

We must create a Router (/Router/Router.java) to function as command+control (a directory) which introduces Peer's to eachother then gets out of the way

@kfajdsl @octapi345 @mkrupczak3

mkrupczak3 commented 1 year ago

Peers should probably introduce themself to their respective Router to add themselves to its routing table. The routing table may thereafter have fixed entries.

mkrupczak3 commented 1 year ago

It seems the easiest way to accomplish this would be the following:

Peers announce themselves to their respective Router through a dedicated UDP port on the router.

We can assume that the peers will not be up and running to announce themselves until the Router is ready to recieve, therefore this can be uni-directional without the Router returning a success message.

Responses to lookup requests can be performed over a simple TCP socket, as it is with the existing code. Thereafter, the Router will terminate the connection

mkrupczak3 commented 1 year ago

This is looking to be harder than I thought. A complicating factor is that we have two Router's, and a request towards one necessitates it requesting the other instance.

mkrupczak3 commented 1 year ago

PXL_20230402_212628480~3 PXL_20230402_213032515~2