axiodb 6.33.229 → 7.33.230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -0
- package/lib/Services/Indexation.operation.d.ts +2 -1
- package/lib/Services/Indexation.operation.js +8 -1
- package/lib/Services/Indexation.operation.js.map +1 -1
- package/lib/client/AggregationProxy.d.ts +16 -0
- package/lib/client/AggregationProxy.js +38 -0
- package/lib/client/AggregationProxy.js.map +1 -0
- package/lib/client/AxioDBCloud.client.d.ts +74 -0
- package/lib/client/AxioDBCloud.client.js +306 -0
- package/lib/client/AxioDBCloud.client.js.map +1 -0
- package/lib/client/CollectionProxy.d.ts +55 -0
- package/lib/client/CollectionProxy.js +121 -0
- package/lib/client/CollectionProxy.js.map +1 -0
- package/lib/client/DatabaseProxy.d.ts +31 -0
- package/lib/client/DatabaseProxy.js +81 -0
- package/lib/client/DatabaseProxy.js.map +1 -0
- package/lib/client/DeleteOperationProxy.d.ts +20 -0
- package/lib/client/DeleteOperationProxy.js +52 -0
- package/lib/client/DeleteOperationProxy.js.map +1 -0
- package/lib/client/ReaderProxy.d.ts +36 -0
- package/lib/client/ReaderProxy.js +80 -0
- package/lib/client/ReaderProxy.js.map +1 -0
- package/lib/client/UpdateOperationProxy.d.ts +20 -0
- package/lib/client/UpdateOperationProxy.js +54 -0
- package/lib/client/UpdateOperationProxy.js.map +1 -0
- package/lib/client/types/client.types.d.ts +29 -0
- package/lib/client/types/client.types.js +18 -0
- package/lib/client/types/client.types.js.map +1 -0
- package/lib/config/DB.d.ts +3 -1
- package/lib/config/DB.js +4 -1
- package/lib/config/DB.js.map +1 -1
- package/lib/tcp/config/keys.d.ts +59 -0
- package/lib/tcp/config/keys.js +74 -0
- package/lib/tcp/config/keys.js.map +1 -0
- package/lib/tcp/config/protocol.d.ts +56 -0
- package/lib/tcp/config/protocol.js +220 -0
- package/lib/tcp/config/protocol.js.map +1 -0
- package/lib/tcp/config/server.d.ts +12 -0
- package/lib/tcp/config/server.js +156 -0
- package/lib/tcp/config/server.js.map +1 -0
- package/lib/tcp/connection/ConnectionManager.d.ts +63 -0
- package/lib/tcp/connection/ConnectionManager.js +171 -0
- package/lib/tcp/connection/ConnectionManager.js.map +1 -0
- package/lib/tcp/connection/RequestContext.d.ts +33 -0
- package/lib/tcp/connection/RequestContext.js +52 -0
- package/lib/tcp/connection/RequestContext.js.map +1 -0
- package/lib/tcp/handler/CommandHandler.d.ts +34 -0
- package/lib/tcp/handler/CommandHandler.js +159 -0
- package/lib/tcp/handler/CommandHandler.js.map +1 -0
- package/lib/tcp/handler/handlers/Collection.handler.d.ts +28 -0
- package/lib/tcp/handler/handlers/Collection.handler.js +120 -0
- package/lib/tcp/handler/handlers/Collection.handler.js.map +1 -0
- package/lib/tcp/handler/handlers/DB.handler.d.ts +28 -0
- package/lib/tcp/handler/handlers/DB.handler.js +113 -0
- package/lib/tcp/handler/handlers/DB.handler.js.map +1 -0
- package/lib/tcp/handler/handlers/Operation.handler.d.ts +59 -0
- package/lib/tcp/handler/handlers/Operation.handler.js +310 -0
- package/lib/tcp/handler/handlers/Operation.handler.js.map +1 -0
- package/lib/tcp/types/command.types.d.ts +35 -0
- package/lib/tcp/types/command.types.js +72 -0
- package/lib/tcp/types/command.types.js.map +1 -0
- package/lib/tcp/types/protocol.types.d.ts +71 -0
- package/lib/tcp/types/protocol.types.js +15 -0
- package/lib/tcp/types/protocol.types.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ SQLite is great, but it requires native bindings that break in Electron and cros
|
|
|
33
33
|
- ✅ Built-in InMemoryCache with automatic invalidation
|
|
34
34
|
- ✅ Multi-core parallelism with Worker Threads
|
|
35
35
|
- ✅ Built-in web GUI at `localhost:27018`
|
|
36
|
+
- ✅ **NEW:** AxioDBCloud - TCP remote access for Docker/Cloud deployments
|
|
36
37
|
|
|
37
38
|
---
|
|
38
39
|
|
|
@@ -51,6 +52,7 @@ SQLite is great, but it requires native bindings that break in Electron and cros
|
|
|
51
52
|
- **Transaction Support:** ACID-compliant transactions with savepoints, rollback, and Write-Ahead Logging (WAL)
|
|
52
53
|
- **Single Instance Architecture:** Unified management for unlimited databases, collections, and documents
|
|
53
54
|
- **Web-Based GUI Dashboard:** Visual database administration, query execution, and real-time monitoring at `localhost:27018`
|
|
55
|
+
- **AxioDBCloud Remote Access:** TCP-based client for connecting to AxioDB from anywhere—Docker, Cloud, or local network
|
|
54
56
|
- **Zero-Configuration Setup:** Serverless architecture—install and start building instantly
|
|
55
57
|
- **Custom Database Path:** Flexible storage locations for better project organization
|
|
56
58
|
|
|
@@ -89,6 +91,87 @@ await session.withTransaction(async (tx) => {
|
|
|
89
91
|
|
|
90
92
|
---
|
|
91
93
|
|
|
94
|
+
## ☁️ AxioDBCloud - Remote Database Access (NEW!)
|
|
95
|
+
|
|
96
|
+
**Host AxioDB in Docker, connect from anywhere!** AxioDBCloud provides TCP-based remote access to your AxioDB instance with the exact same API as local embedded mode.
|
|
97
|
+
|
|
98
|
+
### 🌟 Why AxioDBCloud?
|
|
99
|
+
|
|
100
|
+
- **🚀 Deploy Once, Connect Everywhere:** Host AxioDB in Docker/Cloud, connect from multiple clients
|
|
101
|
+
- **🔄 Zero Code Changes:** Same API as embedded AxioDB - just change the client class!
|
|
102
|
+
- **⚡ TCP Protocol:** Fast binary protocol with automatic reconnection
|
|
103
|
+
- **🔐 Production Ready:** Connection pooling, heartbeat monitoring, error recovery
|
|
104
|
+
- **📦 Docker Support:** One-command deployment with included Dockerfile
|
|
105
|
+
|
|
106
|
+
### Quick Start - Server (Docker)
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Pull and run the AxioDB Docker container
|
|
110
|
+
docker run -d \
|
|
111
|
+
--name axiodb-server \
|
|
112
|
+
-p 27018:27018 \
|
|
113
|
+
-p 27019:27019 \
|
|
114
|
+
-v axiodb-data:/app \
|
|
115
|
+
theankansaha/axiodb
|
|
116
|
+
|
|
117
|
+
# Ports:
|
|
118
|
+
# 27018 - HTTP GUI Dashboard
|
|
119
|
+
# 27019 - TCP Remote Access (AxioDBCloud)
|
|
120
|
+
# Volume: /app is the main data directory
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Or run locally with Node.js:**
|
|
124
|
+
|
|
125
|
+
```javascript
|
|
126
|
+
const { AxioDB } = require('axiodb');
|
|
127
|
+
const db = new AxioDB(false, 'MyDB', '.', true); // Enable TCP on port 27019
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Quick Start - Client
|
|
131
|
+
|
|
132
|
+
```javascript
|
|
133
|
+
const { AxioDBCloud } = require('axiodb');
|
|
134
|
+
|
|
135
|
+
// Connect to remote AxioDB (same API as embedded!)
|
|
136
|
+
const client = new AxioDBCloud("axiodb://localhost:27019");
|
|
137
|
+
await client.connect();
|
|
138
|
+
|
|
139
|
+
// Use exactly like embedded AxioDB
|
|
140
|
+
const db = await client.createDB("ProductionDB");
|
|
141
|
+
const users = await db.createCollection("Users");
|
|
142
|
+
|
|
143
|
+
// All operations work identically
|
|
144
|
+
await users.insert({ name: "Alice", role: "admin" });
|
|
145
|
+
const results = await users.query({ role: "admin" })
|
|
146
|
+
.Limit(10)
|
|
147
|
+
.Sort({ createdAt: -1 })
|
|
148
|
+
.exec();
|
|
149
|
+
|
|
150
|
+
await client.disconnect();
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Features
|
|
154
|
+
|
|
155
|
+
✅ **35+ Commands** - Full CRUD, aggregation, indexing
|
|
156
|
+
✅ **Auto-Reconnect** - Exponential backoff with up to 10 retry attempts
|
|
157
|
+
✅ **Heartbeat Monitoring** - PING/PONG every 30 seconds
|
|
158
|
+
✅ **Request Correlation** - UUID-based request/response matching
|
|
159
|
+
✅ **Connection Pooling** - Supports 1000+ concurrent connections
|
|
160
|
+
✅ **TypeScript Support** - Full type definitions included
|
|
161
|
+
✅ **Zero Breaking Changes** - Existing AxioDB code works unchanged
|
|
162
|
+
|
|
163
|
+
### Use Cases
|
|
164
|
+
|
|
165
|
+
- **Microservices:** Share one AxioDB instance across multiple services
|
|
166
|
+
- **Desktop Apps:** Electron apps connecting to local/remote database
|
|
167
|
+
- **Development:** Team members sharing a development database
|
|
168
|
+
- **Docker Deployments:** Container-based production deployments
|
|
169
|
+
- **Cloud Hosting:** Deploy to AWS, Azure, Google Cloud, DigitalOcean
|
|
170
|
+
|
|
171
|
+
👉 **[Full AxioDBCloud Documentation](https://axiodb.in/cloud)** - Setup guides, API reference, Docker examples
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
92
175
|
## 🏆 Performance Comparison
|
|
93
176
|
|
|
94
177
|
### AxioDB vs SQLite
|
|
@@ -15,7 +15,8 @@ export declare class AxioDB {
|
|
|
15
15
|
private static _instance;
|
|
16
16
|
private DatabaseMap;
|
|
17
17
|
private GUI;
|
|
18
|
-
|
|
18
|
+
private TCP;
|
|
19
|
+
constructor(GUI?: boolean, RootName?: string, CustomPath?: string, TCP?: boolean);
|
|
19
20
|
/**
|
|
20
21
|
* Initializes the root directory for the AxioDB.
|
|
21
22
|
*
|
|
@@ -26,14 +26,16 @@ const Converter_helper_1 = __importDefault(require("../Helper/Converter.helper")
|
|
|
26
26
|
const outers_1 = require("outers");
|
|
27
27
|
const response_helper_1 = __importDefault(require("../Helper/response.helper"));
|
|
28
28
|
const server_1 = __importDefault(require("../server/config/server"));
|
|
29
|
+
const server_2 = __importDefault(require("../tcp/config/server"));
|
|
29
30
|
/**
|
|
30
31
|
* Class representing the AxioDB database.
|
|
31
32
|
* @param {string} RootName - The name of the root folder.
|
|
32
33
|
* @returns {AxioDB} - Returns the instance of AxioDB.
|
|
33
34
|
*/
|
|
34
35
|
class AxioDB {
|
|
35
|
-
constructor(GUI, RootName, CustomPath) {
|
|
36
|
+
constructor(GUI, RootName, CustomPath, TCP) {
|
|
36
37
|
this.GUI = Keys_1.General.DBMS_GUI_Enable;
|
|
38
|
+
this.TCP = false;
|
|
37
39
|
if (AxioDB._instance) {
|
|
38
40
|
throw new Error("Only one instance of AxioDB is allowed.");
|
|
39
41
|
}
|
|
@@ -47,6 +49,7 @@ class AxioDB {
|
|
|
47
49
|
this.initializeRoot(); // Ensure root initialization
|
|
48
50
|
this.DatabaseMap = new Map(); // Initialize the DatabaseMap
|
|
49
51
|
this.GUI = GUI !== undefined ? GUI : Keys_1.General.DBMS_GUI_Enable; // Set GUI option
|
|
52
|
+
this.TCP = TCP !== undefined ? TCP : false; // Set TCP option
|
|
50
53
|
}
|
|
51
54
|
/**
|
|
52
55
|
* Initializes the root directory for the AxioDB.
|
|
@@ -75,6 +78,10 @@ class AxioDB {
|
|
|
75
78
|
outers_1.Console.green("Starting AxioDB Control Server...");
|
|
76
79
|
(0, server_1.default)(this); // Start the web Control Server with the AxioDB instance
|
|
77
80
|
}
|
|
81
|
+
if (this.TCP) {
|
|
82
|
+
outers_1.Console.green("Starting AxioDB TCP Server...");
|
|
83
|
+
(0, server_2.default)(this); // Start the TCP Server with the AxioDB instance
|
|
84
|
+
}
|
|
78
85
|
});
|
|
79
86
|
}
|
|
80
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Indexation.operation.js","sourceRoot":"","sources":["../../source/Services/Indexation.operation.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;AAEvD,mBAAmB;AACnB,mFAA2D;AAC3D,uFAA+D;AAC/D,8CAA8C;AAC9C,gDAAwB;AACxB,uFAAqD;AACrD,kDAAkD;AAElD,iBAAiB;AACjB,kFAAmD;AACnD,mCAA8C;AAC9C,gFAAuD;AAQvD,qEAAgE;
|
|
1
|
+
{"version":3,"file":"Indexation.operation.js","sourceRoot":"","sources":["../../source/Services/Indexation.operation.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;AAEvD,mBAAmB;AACnB,mFAA2D;AAC3D,uFAA+D;AAC/D,8CAA8C;AAC9C,gDAAwB;AACxB,uFAAqD;AACrD,kDAAkD;AAElD,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c,CAAC,OAAO,CAChC,aAAa,MAAM,uBAAuB,CAC3C,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,aAAa,MAAM,iBAAiB,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;KAAA;CACF;AA3LD,wBA2LC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxioDBCloud } from './AxioDBCloud.client';
|
|
2
|
+
/**
|
|
3
|
+
* Aggregation Proxy - Aggregation builder for remote aggregations
|
|
4
|
+
* Mirrors the Aggregation class API
|
|
5
|
+
*/
|
|
6
|
+
export default class AggregationProxy {
|
|
7
|
+
private client;
|
|
8
|
+
private dbName;
|
|
9
|
+
private collectionName;
|
|
10
|
+
private pipeline;
|
|
11
|
+
constructor(client: AxioDBCloud, dbName: string, collectionName: string, pipeline: object[]);
|
|
12
|
+
/**
|
|
13
|
+
* Execute the aggregation pipeline
|
|
14
|
+
*/
|
|
15
|
+
exec(): Promise<any>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const command_types_1 = require("../tcp/types/command.types");
|
|
13
|
+
/**
|
|
14
|
+
* Aggregation Proxy - Aggregation builder for remote aggregations
|
|
15
|
+
* Mirrors the Aggregation class API
|
|
16
|
+
*/
|
|
17
|
+
class AggregationProxy {
|
|
18
|
+
constructor(client, dbName, collectionName, pipeline) {
|
|
19
|
+
this.client = client;
|
|
20
|
+
this.dbName = dbName;
|
|
21
|
+
this.collectionName = collectionName;
|
|
22
|
+
this.pipeline = pipeline;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Execute the aggregation pipeline
|
|
26
|
+
*/
|
|
27
|
+
exec() {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return yield this.client.sendCommand(command_types_1.CommandType.AGGREGATE, {
|
|
30
|
+
dbName: this.dbName,
|
|
31
|
+
collectionName: this.collectionName,
|
|
32
|
+
pipeline: this.pipeline,
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.default = AggregationProxy;
|
|
38
|
+
//# sourceMappingURL=AggregationProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AggregationProxy.js","sourceRoot":"","sources":["../../source/client/AggregationProxy.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,8DAAyD;AAEzD;;;GAGG;AACH,MAAqB,gBAAgB;IAMnC,YAAY,MAAmB,EAAE,MAAc,EAAE,cAAsB,EAAE,QAAkB;QACzF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;OAEG;IACG,IAAI;;YACR,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,2BAAW,CAAC,SAAS,EAAE;gBAC1D,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAvBD,mCAuBC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { CommandType } from '../tcp/types/command.types';
|
|
3
|
+
import { AxioDBCloudOptions, ConnectionState } from './types/client.types';
|
|
4
|
+
import DatabaseProxy from './DatabaseProxy';
|
|
5
|
+
/**
|
|
6
|
+
* AxioDBCloud - TCP Client for remote AxioDB access
|
|
7
|
+
*/
|
|
8
|
+
export declare class AxioDBCloud extends EventEmitter {
|
|
9
|
+
private host;
|
|
10
|
+
private port;
|
|
11
|
+
private socket;
|
|
12
|
+
private messageBuffer;
|
|
13
|
+
private pendingRequests;
|
|
14
|
+
private connectionState;
|
|
15
|
+
private options;
|
|
16
|
+
private reconnectAttempt;
|
|
17
|
+
private heartbeatInterval;
|
|
18
|
+
constructor(connectionString: string, options?: AxioDBCloudOptions);
|
|
19
|
+
/**
|
|
20
|
+
* Parse connection string: axiodb://host:port
|
|
21
|
+
*/
|
|
22
|
+
private parseConnectionString;
|
|
23
|
+
/**
|
|
24
|
+
* Connect to AxioDB TCP server
|
|
25
|
+
*/
|
|
26
|
+
connect(): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Setup socket event handlers
|
|
29
|
+
*/
|
|
30
|
+
private setupSocketHandlers;
|
|
31
|
+
/**
|
|
32
|
+
* Handle server response
|
|
33
|
+
*/
|
|
34
|
+
private handleResponse;
|
|
35
|
+
/**
|
|
36
|
+
* Handle disconnection
|
|
37
|
+
*/
|
|
38
|
+
private handleDisconnection;
|
|
39
|
+
/**
|
|
40
|
+
* Attempt to reconnect
|
|
41
|
+
*/
|
|
42
|
+
private attemptReconnect;
|
|
43
|
+
/**
|
|
44
|
+
* Start heartbeat
|
|
45
|
+
*/
|
|
46
|
+
private startHeartbeat;
|
|
47
|
+
/**
|
|
48
|
+
* Stop heartbeat
|
|
49
|
+
*/
|
|
50
|
+
private stopHeartbeat;
|
|
51
|
+
/**
|
|
52
|
+
* Send command to server
|
|
53
|
+
*/
|
|
54
|
+
sendCommand(command: CommandType, params: any): Promise<any>;
|
|
55
|
+
/**
|
|
56
|
+
* Disconnect from server
|
|
57
|
+
*/
|
|
58
|
+
disconnect(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Database API - mirrors AxioDB
|
|
61
|
+
*/
|
|
62
|
+
createDB(name: string): Promise<DatabaseProxy>;
|
|
63
|
+
deleteDatabase(name: string): Promise<void>;
|
|
64
|
+
isDatabaseExists(name: string): Promise<boolean>;
|
|
65
|
+
getInstanceInfo(): Promise<any>;
|
|
66
|
+
/**
|
|
67
|
+
* Get current connection state
|
|
68
|
+
*/
|
|
69
|
+
get state(): ConnectionState;
|
|
70
|
+
/**
|
|
71
|
+
* Check if connected
|
|
72
|
+
*/
|
|
73
|
+
get isConnected(): boolean;
|
|
74
|
+
}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AxioDBCloud = void 0;
|
|
16
|
+
const net_1 = require("net");
|
|
17
|
+
const crypto_1 = require("crypto");
|
|
18
|
+
const events_1 = require("events");
|
|
19
|
+
const protocol_1 = require("../tcp/config/protocol");
|
|
20
|
+
const command_types_1 = require("../tcp/types/command.types");
|
|
21
|
+
const client_types_1 = require("./types/client.types");
|
|
22
|
+
const DatabaseProxy_1 = __importDefault(require("./DatabaseProxy"));
|
|
23
|
+
/**
|
|
24
|
+
* AxioDBCloud - TCP Client for remote AxioDB access
|
|
25
|
+
*/
|
|
26
|
+
class AxioDBCloud extends events_1.EventEmitter {
|
|
27
|
+
constructor(connectionString, options) {
|
|
28
|
+
super();
|
|
29
|
+
this.socket = null;
|
|
30
|
+
this.messageBuffer = new protocol_1.MessageBuffer();
|
|
31
|
+
this.pendingRequests = new Map();
|
|
32
|
+
this.connectionState = client_types_1.ConnectionState.DISCONNECTED;
|
|
33
|
+
this.reconnectAttempt = 0;
|
|
34
|
+
this.heartbeatInterval = null;
|
|
35
|
+
// Parse connection string
|
|
36
|
+
const parsed = this.parseConnectionString(connectionString);
|
|
37
|
+
this.host = parsed.host;
|
|
38
|
+
this.port = parsed.port;
|
|
39
|
+
// Set options with defaults
|
|
40
|
+
this.options = {
|
|
41
|
+
timeout: (options === null || options === void 0 ? void 0 : options.timeout) || 30000,
|
|
42
|
+
reconnectAttempts: (options === null || options === void 0 ? void 0 : options.reconnectAttempts) || 10,
|
|
43
|
+
reconnectDelay: (options === null || options === void 0 ? void 0 : options.reconnectDelay) || 1000,
|
|
44
|
+
heartbeatInterval: (options === null || options === void 0 ? void 0 : options.heartbeatInterval) || 30000,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parse connection string: axiodb://host:port
|
|
49
|
+
*/
|
|
50
|
+
parseConnectionString(connectionString) {
|
|
51
|
+
const match = connectionString.match(/^axiodb:\/\/([^:]+):(\d+)$/);
|
|
52
|
+
if (!match) {
|
|
53
|
+
throw new Error('Invalid connection string. Format: axiodb://host:port');
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
host: match[1],
|
|
57
|
+
port: parseInt(match[2], 10),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Connect to AxioDB TCP server
|
|
62
|
+
*/
|
|
63
|
+
connect() {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return new Promise((resolve, reject) => {
|
|
66
|
+
if (this.connectionState === client_types_1.ConnectionState.CONNECTED) {
|
|
67
|
+
return resolve();
|
|
68
|
+
}
|
|
69
|
+
this.connectionState = client_types_1.ConnectionState.CONNECTING;
|
|
70
|
+
this.socket = new net_1.Socket();
|
|
71
|
+
// Setup socket event handlers
|
|
72
|
+
this.setupSocketHandlers();
|
|
73
|
+
// Connection timeout
|
|
74
|
+
const connectionTimeout = setTimeout(() => {
|
|
75
|
+
var _a;
|
|
76
|
+
(_a = this.socket) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
77
|
+
this.connectionState = client_types_1.ConnectionState.FAILED;
|
|
78
|
+
reject(new Error('Connection timeout'));
|
|
79
|
+
}, this.options.timeout);
|
|
80
|
+
// Connect to server
|
|
81
|
+
this.socket.connect(this.port, this.host, () => {
|
|
82
|
+
clearTimeout(connectionTimeout);
|
|
83
|
+
this.connectionState = client_types_1.ConnectionState.CONNECTED;
|
|
84
|
+
this.reconnectAttempt = 0;
|
|
85
|
+
this.startHeartbeat();
|
|
86
|
+
this.emit('connected');
|
|
87
|
+
resolve();
|
|
88
|
+
});
|
|
89
|
+
// Handle connection errors
|
|
90
|
+
this.socket.once('error', (error) => {
|
|
91
|
+
clearTimeout(connectionTimeout);
|
|
92
|
+
this.connectionState = client_types_1.ConnectionState.FAILED;
|
|
93
|
+
reject(error);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Setup socket event handlers
|
|
100
|
+
*/
|
|
101
|
+
setupSocketHandlers() {
|
|
102
|
+
if (!this.socket)
|
|
103
|
+
return;
|
|
104
|
+
this.socket.on('data', (chunk) => {
|
|
105
|
+
try {
|
|
106
|
+
const messages = this.messageBuffer.addChunk(chunk);
|
|
107
|
+
for (const message of messages) {
|
|
108
|
+
this.handleResponse(message);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
this.emit('error', error);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
this.socket.on('error', (error) => {
|
|
116
|
+
this.emit('error', error);
|
|
117
|
+
this.handleDisconnection();
|
|
118
|
+
});
|
|
119
|
+
this.socket.on('close', (hadError) => {
|
|
120
|
+
this.emit('disconnected', hadError);
|
|
121
|
+
this.handleDisconnection();
|
|
122
|
+
});
|
|
123
|
+
this.socket.on('end', () => {
|
|
124
|
+
this.handleDisconnection();
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Handle server response
|
|
129
|
+
*/
|
|
130
|
+
handleResponse(response) {
|
|
131
|
+
const pending = this.pendingRequests.get(response.id);
|
|
132
|
+
if (pending) {
|
|
133
|
+
clearTimeout(pending.timeout);
|
|
134
|
+
this.pendingRequests.delete(response.id);
|
|
135
|
+
if (response.statusCode >= 200 && response.statusCode < 300) {
|
|
136
|
+
pending.resolve(response.data);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
pending.reject(new Error(response.error || response.message));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
console.warn(`[AxioDBCloud] Received response for unknown request: ${response.id}`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Handle disconnection
|
|
148
|
+
*/
|
|
149
|
+
handleDisconnection() {
|
|
150
|
+
this.connectionState = client_types_1.ConnectionState.DISCONNECTED;
|
|
151
|
+
this.stopHeartbeat();
|
|
152
|
+
// Reject all pending requests
|
|
153
|
+
for (const [id, pending] of this.pendingRequests.entries()) {
|
|
154
|
+
clearTimeout(pending.timeout);
|
|
155
|
+
pending.reject(new Error('Connection lost'));
|
|
156
|
+
this.pendingRequests.delete(id);
|
|
157
|
+
}
|
|
158
|
+
// Attempt reconnection
|
|
159
|
+
if (this.reconnectAttempt < this.options.reconnectAttempts) {
|
|
160
|
+
this.attemptReconnect();
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
this.emit('failed', new Error('Max reconnection attempts reached'));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Attempt to reconnect
|
|
168
|
+
*/
|
|
169
|
+
attemptReconnect() {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
this.reconnectAttempt++;
|
|
172
|
+
const delay = Math.min(this.options.reconnectDelay * Math.pow(2, this.reconnectAttempt - 1), 30000);
|
|
173
|
+
this.emit('reconnecting', this.reconnectAttempt);
|
|
174
|
+
this.connectionState = client_types_1.ConnectionState.RECONNECTING;
|
|
175
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
try {
|
|
177
|
+
yield this.connect();
|
|
178
|
+
this.emit('reconnected');
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
// Reconnection will be attempted again in handleDisconnection
|
|
182
|
+
}
|
|
183
|
+
}), delay);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Start heartbeat
|
|
188
|
+
*/
|
|
189
|
+
startHeartbeat() {
|
|
190
|
+
this.heartbeatInterval = setInterval(() => __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
try {
|
|
192
|
+
yield this.sendCommand(command_types_1.CommandType.PING, {});
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
console.warn('[AxioDBCloud] Heartbeat failed:', error);
|
|
196
|
+
}
|
|
197
|
+
}), this.options.heartbeatInterval);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Stop heartbeat
|
|
201
|
+
*/
|
|
202
|
+
stopHeartbeat() {
|
|
203
|
+
if (this.heartbeatInterval) {
|
|
204
|
+
clearInterval(this.heartbeatInterval);
|
|
205
|
+
this.heartbeatInterval = null;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Send command to server
|
|
210
|
+
*/
|
|
211
|
+
sendCommand(command, params) {
|
|
212
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
+
if (this.connectionState !== client_types_1.ConnectionState.CONNECTED) {
|
|
214
|
+
throw new Error('Not connected to server');
|
|
215
|
+
}
|
|
216
|
+
if (!this.socket) {
|
|
217
|
+
throw new Error('Socket not initialized');
|
|
218
|
+
}
|
|
219
|
+
const id = (0, crypto_1.randomUUID)();
|
|
220
|
+
const request = {
|
|
221
|
+
id,
|
|
222
|
+
command,
|
|
223
|
+
params,
|
|
224
|
+
};
|
|
225
|
+
return new Promise((resolve, reject) => {
|
|
226
|
+
const timeout = setTimeout(() => {
|
|
227
|
+
this.pendingRequests.delete(id);
|
|
228
|
+
reject(new Error('Request timeout'));
|
|
229
|
+
}, this.options.timeout);
|
|
230
|
+
this.pendingRequests.set(id, {
|
|
231
|
+
resolve,
|
|
232
|
+
reject,
|
|
233
|
+
timeout,
|
|
234
|
+
timestamp: Date.now(),
|
|
235
|
+
});
|
|
236
|
+
try {
|
|
237
|
+
const buffer = protocol_1.MessageFramer.encode(request);
|
|
238
|
+
this.socket.write(buffer);
|
|
239
|
+
}
|
|
240
|
+
catch (error) {
|
|
241
|
+
clearTimeout(timeout);
|
|
242
|
+
this.pendingRequests.delete(id);
|
|
243
|
+
reject(error);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Disconnect from server
|
|
250
|
+
*/
|
|
251
|
+
disconnect() {
|
|
252
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
253
|
+
this.stopHeartbeat();
|
|
254
|
+
if (this.socket && !this.socket.destroyed) {
|
|
255
|
+
try {
|
|
256
|
+
yield this.sendCommand(command_types_1.CommandType.DISCONNECT, {});
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
// Ignore disconnect errors
|
|
260
|
+
}
|
|
261
|
+
this.socket.end();
|
|
262
|
+
this.socket = null;
|
|
263
|
+
}
|
|
264
|
+
this.connectionState = client_types_1.ConnectionState.DISCONNECTED;
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Database API - mirrors AxioDB
|
|
269
|
+
*/
|
|
270
|
+
createDB(name) {
|
|
271
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
272
|
+
yield this.sendCommand(command_types_1.CommandType.CREATE_DB, { dbName: name });
|
|
273
|
+
return new DatabaseProxy_1.default(this, name);
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
deleteDatabase(name) {
|
|
277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
+
yield this.sendCommand(command_types_1.CommandType.DELETE_DB, { dbName: name });
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
isDatabaseExists(name) {
|
|
282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
const result = yield this.sendCommand(command_types_1.CommandType.DB_EXISTS, { dbName: name });
|
|
284
|
+
return result.exists;
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
getInstanceInfo() {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
289
|
+
return yield this.sendCommand(command_types_1.CommandType.GET_INSTANCE_INFO, {});
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Get current connection state
|
|
294
|
+
*/
|
|
295
|
+
get state() {
|
|
296
|
+
return this.connectionState;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Check if connected
|
|
300
|
+
*/
|
|
301
|
+
get isConnected() {
|
|
302
|
+
return this.connectionState === client_types_1.ConnectionState.CONNECTED;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
exports.AxioDBCloud = AxioDBCloud;
|
|
306
|
+
//# sourceMappingURL=AxioDBCloud.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AxioDBCloud.client.js","sourceRoot":"","sources":["../../source/client/AxioDBCloud.client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6BAA6B;AAC7B,mCAAoC;AACpC,mCAAsC;AACtC,qDAAsE;AAEtE,8DAAyD;AACzD,uDAAmG;AACnG,oEAA4C;AAE5C;;GAEG;AACH,MAAa,WAAY,SAAQ,qBAAY;IAW3C,YAAY,gBAAwB,EAAE,OAA4B;QAChE,KAAK,EAAE,CAAC;QATF,WAAM,GAAkB,IAAI,CAAC;QAC7B,kBAAa,GAAkB,IAAI,wBAAa,EAAE,CAAC;QACnD,oBAAe,GAAgC,IAAI,GAAG,EAAE,CAAC;QACzD,oBAAe,GAAoB,8BAAe,CAAC,YAAY,CAAC;QAEhE,qBAAgB,GAAW,CAAC,CAAC;QAC7B,sBAAiB,GAA0B,IAAI,CAAC;QAKtD,0BAA0B;QAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QAExB,4BAA4B;QAC5B,IAAI,CAAC,OAAO,GAAG;YACb,OAAO,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,KAAI,KAAK;YAClC,iBAAiB,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,KAAI,EAAE;YACnD,cAAc,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,KAAI,IAAI;YAC/C,iBAAiB,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,KAAI,K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