The decision was made to have all async data flow components in a single repository.
Javascript library for async data flow implementation for browsers.
you need to have a running instances of async-dataflow-channel-sender
npm install chanjs-client --save
You can understand better the flow with this sequence diagram.
import { AsyncClient } from 'chanjs-client';
...
const client = new AsyncClient({
socket_url: "wss://some.domain:8984/socket",
channel_ref: "some_channel_ref",
channel_secret: "secret_from_some_auth_service",
heartbeat_interval: 200
});
...
Parameters | Description | Default Value |
---|---|---|
socket_url | async-dataflow-channel-sender cluster url | |
channel_ref | channel getted from rest service of async-dataflow-channel-sender | |
channel_secret | token getted from rest service of async-dataflow-channel-sender | |
heartbeat_interval | time in milliseconds to verify socket connection this parameter must be less than the socket_idle_timeout on the channel sender | 750 |
enable_binary_transport | boolean parameter to indicate use binary protocol | false |
client.listenEvent("event.some-name", message => someCallback(message.payload));
Review the issues. Read how Contributing.