- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/tramchamploo/buffer-slayer
- 软件文档: https://github.com/tramchamploo/buffer-slayer
软件介绍
buffer-slayer 是一个把请求在内存中 buffer 并批量发送的工具,适用于批量能显著提升性能的组件(redis-client、jdbc), 支持一对一的回调。
快速启动
io.bufferslayer
buffer-spring-jdbc
1.1.0
ReporterProperties reporterProperties = new ReporterProperties()
.setBufferedMaxMessages(500)
.setPendingMaxMessages(10000)
.setMetrics("inmemory")
.setMetricsExporter("http")
.setParallelismPerBatch(5)
.setSenderExecutor(new ThreadPoolExecutor(200,
200, 0, TimeUnit.MILLISECONDS, new SynchronousQueue<>()));
BatchedJdbcTemplate template = new BatchedJdbcTemplate(reporterProperties);
template.setDataSource(dataSource);
Promise promise = template.update(...);
promise.done(success -> ...)
.fail(reject -> ...);
吞吐量对比
Benchmark Mode Cnt Score Units
BatchedJdbcTemplateBenchmark.high_contention_batched thrpt 15 8709.042 ops/s
BatchedJdbcTemplateBenchmark.high_contention_unbatched thrpt 15 271.529 ops/s
BatchedJdbcTemplateBenchmark.mild_contention_batched thrpt 15 2146.595 ops/s
BatchedJdbcTemplateBenchmark.mild_contention_unbatched thrpt 15 262.621 ops/s
BatchedJdbcTemplateBenchmark.no_contention_batched thrpt 15 1194.852 ops/s
BatchedJdbcTemplateBenchmark.no_contention_unbatched thrpt 15 201.806 ops/s
JavaScript编程精解
Marijn Haverbeke / 徐涛 / 机械工业出版社华章公司 / 2012-10-1 / 49.00元
如果你只想阅读一本关于JavaScript的图书,那么本书应该是你的首选。本书由世界级JavaScript程序员撰写,JavaScript之父和多位JavaScript专家鼎力推荐。本书适合作为系统学习JavaScript的参考书,它在写作思路上几乎与现有的所有同类书都不同,打破常规,将编程原理与运用规则完美地结合在一起,而且将所有知识点与一个又一个经典的编程故事融合在一起,读者可以在轻松的游戏式......一起来看看 《JavaScript编程精解》 这本书的介绍吧!
