Commit 302374d2 authored by Ryo33's avatar Ryo33

Fix

parent 144de977
......@@ -29,9 +29,9 @@ An *amorphos metadata* is a JSON data which describes an amorphos host.
#### Endpoint
`https://HOSTNAME/.amorphos`
#### JSON format
#### JSON Format
##### Properties
A packet is an object have the following properties.
An amorphos metadata is an object have the following properties.
- **amorphos-version** semver REQUIRED
The version of Amorphos
......@@ -113,18 +113,18 @@ A packet is an object have the following properties.
Each host must establish a *connection* first to communicate between two different hosts and transmit packets under the connection.
Amorphos does not specify the details of how to do that and each connection protocols do.
### Creating a connection
### Creating a Connection
To create a connection between two hosts, any common connection protocol which is specified in the each host information can be used.
Hosts can ignore connections which are not specified in their host informations.
### Sender validation
### Sender Validation
The connection layer MUST validate the sender property of a message by checking the host.
## Packet
A *packet* is a JSON data transferred between two different hosts under a connection.
It includes any number of messages.
### JSON format
### JSON Format
#### Properties
A packet is an object have the following property
and SHOULD NOT have all other properties.
......@@ -161,13 +161,13 @@ A *message* is a JSON data transferred between two services.
It is transferred by a packet if the two services are on different hosts.
### Types of messages
### Types of Messages
There are two types of messages, request messages and answer messages.
Request messages is a basic type of messages and answer messages is a type for replying to a message.
### Layered message routing
### Layered Message Routing
Each request messages have the properties to routing, **host**, **protocol**, **service**, and **action**.
They are sent to proper message handlers by the following procedure.
......@@ -194,7 +194,7 @@ Amorphos does not specify about timeout of messages.
It is specified in a service protocol.
### Request Messages JSON format
### Request Messages JSON Format
#### Properties
A request message have following properties
and SHOULD NOT all other properties
......@@ -288,7 +288,7 @@ and SHOULD NOT all other properties
}
```
## Connection protocol
## Connection Protocol
*Connection protocol* specifies how to establish a connection between two different hosts with authentication.
The namespace of connection protocols' identifiers is case-insensitive.
......@@ -304,7 +304,7 @@ A specification of connection protocol contains following descriptions:
A identifier MUST be a lowercase [a-z] string joined by '-',
and a version MUST be a semver.
## Service protocol
## Service Protocol
*Service protocol* specifies its own services and messages.
The namespace of service protocols' identifiers is case-insensitive.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment