mk netzwerk-protokoll draft
This commit is contained in:
parent
d7be194133
commit
50a625ee31
141
doc/architektur/netzwerk-protokoll-scratch-book.html
Normal file
141
doc/architektur/netzwerk-protokoll-scratch-book.html
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
<h2>Query</h2>
|
||||||
|
<p>Client sendet nach Schema:</p>
|
||||||
|
<p>Zusammenhängde Eingaben werden als Strings in einem Array übertragen.</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
{
|
||||||
|
"query": {
|
||||||
|
"query" : <Array of <String>>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
<p>Server antwortet nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
<Array of <Texture>>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Get Texture</h2>
|
||||||
|
<p>Client sendet nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
{
|
||||||
|
"get_texture": {
|
||||||
|
"id" : <UUID>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
<p>Server antwortet nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
<Texture>
|
||||||
|
</pre>
|
||||||
|
<p>Oder, wenn Textur nicht gefunden</p>
|
||||||
|
<pre>
|
||||||
|
type = Error
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Get Texture File</h2>
|
||||||
|
<p>Client sendet nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
{
|
||||||
|
"get_texture_file": {
|
||||||
|
"texture_hash" : <Hash>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
<p>Server antwortet nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = Binary
|
||||||
|
Textur-Datei
|
||||||
|
</pre>
|
||||||
|
<p>Oder, wenn Textur-Datei nicht gefunden</p>
|
||||||
|
<pre>
|
||||||
|
type = Error
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Get Texture Preview</h2>
|
||||||
|
<p>Client sendet nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
{
|
||||||
|
"get_texture_preview": {
|
||||||
|
"texture_hash" : <Hash>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
<p>Server antwortet nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = Binary
|
||||||
|
Textur-Preview
|
||||||
|
</pre>
|
||||||
|
<p>Oder, wenn Textur-Datei nicht gefunden</p>
|
||||||
|
<pre>
|
||||||
|
type = Error
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Replace Texture</h2>
|
||||||
|
<p>
|
||||||
|
Diese Request dient dazu alte Texturen zu löschen und neue Hinzufügen.
|
||||||
|
Ein Löschen und gleichzeitiges Hinzufügen, ergibt ein Update der Textur.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Falls "old" != null, wird die hier angebene Textur gelöscht. Wird diese nicht
|
||||||
|
exakt gleich vorgefunden, schlägt diese Anfrage fehl (type = Error). In diesem Fall
|
||||||
|
wird "new" nicht berücksichtigt.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Falls "new" != null, wird die hier angebene Textur zum System hinzugefügt.
|
||||||
|
Sollte die angebene id schon vorhanden sein, schlägt diese Anfrage fehl (type = Error).
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Dieser Semantik wurde gewählt, damit ein Update atomar ist und dopplte Anfragen zum Fehlern führen.
|
||||||
|
</p>
|
||||||
|
<p>Client sendet nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
{
|
||||||
|
"replace_texture": {
|
||||||
|
"old": <Texture> | null,
|
||||||
|
"new": <Texture> | null,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
<p>Server antwortet nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
true
|
||||||
|
</pre>
|
||||||
|
<p>Oder falls "texture_hash" nicht gefunden wurde nach Schema:</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
{
|
||||||
|
"get_texture_file": {
|
||||||
|
texture_hash : <Hash>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
<p> Woraufhin der Client die Textur-Datei sendet:</p>
|
||||||
|
<pre>
|
||||||
|
type = Binary
|
||||||
|
Textur-Datei
|
||||||
|
</pre>
|
||||||
|
<p>Der bestätigt dies dann mit:</p>
|
||||||
|
<pre>
|
||||||
|
type = JSON
|
||||||
|
true
|
||||||
|
</pre>
|
||||||
|
|
178651
doc/architektur/netzwerk-protokoll.fodt
Normal file
178651
doc/architektur/netzwerk-protokoll.fodt
Normal file
File diff suppressed because it is too large
Load Diff
BIN
doc/architektur/netzwerk-protokoll.pdf
Normal file
BIN
doc/architektur/netzwerk-protokoll.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user