data graph on desktop computer

Streamline Your Data With Event-Driven Infrastructure

Streamdata.io helps organizations discover the value of their data by leveraging event-driven infrastructure. With our Distribute product, we augment your existing APIs with an event-driven layer for use by your mission-critical clients and partners, and the web, mobile, and AI applications they depend on.

Get Started For Free Today

Streamdata.io Distribute

Efficiently delivers data across your entire business ecosystem using web standards

Data Providers

data_providers

Generate new revenue from your existing API through our scalable, secure, and cost effective service.

Data Providers

data_providers

Generate new revenue from your existing API through our scalable, secure, and cost effective service.

Devices & Desktop

data_consumers

Take advantage of streaming to create more effective interfaces and increase user engagement.

Devices & Desktop

data_consumers

Take advantage of streaming to create more effective interfaces and increase user engagement.

Machine Learning

machine_learning

Feed your model with data from any API, and stream signals to your clients.

Machine Learning

machine_learning

Feed your model with data from any API, and stream signals to your clients.

How Streamdata.io Works

Without Streamdata.io

graph of polling between API and clients

Every time a client needs data from an API, it has to be requested to the server. This request-response mechanism is called polling.

With Streamdata.io

graph of Streamdata.io receiving data from API and sending data to clients

Data updates are dynamically pushed to the clients whenever available on the API, making the whole process more efficient.

alert(‘? For Developers, By Developers’)

Go beyond the basics of Streamdata.io and find out how it works in more detail.

Developers
JS logo
Cpp logo
iOS logo
Android logo
Node.js logo
RX logo
Python logo
.NET logo
JavaScript
var eventSource = streamdataio.createEventSource(targetUrl, appToken, headers);
var data = [];

eventSource.onData(function(snapshot) {
    data = snapshot;
})
.onPatch(function(patch) {
    jsonPatch.applyPatch(data, patch);
});
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
C++
bool success = sse.LoadEvent(eventStr);
CkString evName;
evName.append(sse.eventName());
CkString evData;
evData.append(sse.data());
if (evData.isEmpty() != true) {
	if (evName.equals("data")) {
		jData = json::parse(evData.getString());
	}
	else if (evName.equals("patch")) {
		json jPatch;
		jPatch = json::parse(evData.getString());
		jData = jData.patch(jPatch);
	}
}
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
iOS
(void)eventSource:(TRVSEventSource *)eventSource didReceiveEvent:(TRVSServerSentEvent *)anEvent;
{
    NSError *e;
    if([anEvent.event isEqualToString:@"data"]==TRUE)
    {
        dataObject = [NSJSONSerialization JSONObjectWithData:anEvent.data options:NSJSONReadingMutableContainers error:&e];
    }
    else if ([anEvent.event isEqualToString:@"patch"]==TRUE)
    {
        NSArray *patch =[NSJSONSerialization JSONObjectWithData:anEvent.data options:NSJSONReadingMutableContainers error:&e];
        [JSONPatch applyPatches:patch toCollection:dataObject];
    }
}
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
Android
EventSource eventSource = new EventSource(new URI(targetUrl), new URI(myApi), new SSEHandler(), headers);
private JsonNode data;
private class SSEHandler implements EventSourceHandler {
    public void onMessage(String event, MessageEvent message) throws IOException {
        if ("data".equals(event)) {
            data = Json.mapper.readTree(message.data);
        } else if ("patch".equals(event)) {
            JsonNode patchNode = mapper.readTree(message.data);
            JsonPatch patch = JsonPatch.fromJson(patchNode);
            data = patch.apply(data);
        }
    }
}
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
Node.js
var eventSource = streamdataio.createEventSource(targetUrl, appToken, headers);
var data = [];
eventSource.onData(function(snapshot) {
    data = snapshot;
})
.onPatch(function(patch) {
    jsonPatch.applyPatch(data, patch);
})
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
Reactive Extensions
StreamdataClient.clientRxJavaClient(apiURL, appKey)
    .toFlowable()
    .subscribe(event -> {
        if (event.isSnapshot()) {
          logger.info("INITIAL SNAPSHOT {}", event.getSnapshot());
        } else if (event.isPatch()) {
          logger.info("PATCH {}, SNAPSHOT UPDATED {}", event.getPatch(), event.getSnapshot());
        } else if (event.isError()) {
          logger.warn("WARNING {}", event.getError());
        }
    }, err -> logger.error("Unexpected error occurred in creating the event source", err));

//Java (sans RxJava)
StreamdataClient.createClient(apiURL, appKey)
       .onSnapshot(snaphot -> logger.info("INITIAL SNAPSHOT {}", data))
       .onPatch(patch -> logger.info("PATCH {} SNAPSHOT UPDATED {}", patch, eventSource.getCurrentSnaphot()))
       .onOpen(() -> logger.info("And we are... live!"))
       .open();
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
Python
with requests.get(URL, stream=True, headers=headers) as response:
    client = sseclient.SSEClient(response)
    for event in client.events():
        if event.event == "data":
            data = json.loads(event.data)
        elif event.event == "patch":
            patch = jsonpatch.JsonPatch.from_string(event.data)
            patch.apply(data, in_place=True)
Github icon See it on GitHub
Copied to clipboard Copy to clipboard
.NET
EventSource es = new EventSource(new Uri(targetUrl));
es.EventReceived += new EventHandler<ServerSentEventReceivedEventArgs>((o, e) =>
{
    if (e.Message.EventType == "data") {
        state = JsonConvert.DeserializeObject<MyObject>(e.Message.Data);
    }
    else if (e.Message.EventType == "patch") {
        var operations = JsonConvert.DeserializeObject<List<Operation<MyObject>>>(e.Message.Data);
        var patchDocumentOperations = new JsonPatchDocument<MyObject>(operations);
        patchDocumentOperations.ApplyTo(state);
    }
} 
Github icon See it on GitHub
Copied to clipboard Copy to clipboard

Getting Started

Once signed up, you can easily connect an API and immediately begin sending or receiving data updates in realtime. Code samples will help you get started or explore new possibilities.

Get Started

Docs

To learn more about how Streamdata.io works — from resources and security to compression and configuration — visit our Docs page where our in-house developers explain everything you need to know about optimizing your data streaming.

Learn More