Going Real-Time Has Just Become Easy: Baqend Real-Time Queries Hit Public Beta

Wolfram Wingerath
Speed Kit Blog
Published in
3 min readJul 6, 2017

--

Real-time queries take the complexity out of building interactive apps and thus boost your productivity into orbit. They behave exactly like regular database queries, but receive continuous updates and thus never become stale. Check out our Twoogle example app to see Baqend Real-Time Queries in action!

To showcase our new real-time query feature, we created a simple real-time app on Codepen:

Twoogle lets you filter a collection of Twitter messages and displays the result, most-recent tweets first. The twist is that new tweets are inserted LIVE into the Tweet collection. While regular static queries become stale very quickly, real-time queries automatically stay up-to-date as they are self-maintaining.

To see the difference between old-school static queries and our new real-time queries, just click the corresponding buttons under the Twoogle search panel.

Post a tweet with #baqend and see it pop up in Twoogle!

We hooked Twoogle up to follow a recent event (G20), but also some topics we are generally interested in. Tweet a message containing one of the following hashtags and it will immediately appear in Twoogle: #baqend, #twoogle, #nosql, #g20, #g20ham, #g20ham17, #bigdata, #javascript, #java, #everymillisecondcounts, #devops, #scalability, #scalable, #real-time, #realtime, #distributed, #systems, #programming, #science, #coding, #angularjs, #rxjs, #database, #caching, #research, #serverless.

Static vs. Real-Time

Static and real-time queries can be used in identical fashion. First, you have to specify the data you are interested in:

Then, you have to execute the query and provide a function that does something useful with an incoming result:

Using resultList, your function will only be called once. Using resultStream, your function will be called whenever issuing a static query would return something different from your current result.

What Can It Do?

Baqend Real-Time Queries are as powerful as normal queries. They support:

Filter Queries

  • comparisons (e.g. <, , =, !=, , >, …)
  • regex expressions
  • collection operators (e.g. $in, $all, $size, …)
  • composite queries (e.g. $and, $or, $nor, …)
  • and more (e.g. $mod, $exists, …)

Sorted Queries

  • ordering by multiple attributes
  • limit & offset, e.g. for convenient pagination (as in Twoogle)

If you want to know more about the research behind our new real-time feature, read our paper or come and talk to us at VLDB 2017 next month!

Build Your Own!

Are you eager to create your own real-time app? Here’s how you get started:

You will get help from the API docs and our support team via mail or website chat!

Don’t want to miss our next post on real-time features? Get it conveniently delivered to your inbox by joining our newsletter.

--

--

Distributed systems engineer at Baqend, a serverless backend for faster websites. Background in database research & developing Baqend’s real-time query engine.