s-macke / jor1k

Online OR1K Emulator running Linux
http://jor1k.com
BSD 2-Clause "Simplified" License
1.73k stars 198 forks source link

Peer to peer networking? #154

Open rog77 opened 4 years ago

rog77 commented 4 years ago

Would it be possible to bypass the need for a constant connection to a private websockets server if one is trying to communicate between Jor1k clients, by implementing PeerJS?

s-macke commented 4 years ago

You can use peerJS to establish a connection between the different clients. However the connection is based on ethernet frames. So you have to implement some services at some point. E. g. a DHCP Server to provide an IP address. Otherwise you have to chose some sort of random IP for each client. Also you have to implement some sort of switch for the ethernet frames based on the MAC address. All this is possible, but not in a few lines of code.

benjamincburns commented 4 years ago

I agree with Sebastian, but with one small addition. It could be fairly easy if you only wish to network together two instances of jor1k. Simply swap ethernet frames between the two VM instances as if you'd connected the two with an ethernet crossover cable. This will only allow direct communication between the two machines, however. You'd likely need to configure them with static IPs as well.

proxy-m commented 2 years ago

Related to:

155 [Redirect web traffic on jor1k],

#198 [Use networking without the websocket proxy on v86], #23 [Network support on v86], #569 [Networking between two or more instances on v86].

hello-smile6 commented 2 years ago

Related to: #155 [Redirect web traffic on jor1k], #198 [Use networking without the websocket proxy on v86], #23 [Network support on v86], #569 [Networking between two or more instances on v86].

Ooh!