====== Engineering ====== ==== Architecture ==== [[:start|SolarNET.HuB (SNH)]] uses for the [[socialnet:start|project network]] a distributed architecture that takes care of three principal viewpoints of methods with huge networks. With distributed network architecture a separate basic control system can be managed, but the load can be allocated among various local sites. These sites can be physically segregated from each other but combined via the internet and, if one system breaks, the others can remain to work without being influenced. With separate servers, there is constantly the feasibility of overload as the network expands. Single servers are also likely to the entire network running down if the server is affected. With a distributed method the data amount is distributed among the diverse systems which make networking more active and more productive. There is no lack of configuration if the central server encounters any difficulties because it is shared among the secondary systems. Despite, the basic system also has the benefit of remaining capable to manage all operations, address security reforms, and observe the situation of the additional sites. Updates and modifications performed on the central server can seamlessly be combined with the entire distributed network without difficulty. The twofold benefit of having a central place of power but sharing a load of decision making with local sites goes for an extra reliable and effective system. **How does Distributed Network Architecture work?** There are various systems in distributed network architecture that all communicate with each other but are also able to function on their own. There is one central system that is related to the others, and that system can hold command over the others. However, each system also owns the liberty to be capable to run autonomously of the other systems of the network. Each link on the system as an administrator and the responsibilities that each administrator has command over can be arranged by the central node. Each of the places on the distributed network can differ in size, and some could have thousands of devices attached to the network while some might only hold a less. Despite the area of each place, all the devices can eventually be correlated following to the center. **What are the benefits of Distributed Network Architecture?** * **Scalable**: Distributed network architecture offers scalability much easier than particular networks. Because the load is shared, new devices can be attached and configured to the network without serious interruption to the entire network. In case of a particular network, too numerous devices can reduce the system performance down and freeze the server. This will not occur with a distributed network. * **More effective**: The administrator of the central network can hold as full or as limited control as needed at every moment. This administrator can assign duties to node administrators and focus on additional responsibilities at hand. Though, as soon as a test or upgrade of the whole distributed network is needed, the central administrator can get command of that. The central administrator, holds access, to all the links, from the one system, and does not need many logins to reach them all. * **More secure**: Because of the way the shared network design is set up the system is much stable and secure. It practices more limited bandwidth and can allow hardware or network malfunctions extremely better than a particular system. Also, if data on one system gets infected, it does not impact the whole system. With a distributed network structure in site organizations that possess networks of a huge quantity of devices, can be more reliable and sophisticated to delays. **Comparison (schema): Distributed vs Centralized vs Decentralized** {{ :socialnet:networks-comparision.jpeg?nolink |}} ==== Main Protocol ==== [[:start|SolarNET.HuB (SNH)]] uses for the [[socialnet:start|project network]] a [[https://en.wikipedia.org/wiki/Gossip_protocol|Gossip protocol]]. A gossip protocol or __epidemic protocol__ is a procedure or process of computer [[https://en.wikipedia.org/wiki/Peer-to-peer|peer-to peer]] communication that is based on the way epidemics spread. Indeed, the mathematics of epidemics are often used to model the mathematics of gossip communication. The term epidemic algorithm is sometimes employed when describing a software system in which this kind of gossip-based information propagation is employed. This means that information is able to distribute across multiple machines, without requiring direct connections between them. {{ :socialnet:gossip-graph1.png?nolink |}} Even though Alice and Dan lack a direct connection, they can still exchange feeds: {{ :socialnet:gossip-graph2.png?nolink |}} This is because gossip creates "transitive" connections between computers. Dan's messages travel through Carla and the PUB to reach Alice, and visa-versa. ==== Secure Scuttlebutt (SSB) ==== [[:start|SolarNET.HuB (SNH)]] uses for the [[socialnet:start|project network]] a [[https://en.wikipedia.org/wiki/Mesh_networking|mesh network]], and self-hosted social media ecosystem called [[https://en.wikipedia.org/wiki/Secure_Scuttlebutt|Secure Scuttlebutt (SSB)]]. SSB uses a [[https://en.wikipedia.org/wiki/Blockchain|blockchain]] like append-only data structure and a fully decentralized P2P network. There are no servers or authorities of any kind. Like a crypto transaction, SSB posts are censorship-resistant and are replicated to the entire network. {{ :socialnet:ssb-participants-perspective.png?nolink#800 |}} In SSB each user hosts their own content and the content of the peers they follow, which provides fault tolerance and eventual consistency. ** Partial replication ** Traditionally, SSB replicates feeds by fetching the whole feed starting from their initial message. This is a major friction point for onboarding new users into the platform due to the huge amount of data the client needs to download before a feed is up to date, and the associated computing cost for indexing the new data. Partial replication allows a client to selectively fetch slices of data starting from the most recent message instead. This allows the user to be able to see recent messages -without their client freezing up- as a result of smaller data transfers and with minimal indexing time. ** Stream ** You can think of an array as a structure that you move past like one of those fancy old libraries with the moving ladder. You move to the position the data is in, and the data stays put. A stream is more like a conveyer belt. You stay in one place, and the data comes to you. You just control fast it comes. It's a more restricted idea than the array, because with an array you can move backwards and forwards, but a stream can only pause or move forward (or abort). ** Feed ** A feed is a signed append-only sequence of messages. Each identity has exactly one feed. Note that append-only means __you cannot delete an existing message, or change your history__. This is enforced by a per-feed [[https://en.wikipedia.org/wiki/Blockchain|blockchain]]. This is to ensure the entire network converges on the same state. [[https://en.wikipedia.org/wiki/Secure_Scuttlebutt|Secure Scuttlebutt (SSB)]] does not use "[[https://en.wikipedia.org/wiki/Proof_of_work|Proof of Work]]" to choose the next valid block for a global blockchain. Instead, each identity gets their own personal blockchain (a "sigchain"). So [[https://en.wikipedia.org/wiki/Bitcoin|bitcoin]] is 1 blockchain, SSB is many sigchains. **Cryptography** SSB operates as a database of immutable append-only feeds, which allows resilient replication over the [[https://en.wikipedia.org/wiki/Internet|Internet]], [[https://en.wikipedia.org/wiki/Local_area_network|local area networks]], and [[https://en.wikipedia.org/wiki/Sneakernet|sneakernets]]. Messages are hashed with [[https://en.wikipedia.org/wiki/SHA-2|SHA256]] and verified with an [[https://en.wikipedia.org/wiki/EdDSA|Ed25519]] signature; this makes it impossible to forge a message without the [[https://en.wikipedia.org/wiki/Public-key_cryptography|private key]] of the author. Users only download messages from peers that they follow (and optionally [[https://en.wikipedia.org/wiki/Friend_of_a_friend|friends of friends]]), which prevents harassment and spam. This makes the network invite-only, meaning that new peers who join the network aren't visible until someone follows them. Messages are digitally signed and added to an append-only list of messages published by an author. {{ :socialnet:ssb-feed-example.png?nolink#800 |}} User content in SSB is organized as an append-only sequence of immutable messages, where messages [[https://en.wikipedia.org/wiki/Digital_signatures|cryptographically sign]] adjacent messages for the purpose of guaranteeing [[https://en.wikipedia.org/wiki/Capability-based_security|unforgeabilitity]] of the sequences as they are replicated to other peers. SSB peers exchange [[https://en.wikipedia.org/wiki/Public-key_cryptography|asymmetric keys]] and establish authenticated connections between each other using an [[https://en.wikipedia.org/wiki/Authenticated_Key_Exchange|Authenticated Key Exchange]] protocol: //Secret Handshake//. ==== Client: "SNH-Oasis" ==== [[:start|SolarNET.HuB (SNH)]] uses for the [[socialnet:start|project network]] a free, open-source, [[https://en.wikipedia.org/wiki/Peer-to-peer|peer-to-peer]] application and [[:socialnet/ecosystem|ecosystem]] that helps you follow content and discover new ones, called: "**SNH-Oasis**". **Main features** * No browser JavaScript!. Just pure HTML+CSS. * Use your favorite web browser to read and write messages to the people you care about. * Strong cryptography in every single point of the network. * You are the center of your own distributed network. Online or offline, it works anywhere that you are. * Initial identities are randomnly generated (no username or password required). * No personal profile generated (no questions about gender, age, location, etc ...). * No email or associated mobile phone required. * Automatic exif stripping (such as GPS coordinates) on images for better privacy. **GUI** {{ :socialnet:snh-oasis_profile-2.png?nolink&600 |}} **Roadmap** You can visit the [[:project/roadmap#the_project_network|roadmap]] to see what state is the [[https://code.03c8.net/KrakensLab/oasis|current development]] and __what are the future implementations__ that are desired to achieve. ==== Public servers (PUBs) ==== A PUB is a relayer that is always online and relays messages between peers for cases when there are requests for feeds but their respective peers are offline. Also, if you have just reached our network and you have no one to add to start exchanging messages, this place will provide you invitations to see the inhabitants who, like you, want to expand their contact circle. You can create your own PUB following [[https://scuttlebot.io/docs/config/create-a-pub.html|this guide]]. PUBs can easily be configured as [[https://en.wikipedia.org/wiki/Tor_(network)|Tor]] hidden services, as you can see in [[https://handbook.scuttlebutt.nz/faq/misc/tor|this other guide]]. To [[:socialnet/snh#joining_a_pub|join a public PUB]] all you need is an invite code. The invite code contains the PUB’s domain name, port, and public key. ==== PUB: "La Plaza" ==== [[:start|SolarNET.HuB (SNH)]] has deployed for the [[socialnet:start|project network]] a Public Server (PUB) called: "[[:socialnet/snh-pub|La Plaza]]". ==== Room servers (ROOMs) ==== A ROOM server is an SSB peer with privileged internet presence (for instance, not behind a NAT layer) which allows its clients to perform tunneled connections wich each other. Connections between server and client are __end-to-end encrypted via secret-handshake__, as well as in tunneled connections between room clients, so that the room server cannot eavesdrop on the payloads in the tunneled connections. You can have more information in the following [[https://ssbc.github.io/rooms2/|paper]]. ==== ROOM: "#SNH" ==== [[:start|SolarNET.HuB (SNH)]] has deployed for the [[socialnet:start|project network]] a Room server (ROOM) called: "[[:socialnet/snh-room|#SNH]]". ---- "//From small rules, it is possible to generate tremendously complex structures, as in [[https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life|Game of Life]]...//"