Giter Site home page Giter Site logo

quicksilver's Introduction

QuickSilver

本地高速快照系统

该系统可用于本地快速持久化结构化数据。单个线程每毫秒50K对象可写入8500次。在高并发时,写入性能更高。

适用于对写入性能要求较高的应用场景。

特性

  1. 高速持久化
  2. 自动实现快照分割

Getting Started

不使用Spring Boot

public void writeSnapshot() {
    SnapshotHeader header = new SnapshotHeader("/data/hulk", "snapshot.test.log");
    SnapshotRule rule = new IncrementShardingRule(new Quota(10 * 1024, 1000));
    Snapshot snapshot = new Snapshot(header, rule);
    snapshot.write(new OrderEntry("12345"));
}

使用Spring Boot

@Component
public class SnapshotForSpringBoot {
    
    @Autowired
    private Snapshot snapshot;

    public void writeSnapshotForSpringBoot() {
        snapshot.getHeader().setFileName("snapshot.test.log");
        snapshot.write(new OrderEntry("12345"));
    }
    
}

工程属性配置

配置属性说明:

  • mtl.snapshot.dir:该属性指定本地快照存储目录,默认:/data/hulk

  • mtl.snapshot.rule:该属性设置本地快照分割策略,默认:increment,自然数自增分割

  • mtl.snapshot.bufferSize:该属性指定读取/写入缓冲区大小,单位Byte,默认:20K

  • mtl.snapshot.perFileSize:该属性设置单个快照存储记录数,默认:1000

quicksilver's People

Contributors

wchswchs avatar

Watchers

James Cloos avatar

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.