update
This commit is contained in:
32
README.md
32
README.md
@@ -47,9 +47,9 @@ NATSBridge enables seamless communication across multiple platforms through NATS
|
||||
| Platform | Implementation | Features |
|
||||
|----------|----------------|----------|
|
||||
| **Julia** | [`src/NATSBridge.jl`](src/NATSBridge.jl) | Full feature set, Arrow IPC, multiple dispatch |
|
||||
| **JavaScript** | [`src/natbridge.js`](src/natbridge.js) | Node.js & browser, async/await |
|
||||
| **Python** | [`src/natbridge.py`](src/natbridge.py) | Desktop Python, asyncio, type hints |
|
||||
| **MicroPython** | [`src/natbridge_mpy.py`](src/natbridge_mpy.py) | Memory-constrained, synchronous API |
|
||||
| **JavaScript** | [`src/natsbridge.js`](src/natsbridge.js) | Node.js & browser, async/await |
|
||||
| **Python** | [`src/natsbridge.py`](src/natsbridge.py) | Desktop Python, asyncio, type hints |
|
||||
| **MicroPython** | [`src/natsbridge_mpy.py`](src/natsbridge_mpy.py) | Memory-constrained, synchronous API |
|
||||
|
||||
### Platform Comparison
|
||||
|
||||
@@ -332,7 +332,7 @@ env, env_json_str = NATSBridge.smartsend(
|
||||
#### JavaScript
|
||||
|
||||
```javascript
|
||||
const NATSBridge = require('natbridge');
|
||||
const NATSBridge = require('natsbridge');
|
||||
|
||||
const [env, env_json_str] = await NATSBridge.smartsend(
|
||||
subject,
|
||||
@@ -361,7 +361,7 @@ const [env, env_json_str] = await NATSBridge.smartsend(
|
||||
#### Python
|
||||
|
||||
```python
|
||||
from natbridge import NATSBridge
|
||||
from natsbridge import NATSBridge
|
||||
|
||||
env, env_json_str = await NATSBridge.smartsend(
|
||||
subject: str,
|
||||
@@ -388,7 +388,7 @@ env, env_json_str = await NATSBridge.smartsend(
|
||||
#### MicroPython
|
||||
|
||||
```python
|
||||
from natbridge import NATSBridge
|
||||
from natsbridge import NATSBridge
|
||||
|
||||
# Limited to direct transport (< 100KB threshold)
|
||||
env, env_json_str = NATSBridge.smartsend(
|
||||
@@ -551,7 +551,7 @@ env, env_json_str = NATSBridge.smartsend("/chat/room1", data; fileserver_url="ht
|
||||
#### JavaScript
|
||||
|
||||
```javascript
|
||||
const NATSBridge = require('natbridge');
|
||||
const NATSBridge = require('natsbridge');
|
||||
|
||||
const data = [
|
||||
["message_text", "Hello!", "text"],
|
||||
@@ -569,7 +569,7 @@ const [env, env_json_str] = await NATSBridge.smartsend(
|
||||
#### Python
|
||||
|
||||
```python
|
||||
from natbridge import NATSBridge
|
||||
from natsbridge import NATSBridge
|
||||
|
||||
data = [
|
||||
("message_text", "Hello!", "text"),
|
||||
@@ -606,7 +606,7 @@ env, env_json_str = NATSBridge.smartsend("/device/config", data)
|
||||
#### JavaScript
|
||||
|
||||
```javascript
|
||||
const NATSBridge = require('natbridge');
|
||||
const NATSBridge = require('natsbridge');
|
||||
|
||||
const config = {
|
||||
wifi_ssid: "MyNetwork",
|
||||
@@ -623,7 +623,7 @@ const [env, env_json_str] = await NATSBridge.smartsend(
|
||||
#### Python
|
||||
|
||||
```python
|
||||
from natbridge import NATSBridge
|
||||
from natsbridge import NATSBridge
|
||||
|
||||
config = {
|
||||
"wifi_ssid": "MyNetwork",
|
||||
@@ -658,7 +658,7 @@ env, env_json_str = NATSBridge.smartsend("/data/analysis", data)
|
||||
#### JavaScript
|
||||
|
||||
```javascript
|
||||
const NATSBridge = require('natbridge');
|
||||
const NATSBridge = require('natsbridge');
|
||||
|
||||
const df = [
|
||||
{ id: 1, name: "Alice", score: 95 },
|
||||
@@ -675,7 +675,7 @@ const [env, env_json_str] = await NATSBridge.smartsend(
|
||||
#### Python
|
||||
|
||||
```python
|
||||
from natbridge import NATSBridge
|
||||
from natsbridge import NATSBridge
|
||||
import pandas as pd
|
||||
|
||||
df = pd.DataFrame({
|
||||
@@ -735,7 +735,7 @@ end
|
||||
#### JavaScript
|
||||
|
||||
```javascript
|
||||
const NATSBridge = require('natbridge');
|
||||
const NATSBridge = require('natsbridge');
|
||||
|
||||
// Requester
|
||||
const [env, env_json_str] = await NATSBridge.smartsend(
|
||||
@@ -748,7 +748,7 @@ const [env, env_json_str] = await NATSBridge.smartsend(
|
||||
```javascript
|
||||
// Responder
|
||||
const nats = require('nats');
|
||||
const NATSBridge = require('natbridge');
|
||||
const NATSBridge = require('natsbridge');
|
||||
|
||||
async function testResponder() {
|
||||
const conn = await nats.connect('nats://localhost:4222');
|
||||
@@ -782,7 +782,7 @@ async function testResponder() {
|
||||
#### Python
|
||||
|
||||
```python
|
||||
from natbridge import NATSBridge
|
||||
from natsbridge import NATSBridge
|
||||
|
||||
# Requester
|
||||
env, env_json_str = await NATSBridge.smartsend(
|
||||
@@ -795,7 +795,7 @@ env, env_json_str = await NATSBridge.smartsend(
|
||||
|
||||
```python
|
||||
# Responder
|
||||
from natbridge import NATSBridge
|
||||
from natsbridge import NATSBridge
|
||||
import asyncio
|
||||
import nats
|
||||
|
||||
|
||||
Reference in New Issue
Block a user