diff --git a/Project.toml b/Project.toml index 85f16c3..bc368e8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "NATSBridge" uuid = "f2724d33-f338-4a57-b9f8-1be882570d10" -version = "0.5.5" +version = "0.5.6" authors = ["narawat "] [deps] diff --git a/docs/spec.md b/docs/spec.md index e18f560..6c4b6e8 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -647,6 +647,41 @@ function fileserver_download_handler( --- +## Implementation Files + +| File | Platform | Features | Notes | +|------|----------|----------|-------| +| [`src/NATSBridge.jl`](../src/NATSBridge.jl) | Julia | Full feature set, Arrow IPC, multiple dispatch | Ground truth implementation | +| [`src/natsbridge_ssr.js`](../src/natsbridge_ssr.js) | Node.js | Arrow IPC, async/await | Server-side JavaScript | +| [`src/natsbridge_csr.js`](../src/natsbridge_csr.js) | Browser | JSON table only, WebSocket NATS | Client-side rendering | +| [`src/natsbridge.py`](../src/natsbridge.py) | Python | Arrow IPC, async/await | Desktop Python | +| [`src/natsbridge_mpy.py`](../src/natsbridge_mpy.py) | MicroPython | Limited to direct transport | Memory-constrained | + +### Browser Implementation Notes + +The browser implementation ([`src/natsbridge_csr.js`](../src/natsbridge_csr.js)) has the following constraints: + +| Constraint | Reason | Workaround | +|------------|--------|------------| +| No Apache Arrow IPC | Browser-incompatible dependency | Use `jsontable` for tabular data | +| WebSocket NATS only | Browser cannot use TCP directly | Use `ws://` or `wss://` broker URLs | +| Fetch API for HTTP | Browser fetch() API only | Compatible with Plik and other HTTP servers | + +### Payload Type Availability by Platform + +| Payload Type | Julia | Node.js | Browser | Python | MicroPython | +|--------------|-------|---------|---------|--------|-------------| +| `text` | ✅ | ✅ | ✅ | ✅ | ✅ | +| `dictionary` | ✅ | ✅ | ✅ | ✅ | ✅ | +| `arrowtable` | ✅ | ✅ | ❌ | ✅ | ❌ | +| `jsontable` | ✅ | ✅ | ✅ | ✅ | ⚠️ | +| `image` | ✅ | ✅ | ✅ | ✅ | ✅ | +| `audio` | ✅ | ✅ | ✅ | ✅ | ✅ | +| `video` | ✅ | ✅ | ✅ | ✅ | ✅ | +| `binary` | ✅ | ✅ | ✅ | ✅ | ✅ | + +--- + ## Message Flow ### Sending Flow