Add DNS Handshake section to README

This commit is contained in:
netkas 2024-09-02 19:04:51 -04:00
parent 91a8e8ae8b
commit ed6f5477c1
2 changed files with 132 additions and 34 deletions

View file

@ -53,6 +53,7 @@ This project is licensed under GNU Free Documentation License v1.3, see the [LIC
* [Table of contents](#table-of-contents)
* [Specifications](#specifications)
* [UUID v4](#uuid-v4)
* [DNS Handshake](#dns-handshake)
* [RPC Communication](#rpc-communication)
* [Notification & Request-Response Communication](#notification--request-response-communication)
* [Request Object](#request-object)
@ -89,6 +90,22 @@ consumed for the variant.
Source: [Wikipedia](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random))
## DNS Handshake
When a client wants to connect to a Socialbox server, it first needs to perform a DNS handshake to discover the server
URL. Typically, the Socialbox server is hosted on a subdomain like socialbox.example.com. To determine this, the client
must first resolve the main domain, example.com, and get a TXT record that contains the URL of the Socialbox instance.
The required TXT record should be placed in the main domains DNS records with this format:
```text
example.com. IN TXT "socialbox=socialbox.example.com"
```
Here, socialbox is the key, and the value is the URL of the Socialbox instance. The client resolves the main domain to
retrieve the TXT record, which then provides the URL of the Socialbox server.The client uses this URL to establish a
connection to the Socialbox server. This process allows the client to dynamically discover the server URL.
## RPC Communication
Socialbox employs JSON-RPC over HTTP for server-client & server-server communication. JSON-RPC is a stateless,