From 093b96235bf8a0ce877992eb17896c0868dc4405 Mon Sep 17 00:00:00 2001 From: Kay Date: Wed, 20 Dec 2023 16:47:57 +0000 Subject: [PATCH] feat: adding response protocol --- doc/TQL/TQL.md | 4 ++-- doc/main.md | 1 + doc/protocol/protocol_v1.md | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 doc/protocol/protocol_v1.md diff --git a/doc/TQL/TQL.md b/doc/TQL/TQL.md index 25e671a..b6ce041 100644 --- a/doc/TQL/TQL.md +++ b/doc/TQL/TQL.md @@ -9,7 +9,7 @@ Time trace is using a query language called TQL. Here is documentation and speci | Command | Action | Arguments | |----------|:-------------|:------| -| CON | to make a connection and access to database | username - password | +| CON * | to make a connection and access to database | username - password | | SET * | make a new set | set-name | | SSET * | make a new subset | set-name - subset-name | | PUSH * | push an element to a subset | set-name - subset-name - value-of-element - time(unix-timestamp) | @@ -34,4 +34,4 @@ Time trace is using a query language called TQL. Here is documentation and speci | SNF | set is not found | | SSNF | subset is not found | | ENF | element(s) is not found | -| [DATA separated by space] (key-time key-time key-time) | GET successful response | +| DATA in format of [protocol](../protocol/) | diff --git a/doc/main.md b/doc/main.md index 9268806..6f50ba8 100644 --- a/doc/main.md +++ b/doc/main.md @@ -8,4 +8,5 @@ In this documentation we have different parts: * [model](./model/) (which is talk about data structure of time-trace and also some use case examples). * [config](./config/) (which is show you how config works in time-trace). * [TQL](./TQL/) (time query language). +* [protocol](./protocol/) (specification of time-trace protocol, which time-trace talks with). * [usage](./usage/) (which is show how can you use time-trace in action). \ No newline at end of file diff --git a/doc/protocol/protocol_v1.md b/doc/protocol/protocol_v1.md new file mode 100644 index 0000000..d1c9746 --- /dev/null +++ b/doc/protocol/protocol_v1.md @@ -0,0 +1,21 @@ +# Protocol V1 + +This document will define the time trace protocol, which you need to know about (beside the [TQL](../TQL/)) to be able to make an client or driver for time trace. + +# Requests + +All of the data requesting from a time-trace database, will follow the [TQL](../TQL/) specification. + +# Receiving Data + +The TQL `GET` request data format: + +``` +