背景
假如我要在内网、安全等级限制、无法安装第三方软件,如redis 等的环境下搭建一个开源的机器学习系统,给一些实时生成的数据、图片等进行异步的预测。
这就需要一个纯基于python 实现的消息队列。我们自然的想到使用sqlite 来进行搭建。
基于sqlite 的内存数据库
官方文档
- https://docs.python.org/3/library/sqlite3.html
inmemorydb
- https://www.sqlite.org/inmemorydb.html
性能指标
- https://www.thedataincubator.com/blog/2022/11/17/sqlite-vs-pandas-performance-benchmarks/
测试的仓库 - https://github.com/thedataincubator/sql_vs_pandas
sqlite or memory-sqlite is faster for the following tasks:
select two columns from data (<.1 millisecond for any data size for sqlite. pandas scales with th