docs: add multi-language documentation (ru, fa, zh, tr, ar)

This commit is contained in:
2026-05-07 23:42:55 +03:00
parent abb382c419
commit e9d3c7e9de
157 changed files with 14339 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
# مرجع پروتکل
BaraDB چندین پروتکل پشتیبانی می‌کند:
- **Binary Wire Protocol** — با کارایی بالا
- **HTTP/REST API** — مستقل از زبان
- **WebSocket** — استریمینگ و pub/sub
## Binary Wire Protocol
از کدگذاری big-endian استفاده می‌کند.
### چرخه اتصال
```
Client Server
| |
|─── TCP connect ──────────────>|
|─── Auth message ─────────────>|
|<── Auth_OK / Error ───────────|
|─── Query message ────────────>|
|<── Data / Complete / Error ───|
```
### فرمت پیام
```
┌─────────────┬─────────────┬─────────────┬─────────────────────┐
│ Length │ Type │ Sequence │ Payload │
│ (4 bytes) │ (1 byte) │ (1 byte) │ (Length - 6 bytes) │
└─────────────┴─────────────┴─────────────┴─────────────────────┘
```
### انواع پیام
| نوع | ID | توضیح |
|----|----|--------|
| Query | 0x01 | اجرای کوئری |
| Insert | 0x02 | درج داده |
| Update | 0x03 | به‌روزرسانی |
| Delete | 0x04 | حذف |
| Ready | 0x05 | آماده |
| Error | 0x06 | پاسخ خطا |
## HTTP/REST API
Base URL: `http://localhost:9470/api/v1`
### Endpoints
#### Health
```http
GET /health
```
#### Query
```http
POST /query
{
"query": "SELECT * FROM users"
}
```
## WebSocket Protocol
URL: `ws://localhost:9471`