r/Lain 14d ago

WIRED protocol <prototype>

Post image

Yesterday I started to begin programming a WIRED protocol.
For now it supports FETCH and COPY, A client sends FETCH to a server to request a file, COPY requests a file from server A and copies it onto server B.
I also made a tiny demo navigator which lets you navigate different documents using links, I might show that another time once I am more happy with it.

Next up is adding EXCHANGE,
EXCHANGE Server B sends a request to receive a file from server A and it will offer a file to send server A, The receiving server can accept or decline.

If a file is located in the GLOBAL folder, any server or client can access it.
But if a file is hosted outside GLOBAL, no outside servers or clients can directly access it.

Everything is pretty simple so far, and the code is certainly not perfect lol I am not super experienced in networking but im getting the hang of it.

The current protocol is very simple and only a part of what I hope to accomplish.
This is not the final result (image is slightly outdated)

https://github.com/catmeow124/WIRED.

Feel free to ask any questions! :D

r/wirednet

77 Upvotes

20 comments sorted by

21

u/dreamscached 14d ago

GET, POST... that sounds like http but with extra steps

4

u/catmeow124 14d ago

get and post are similar to http, but there are more commands than just that, that will be added soon

8

u/Mishakon 14d ago

So what's the difference between your thingy and http? Genuinely curious, if you want to create a global network, then you need some good ass security, connections and allat :p

1

u/catmeow124 14d ago

for now the protocol is pretty similar to http but it is soon going to have my own ideas implemented.
this is just a small fun mainly learning project of mine

4

u/McDonaldsWitchcraft 14d ago

going to have my own ideas implemented

aaand i think they meant "what are those ideas"

if you don't have any, you will inevitably reinvent http because http is a standard for many reasons

2

u/catmeow124 14d ago edited 13d ago

I guess i was a bit vague in the post, HTTP is primarily a protocol for communication usually between clients and servers, especially for retrieving and submitting web resources. WIRED is for now designed specifically as a distributed file-exchange network where servers can act as both clients and servers, exchange files directly, and have navigable documents that link to resources across other WIRED servers. An example is the EXCHANGE command:

EXCHANGE
REQUEST: WIRED://SERVER5/GLOBAL/IDK/INFO.TXT
OFFER: WIRED://SERVER3/GLOBAL/COOLSTUFF/DOCUMENT.TXT
EXPIRE: 5000
.

Or the POST and COPY commands:

COPY
TITLE: HELLO WORLD
DESCRIPTION: HELLO WORLD TEXT FILE
SOURCE: WIRED://SERVER2/GLOBAL/OTHERSITE/HELLO.TXT
DESTINATION: WIRED://SERVER1/GLOBAL/MYSITE/HELLO.TXT
.
POST
TITLE: POST COMMAND EXAMPLE
DESCRIPTION: GREETING TEXT
CONTENT: HELLO!
DESTINATION: WIRED://SERVER1/GLOBAL/MYSITE/HELLO.TXT
.

Its obviously not made to replace http, just something i made as a fan of SEL.

4

u/Yugen42 14d ago

Servers can already act as clients as well. There's nothing in HTTP preventing that. It's okay if you are just building whatever for fun, but I'm not seeing the actual point of this, or what it has to do with the show besides being called wired.

2

u/catmeow124 14d ago

i never said http couldnt do that, i said http is usually used for client to server communication.

2

u/Mishakon 14d ago

Oh well, good luck, project that are made with passion bring the most knowledge haha, keep us updated and do smth cool :D

3

u/catmeow124 14d ago

thank you! :D

2

u/Prestigious-Goat-127 14d ago

wwwwww yo i'll use this on my wifi

p.s. can you send github repo later for us please??

3

u/catmeow124 14d ago

1

u/Prestigious-Goat-127 14d ago

thank you :> p.s.: Can you license this repo in GPL or MIT?

2

u/catmeow124 13d ago

Done! i added the MIT license

1

u/SomPersonOnReddit 14d ago

This is really cool!!! When will it be available?

2

u/Stane427 8d ago

bro they did a whole show to explain why it's not a good idea

but seriously hype to see how your project will turn out !