Jboot v3.9.0 released, for big data, new support for Clickhouse data source

Jboot is a simpler distributed, microservice framework.

Jboot is a microservice framework developed based on JFinal, JFinal-Undertow, Dubbo, Seata, Sentinel, ShardingSphere, Nacos, etc., to help developers lower the threshold for microservice and distributed development. Shuangshuang development, happy life.

So far, Jboot has been open source for more than 5 years, iterated over 160+ versions, and has been used by more than 1000+ companies, including many well-known listed companies.

Jboot jumped directly from v3.8.1 version to v3.9.0 version. The main reason is the new support for columnar database management system (DBMS) ClickHouse. In Jboot, we can directly add, delete, modify and check ClickHouse through Model.

ClickHouse is an open source database based on column storage for real-time data analysis by Yandex (Russia's largest search engine). Its data processing speed is 100-1000 times faster than traditional methods. The performance of ClickHouse exceeds the comparable column-oriented DBMS currently on the market, and each server processes hundreds of millions to one billion rows and tens of gigabytes of data per second per second.

How strong is ClickHouse?

We probably tested about 100 million data in a single table, and used select count() to query the number:

  • The time required for ClickHouse is: 0.5 seconds
  • The time required by Mysql is: 35 seconds

For more tests, you can test by yourself, refer to the Internet or check the official website  https://clickhouse.tech/benchmark/dbms  .

Using ClickHouse in Jboot is no different from using Mysql. It is mainly divided into 2 steps:

  • 1. Add driver Maven dependency
  • 2. Add configuration in jboot.properties
<dependency>
    <groupId>com.github.housepower</groupId>
    <artifactId>clickhouse-native-jdbc-shaded</artifactId>
    <version>2.5.2</version>
</dependency>
jboot.datasource.type=clickhouse
jboot.datasource.url=jdbc:clickhouse://localhost:9000/your-db-name

Then, you can use the Model in JFinal to perform save(), update(), find(), paginate()... and so on. such as:

1. Query directly through Db:

List<Record> records = Db.find("select * from user_info");

2. Query through Jboot's Columns:

Columns columns = Columns.create();
columns.between("id",1,5);

List<User> users = dao.findListByColumns(columns);

3. Save data:

UserInfo user = new UserInfo();
user.set("id",100);
user.set("age",20);
user.set("name","张三");
user.save();

4. Update or delete data:

//更新
UserInfo user = new UserInfo();
user.set("id",100);
user.set("name","李四");
user.update();


//删除
dao.deleteById(100);

5. No more examples one by one, just use JFinal API to operate directly. Of course, in Jboot, we can configure multiple data sources, some models use Mysql, and some models use Clickhouse.

 

Development documents:

https://jbootprojects.gitee.io/docs/

At the same time, Jboot officially launched a fee-based enterprise-level development framework JbootAdmin,

Details  https://jbootprojects.gitee.io/docs/jbootadmin/

maven dependency:

<dependency>
    <groupId>io.jboot</groupId>
    <artifactId>jboot</artifactId>
    <version>3.9.0</version>
</dependency>

Hello World:

@RequestMapping("/")
public class HelloworldController extends JbootController {

    public void index(){
        renderText("hello world");
    }

    public static void main(String[] args){
        JbootApplication.run(args);
    }
}

Guess you like

Origin www.oschina.net/news/127482/jboot-3-9-0-released