Skip to content

Commit

Permalink
Update images
Browse files Browse the repository at this point in the history
  • Loading branch information
parksb committed Nov 17, 2023
1 parent 914c72f commit db72fda
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/architectures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Zap is structured as a client-server model. The client unidirectionally sends data, and the server receives and processes it. This architecture keeps Zap's design simple and naturally allows a 1:N structure where multiple clients can send data to a single server.

![](https://user-images.githubusercontent.com/6410412/282689836-12d14a7d-eeca-4a8c-996c-2ce9fa5caf4f.png)
![](https://user-images.githubusercontent.com/6410412/283739637-66d41f4c-ff69-4cb7-b8c4-dd647c642b67.png)

A data sent from the client to the server is transmitted over UDP socket. Zap is implemented to send this data by defining 'ZAPP Object' defined on top of datagram, which contain the client's UUID, resource type, and the actual data value. ZAPP Object is the data unit of ZAPP(Zap Protocol), for more detailed information about the protocol, please check the [ZAPP page](./zap-protocol.md).

Expand Down
2 changes: 1 addition & 1 deletion src/architectures/project-structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

The project structure is straightforward. Under the root, there are four main modules: `ZapClient`, `ZapServer`, `Models`, and `Resources`.

![](https://user-images.githubusercontent.com/6410412/282663485-04699a9f-2909-41eb-86cc-41af916b3439.png)
![](https://user-images.githubusercontent.com/6410412/283739678-5b7ab499-9be9-478f-9f66-958b521f93c3.png)

`Models` include interfaces and type definitions generally referenced throughout the Zap system. On the other hand, `Resources` consist of implementations of `Zapable` that can be transmitted via Zap. For example, `ZapAccelerometer` is a `Zapable` implementation representing accelerometer data. These resource implementations are referenced to abstract the data obtained from data sources in `ZapClient` or `ZapServer` and are encapsulated in `ZappObject` for network transmission. For more detailed information on each component, please read the [Specifications](./specifications/README.md) section.
2 changes: 1 addition & 1 deletion src/architectures/zap-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Zap defines a new network protocol over UDP to facilitate data exchange in an ag

The ZAPP Object is divided into two main parts: the header and the payload. The header contains metadata about the ZAPP Object, while the payload represents the actual data of interest to the communicating parties.

![](https://user-images.githubusercontent.com/6410412/282663845-ababb8ba-eb94-49cb-a168-af4733371eee.png)
![](https://user-images.githubusercontent.com/6410412/283739668-6a2607b8-bc11-4a8b-8898-0e71282038d8.png)

The header consists of a timestamp and a resource field. The first 64 bits of the header constitute the timestamp field, representing the epoch time in milliseconds when the ZAPP Object was created. As UDP does not guarantee the order of datagrams, this field can be utilized if the order of data is crucial. This field can be interpreted as an unsigned integer.

Expand Down

0 comments on commit db72fda

Please sign in to comment.