[ / / / / / / / / / / / / / ] [ dir / roze / sapphic ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.900517[Watch Thread][Show All Posts]

I've implemented this most of the way (in Lua) but figured that someone would likely spot a deficiency in my design which could be fixed before I go further.

The network consists of nodes, which each "associate" with (by default) 8 other nodes which are randomly selected, and each node also stores a list of all the nodes which it knows about in the network. Each node can receive commands from clients, and then acts upon those commands. When the command involves a change to the data, the node repeats the command to each of the 8 associated nodes. The effect should be that all the nodes will eventually know of this change.

The creation of boards and posts in the network requires the completion of a simple hashcash proof of work to reduce spam. I also want to have a mechanism to remove duplicate posts, but I haven't implemented that yet (shouldn't be too hard).

Data and boards are deleted when they become old. This is to manage the size of the database.

At startup, the node has to bootstrap. This is done by having a list of "seed" nodes, one of which is almost guaranteed to be online. The node requests a list of all known nodes from a randomly selected seed node, and selects 8 of them to associate with. These 8 nodes are verified to be online at intervals of 5 minutes and if a node goes offline it is replaced by a randomly selected one from the list of all nodes.

Clients connect to the nodes using the same protocol as the nodes use to communicate with each other. Since the client and the node are separate pieces of software, many varieties of client (CLI, TUI, GUI, web etc.) may exist but I'm only going to work on the CLI version for now.

 No.900544>>900562

Implement this with libp2p (IPFS) so it can work on my crappy browser.


 No.900546>>900562

Nothing seems to guarantee that all nodes will get picked? Or am I missing something.


 No.900562>>900564

>>900544

I'd like to do so, but there are only bindings for crappy languages like Go, Rust and JS.

>>900546

Yes, that's a significant issue that I thought about in the beginning but then I (for some reason) dismissed it as too unlikely to worry about.

Anyway I've fixed it now: there used to be a node command which "announced" a node's presence to the network. This command is sent to random (not necessarily associated) nodes in the node list, and before it only added the announcer to the global node list. Now it associates the announcer on the other node.

(Sorry if that sounds complicated; my terminology is probably a total shit)


 No.900564

>>900562

Yeah I don't get it, but if it works it works.


 No.900580>>900585

why don't you contribute to schemebbs in goatfinger instead?


 No.900585

>>900580

there are literally 2 threads with around 30 lines of code between them. where is it hosted?




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
6 replies | 0 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / roze / sapphic ][ watchlist ]