Giter VIP home page Giter VIP logo

rsqldb's Introduction

RSQLDB

The database build for stream processing.

Overview

RSQLDB is a database for stream processing build on the of RocketMQ. It is distributed, highly available,scalable. SQL can be used to define a stream processing task, and RSQLDB parse it into a stream-processing task. RSQLDB offers the fellow core features:

  • Restful API - create, query, stop, stream-processing tasks;
  • Standard SQL - describe the stream processing task with standard sql;
  • Materialized views - incremental calculation on the of stream;

Deploy

Run RocketMQ 5.0 locally

Steps are as follows:

  • Install Java

  • Download RocketMQ

  • Start NameServer

  • Start Broker

More details can be obtained at quick start;

Run RSQLDB

From source code:

  • Git clone and compile
git clone [email protected]:alibaba/rsqldb.git

#compile antlr4 file to source code:
mvn clean compile -DskipTests
  • Run the entrance method:
  com.alibaba.rsqldb.rest.Application

From distribution package

  • Download distribution package
  • Unzip package
unzip rsqldb-distribution.zip
  • Start rsqldb
cd rsqldb && sh bin/start.sh

Use Cases and Examples

Filter

select *
from sourceTable where age>20 and name like '%mack';

Join

SELECT Websites.name as `count`, Websites.url as url, SUM(access_log.count) AS nums 
FROM access_log 
WHERE access_log.`count` > 100
INNER JOIN Websites ON access_log.site_id=Websites.id and access_log.url=Websites.url

Window

select 
TUMBLE_START(ts, INTERVAL '5' SECOND)       AS window_start,
TUMBLE_END(ts, INTERVAL '5' SECOND)         AS window_end,
position                                    AS position,
sum(num)                                    AS sumNum
from  sourceTable
where num > 5
group by TUMBLE(ts, INTERVAL '5' SECOND), position
having sum(num) < 20;
  • More examples can be found here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.