9

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

 3 years ago
source link: https://medium.baqend.com/going-real-time-has-just-become-easy-baqend-real-time-queries-hit-public-beta-3a44a13fde86
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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

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!

Image for post
Image for post

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:

Image for post
Image for post

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

Image for post
Image for post

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK