Added Peer Address section

This commit is contained in:
netkas 2024-09-02 19:20:21 -04:00
parent ed6f5477c1
commit a48d2c4e89
2 changed files with 75 additions and 5 deletions

56
.idea/workspace.xml generated
View file

@ -4,8 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="18345731-10ed-4927-8692-8685f20e33be" name="Changes" comment="Corrected Error tables as messages itself can be descriptive, but the code remains the same"> <list default="true" id="18345731-10ed-4927-8692-8685f20e33be" name="Changes" comment="Updated TOC">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" /> <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -19,6 +18,16 @@
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="GitRewordedCommitMessages">
<option name="commitMessagesMapping">
<RewordedCommitMessageMapping>
<option name="originalMessage" value="Add DNS Handshake section to README" />
<option name="rewordedMessage" value="Add DNS Handshake section to README" />
</RewordedCommitMessageMapping>
</option>
<option name="currentCommit" value="1" />
<option name="onto" value="91a8e8ae8b2e282b32e7a8d32975b1b4b6ac4b07" />
</component>
<component name="InstanceColorv3"> <component name="InstanceColorv3">
<option name="map"> <option name="map">
<map> <map>
@ -136,7 +145,7 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1725301232290</updated> <updated>1725301232290</updated>
<workItem from="1725301233351" duration="4877000" /> <workItem from="1725301233351" duration="4877000" />
<workItem from="1725312281181" duration="918000" /> <workItem from="1725312281181" duration="1883000" />
</task> </task>
<task id="LOCAL-00001" summary="Nothing ever went wrong with plain-old markdown, right?"> <task id="LOCAL-00001" summary="Nothing ever went wrong with plain-old markdown, right?">
<option name="closed" value="true" /> <option name="closed" value="true" />
@ -210,12 +219,47 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1725305307476</updated> <updated>1725305307476</updated>
</task> </task>
<option name="localTasksCounter" value="10" /> <task id="LOCAL-00010" summary="Add DNS Handshake section to README">
<option name="closed" value="true" />
<created>1725318291419</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1725318291419</updated>
</task>
<task id="LOCAL-00011" summary="Updated TOC">
<option name="closed" value="true" />
<created>1725318318359</created>
<option name="number" value="00011" />
<option name="presentableId" value="LOCAL-00011" />
<option name="project" value="LOCAL" />
<updated>1725318318359</updated>
</task>
<task id="LOCAL-00012" summary="Updated TOC">
<option name="closed" value="true" />
<created>1725318323694</created>
<option name="number" value="00012" />
<option name="presentableId" value="LOCAL-00012" />
<option name="project" value="LOCAL" />
<updated>1725318323694</updated>
</task>
<option name="localTasksCounter" value="13" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" /> <option name="version" value="3" />
</component> </component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="Removed stuff" /> <MESSAGE value="Removed stuff" />
<MESSAGE value="Nothing ever went wrong with plain-old markdown, right?" /> <MESSAGE value="Nothing ever went wrong with plain-old markdown, right?" />
@ -228,6 +272,8 @@
<MESSAGE value="Add HTTP status codes section as part of the RPC implementation" /> <MESSAGE value="Add HTTP status codes section as part of the RPC implementation" />
<MESSAGE value="Added footnote for RPC errors under RPC Communication &gt; Notification &amp; Request-Response communication" /> <MESSAGE value="Added footnote for RPC errors under RPC Communication &gt; Notification &amp; Request-Response communication" />
<MESSAGE value="Corrected Error tables as messages itself can be descriptive, but the code remains the same" /> <MESSAGE value="Corrected Error tables as messages itself can be descriptive, but the code remains the same" />
<option name="LAST_COMMIT_MESSAGE" value="Corrected Error tables as messages itself can be descriptive, but the code remains the same" /> <MESSAGE value="Updated TOC" />
<MESSAGE value="Add DNS Handshake section to README" />
<option name="LAST_COMMIT_MESSAGE" value="Add DNS Handshake section to README" />
</component> </component>
</project> </project>

View file

@ -54,6 +54,7 @@ This project is licensed under GNU Free Documentation License v1.3, see the [LIC
* [Specifications](#specifications) * [Specifications](#specifications)
* [UUID v4](#uuid-v4) * [UUID v4](#uuid-v4)
* [DNS Handshake](#dns-handshake) * [DNS Handshake](#dns-handshake)
* [Peer Address](#peer-address)
* [RPC Communication](#rpc-communication) * [RPC Communication](#rpc-communication)
* [Notification & Request-Response Communication](#notification--request-response-communication) * [Notification & Request-Response Communication](#notification--request-response-communication)
* [Request Object](#request-object) * [Request Object](#request-object)
@ -106,6 +107,29 @@ retrieve the TXT record, which then provides the URL of the Socialbox server.The
connection to the Socialbox server. This process allows the client to dynamically discover the server URL. connection to the Socialbox server. This process allows the client to dynamically discover the server URL.
## Peer Address
A peer address uniquely identifies a peer associated with a Socialbox instance, resembling a traditional email address
format, where a username and domain are separated by an @ symbol. Both the username and domain are case-insensitive,
and the domain must be a valid domain name. A typical peer address looks like this:
```text
john@example.com
```
If a Socialbox instance is hosted on a subdomain, such as socialbox.example.com, the peer address format does not change
and remains tied to the main domain. For example, if example.com is the main domain, a DNS TXT record should be added to
the main domain's DNS settings in the following format:
```text
example.com. IN TXT "socialbox=socialbox.example.com"
```
This record indicates that the Socialbox instance is hosted on the subdomain socialbox.example.com, while the peer
address stays consistent as john@example.com. This is because clients always resolve the main domain to find the TXT
record, which provides the URL of the Socialbox instance.
## RPC Communication ## RPC Communication
Socialbox employs JSON-RPC over HTTP for server-client & server-server communication. JSON-RPC is a stateless, Socialbox employs JSON-RPC over HTTP for server-client & server-server communication. JSON-RPC is a stateless,