data graph on desktop computer

Streamline Your Data for Faster Growth

Connect to your data-driven future with Streamdata.io β€” we help businesses increase efficiency and revenue by turning existing APIs into event-driven streaming APIs.

Get Started For Free Today

How Streamdata.io Works

Without Streamdata.io

graph of polling between API and clients

Every time a client wants a set of data, it needs to request it to the server and wait for the server response. That's polling.

With Streamdata.io

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

Instead of having to request data to the server every time, our proxy pushes data and data updates to the clients.

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

See The Value Over Time

This graph shows you in real time the amount of data exchanged while polling or using Streandata.io. Combining streaming and data optimization, Streamdata.io offers significant value over time in terms of bandwidth usage and associated costs.

https://stockmarket.streamdata.io/v2/prices

Streamdata.io Enhances Businesses Across All Industries

Discover how our serverless, scalable, and cost-effective product can better serve your business.

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

We empower data scientists by allowing them to take advantage of any API to feed their models with events.

Machine Learning

machine_learning

We empower data scientists by allowing them to take advantage of any API to feed their models with events.

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