openresty支持SQLite不?

206 views
Skip to first unread message

Wendal Chen

unread,
Mar 31, 2012, 6:37:11 AM3/31/12
to open...@googlegroups.com
RT

没找到说明

--
Wendal Chen
GuangDong China

G_will

unread,
Mar 31, 2012, 6:38:46 AM3/31/12
to open...@googlegroups.com


在 2012年3月31日 下午6:37,Wendal Chen <wenda...@gmail.com>写道:
RT

没找到说明

呃。。。您是想怎么用?
 


--
Wendal Chen
GuangDong China

Wendal Chen

unread,
Mar 31, 2012, 6:46:05 AM3/31/12
to open...@googlegroups.com
我需要读取一个sqlite数据库的文件, 因为这个数据库文件是其他程序维护的的,没法换成mysql

所以呢,我就问一下, 能否像mysql那样查询其中的数据, 例如nginx_drizzle,或者lua-resty-mysql

Wendal Chen

unread,
Mar 31, 2012, 6:47:36 AM3/31/12
to open...@googlegroups.com
补充一句,只读,不写.

G_will

unread,
Mar 31, 2012, 8:05:35 AM3/31/12
to open...@googlegroups.com
在 2012年3月31日 下午6:46,Wendal Chen <wenda...@gmail.com>写道:
我需要读取一个sqlite数据库的文件, 因为这个数据库文件是其他程序维护的的,没法换成mysql

所以呢,我就问一下, 能否像mysql那样查询其中的数据, 例如nginx_drizzle,或者lua-resty-mysql


呃。。。SQLite不是像MySQL那样的S/C形式的数据库。

你可以看这里。

smallfish

unread,
Mar 31, 2012, 8:13:00 AM3/31/12
to open...@googlegroups.com
嗯,openresty本身并不支持sqlite的。你可以通过lua的sqlite库来调用。
--

Wendal Chen

unread,
Mar 31, 2012, 8:14:00 AM3/31/12
to open...@googlegroups.com
这些库都是阻塞的,所以想看看有无非阻塞的方案

Simon

unread,
Mar 31, 2012, 9:20:29 PM3/31/12
to openresty
sqlite 是读取本地文件的,nginx除了aio读取文件,还没有异步文件io的方案。

ngx_lua也只是做到网络io的异步复用,本地io目前还没有非阻塞的方案。

On Mar 31, 8:14 pm, Wendal Chen <wendal1...@gmail.com> wrote:
> 这些库都是阻塞的,所以想看看有无非阻塞的方案
>

> 在 2012年3月31日 下午8:13,smallfish <smallfish...@gmail.com>写道:
>
>
>
> > 嗯,openresty本身并不支持sqlite的。你可以通过lua的sqlite库来调用。
> > --
> > blog:http://chenxiaoyu.org
>

> > 在 2012年3月31日 下午8:05,G_will <gwill.b...@gmail.com>写道:


>
> >> 在 2012年3月31日 下午6:46,Wendal Chen <wendal1...@gmail.com>写道:
>
> >>> 我需要读取一个sqlite数据库的文件, 因为这个数据库文件是其他程序维护的的,没法换成mysql
>
> >>> 所以呢,我就问一下, 能否像mysql那样查询其中的数据, 例如nginx_drizzle,或者lua-resty-mysql
>
> >> 呃。。。SQLite不是像MySQL那样的S/C形式的数据库。
>
> >> 你可以看这里。
>
> >>http://lua-users.org/wiki/LuaSqlite
>

> >>> 在 2012年3月31日 下午6:38,G_will <gwill.b...@gmail.com>写道:


>
> >>>> 在 2012年3月31日 下午6:37,Wendal Chen <wendal1...@gmail.com>写道:
>
> >>>>> RT
>
> >>>>> 没找到说明
>
> >>>> 呃。。。您是想怎么用?
>
> >>>>> --
> >>>>> Wendal Chen
> >>>>> GuangDong China
>
> >>>>> --
> >>>>> 邮件自: 列表“openresty”,专用于技术讨论!
> >>>>> 发言: 请发邮件到 open...@googlegroups.com
> >>>>> 退订: 请发邮件至 openresty+...@googlegroups.com
> >>>>> 详情:http://groups.google.com/group/openresty
> >>>>> 官网:http://openresty.org/
> >>>>> 仓库:https://github.com/agentzh/ngx_openresty

> >>>>> 建议: 提问的智慧http://wiki.woodpecker.org.cn/moin/AskForHelp


> >>>>> 教程:http://agentzh.org/misc/nginx/agentzh-nginx-tutorials-zhcn.html
>
> >>>>  --
> >>>> 邮件自: 列表“openresty”,专用于技术讨论!
> >>>> 发言: 请发邮件到 open...@googlegroups.com
> >>>> 退订: 请发邮件至 openresty+...@googlegroups.com
> >>>> 详情:http://groups.google.com/group/openresty
> >>>> 官网:http://openresty.org/
> >>>> 仓库:https://github.com/agentzh/ngx_openresty

> >>>> 建议: 提问的智慧http://wiki.woodpecker.org.cn/moin/AskForHelp


> >>>> 教程:http://agentzh.org/misc/nginx/agentzh-nginx-tutorials-zhcn.html
>
> >>> --
> >>> Wendal Chen
> >>> GuangDong China
>
> >>> --
> >>> 邮件自: 列表“openresty”,专用于技术讨论!
> >>> 发言: 请发邮件到 open...@googlegroups.com
> >>> 退订: 请发邮件至 openresty+...@googlegroups.com
> >>> 详情:http://groups.google.com/group/openresty
> >>> 官网:http://openresty.org/
> >>> 仓库:https://github.com/agentzh/ngx_openresty

> >>> 建议: 提问的智慧http://wiki.woodpecker.org.cn/moin/AskForHelp


> >>> 教程:http://agentzh.org/misc/nginx/agentzh-nginx-tutorials-zhcn.html
>
> >>  --
> >> 邮件自: 列表“openresty”,专用于技术讨论!
> >> 发言: 请发邮件到 open...@googlegroups.com
> >> 退订: 请发邮件至 openresty+...@googlegroups.com
> >> 详情:http://groups.google.com/group/openresty
> >> 官网:http://openresty.org/
> >> 仓库:https://github.com/agentzh/ngx_openresty

> >> 建议: 提问的智慧http://wiki.woodpecker.org.cn/moin/AskForHelp


> >> 教程:http://agentzh.org/misc/nginx/agentzh-nginx-tutorials-zhcn.html
>
> >  --
> > 邮件自: 列表“openresty”,专用于技术讨论!
> > 发言: 请发邮件到 open...@googlegroups.com
> > 退订: 请发邮件至 openresty+...@googlegroups.com
> > 详情:http://groups.google.com/group/openresty
> > 官网:http://openresty.org/
> > 仓库:https://github.com/agentzh/ngx_openresty

> > 建议: 提问的智慧http://wiki.woodpecker.org.cn/moin/AskForHelp

吕林潇

unread,
Sep 21, 2022, 9:54:50 PM9/21/22
to openresty
我目前也遇到了sqlite写入问题。ngx_lua目前没有本地IO的异步办法,受教了。

吕林潇

unread,
Sep 21, 2022, 10:28:28 PM9/21/22
to openresty
我查看了一下帖子时间后,发现10年前了,请问这十年有什么变化吗?

Junlong li

unread,
Oct 10, 2022, 9:34:50 AM10/10/22
to openresty
最新的 openresty 支持 run_worker_thread, 可以说是一种形式的异步。
不过sqlite 异步的话大多数场景也是没有问题的,除非数据量非常的大。

Reply all
Reply to author
Forward
0 new messages