Skip to content

Commit 583949d

Browse files
authored
docs: tweaks related to recent ILP/HTTP changes (#57)
1 parent a971a24 commit 583949d

File tree

3 files changed

+50
-15
lines changed

3 files changed

+50
-15
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This library makes it easy to insert data into [QuestDB](https://questdb.io/).
55

66
This client library implements the [InfluxDB Line Protocol](
7-
https://questdb.io/docs/reference/api/ilp/overview/) (ILP) over TCP.
7+
https://questdb.io/docs/reference/api/ilp/overview/) (ILP) over TCP or HTTP.
88

99
* Implementation is in Rust, with no additional
1010
[run-time or link-time dependencies](doc/BUILD.md#pre-requisites-and-dependencies)
@@ -16,21 +16,21 @@ https://questdb.io/docs/reference/api/ilp/overview/) (ILP) over TCP.
1616

1717
## Insertion Protocols Overview
1818

19-
Inserting data into QuestDB can be done via one of three protocols.
19+
Inserting data into QuestDB can be done in several ways.
20+
21+
This library supports ILP/HTTP (default-recommended) and ILP/TCP (specific
22+
streaming use cases).
2023

2124
| Protocol | Record Insertion Reporting | Data Insertion Performance |
2225
| -------- | -------------------------- | -------------------------- |
23-
| [ILP](https://questdb.io/docs/reference/api/ilp/overview/)| Errors in logs; Disconnect on error | **Best** |
26+
| **[ILP/HTTP](https://questdb.io/docs/reference/api/ilp/overview/)** | Transaction-level (on flush) | **Excellent** |
27+
| [ILP/TCP](https://questdb.io/docs/reference/api/ilp/overview/)| Errors in logs; Disconnect on error | **Best** (tolerates higher latency networks) |
2428
| [CSV Upload via HTTP](https://questdb.io/docs/reference/api/rest/#imp---import-data) | Configurable | Very Good |
2529
| [PostgreSQL](https://questdb.io/docs/reference/api/postgres/) | Transaction-level | Good |
2630

27-
This library implements the **ILP protocol** and mitigates the lack of confirmation
28-
and error reporting by validating data ahead of time before any data is sent
29-
to the database instance.
30-
31-
For example, the client library will report that a supplied string isn't encoded
32-
in UTF-8. Some issues unfortunately can't be caught by the library and require
33-
some [care and diligence to avoid data problems](doc/CONSIDERATIONS.md).
31+
Server errors are only reported back to the client for ILP/HTTP.
32+
See the [flush troubleshooting](doc/CONSIDERATIONS.md) docs for more details on
33+
how to debug ILP/TCP.
3434

3535
For an overview and code examples, see the
3636
[ILP page of the developer docs](https://questdb.io/docs/develop/insert-data/#influxdb-line-protocol).

doc/CONSIDERATIONS.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,22 @@ To determine the buffer size, call:
9898

9999
### Disconnections, Data Errors and troubleshooting
100100

101-
A failure when flushing data gerally indicates that the network connection was
102-
dropped.
101+
#### ILP/HTTP
103102

104-
The ILP protocol does not send errors back to the client. Instead, by design,
105-
it will disconnect a client if it encounters any insertion errors. This is to
106-
avoid errors going unnoticed.
103+
When using ILP/HTTP, server errors are reported back to the client from
104+
`flush` calls.
105+
106+
#### ILP/TCP
107+
108+
When using ILP/TCP, errors which cause disconnects can be found
109+
in the QuestDB server logs.
110+
111+
When using TCP, failure when flushing data gerally indicates that the network
112+
connection was dropped.
113+
114+
The ILP over TCP protocol does not send errors back to the client.
115+
Instead, by design, it will disconnect a client if it encounters any insertion
116+
errors. This is to avoid errors going unnoticed.
107117

108118
As an example, if a client were to insert a `STRING` value into a `BOOLEAN`
109119
column, the QuestDB server would disconnect the client.

questdb-rs/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,31 @@ fn main() -> Result<()> {
4646
}
4747
```
4848

49+
## Crate features
50+
51+
This Rust crate supports a number of optional features.
52+
53+
For example, if you want to work with ILP/HTTP and work with Chrono timestamps,
54+
use:
55+
56+
```bash
57+
cargo add questdb-rs --features ilp-over-http chrono
58+
```
59+
60+
### Default-enabled features
61+
62+
* `tls-webpki-certs`: Use the `webpki-roots` crate for TLS cert verification.
63+
64+
### Optional features
65+
66+
These features are opt-in as they bring in additional downstream dependencies.
67+
68+
* `ilp-over-http`: Enables ILP/HTTP support via the `ureq` crate.
69+
* `tls-native-certs`: Supports validating TLS certificates against the OS's
70+
certificates store.
71+
* `insecure-skip-verify`: Allows skipping TLS validation.
72+
* `chrono_timestamp`: Allows specifying timestamps as `chrono::Datetime` objects.
73+
4974
## C, C++ and Python APIs
5075

5176
This crate is also exposed as a C and C++ API and in turn exposed to Python.

0 commit comments

Comments
 (0)