惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

OpenResty

分享一个在 openresty 搭建 long polling 推送服务的配置文件 - V2EX 云原生网关 Kong 源码分析 - V2EX v2 有没有用 openresty 开发的? OpenResty 使用 ngx_balancer.set_current_peer() 方法不能设置域名,那对于转发到某个域名的情况要怎么做? - V2EX 这个节点这么冷清? - V2EX [赠票活动 / 北京] BearyChat 邀请你一起参加 OpenResty Con 2015 - V2EX OpenResty 目前有没有在稳定维护中的 PPA? - V2EX OpenResty 中有 openssl_sign() 的实现么? - V2EX 一个可以调试 OpenResty 的 Lua 代码的 IDE - V2EX
用 Nginx Openresty 写个网站,写得很痛苦 - V2EX
mywaiting · 2018-03-15 · via OpenResty

因为工作需要,为后端的 API 写了个简单的 Nginx lua 可控的代理,就几百行的 Lua,边测试边学习,把这点 Openresty 的代码给写完了~ 虽然后来发现有 Kong 这样优秀的项目,不过代码也不多,就当造个轮子了~

不知道是不是看到 Openresty 的性能好啥,还是完美癖发作了,觉得服务器上与其跑个 Python 的 Tornado 做后端,不如尝试一下用 Openresty 来写写后端的逻辑

于是动手,一边学习 lua 一边写,越写越感觉痛苦,虽然这痛苦很大程度是因为对 lua 不够熟悉引起的

1、table 作为 lua 主要的数据结构,竟然没有 table.append(table) 这样的实现,很无奈
2、遍地的 local、local 不知道大家看着有什么感想
3、即使是 Openresty 发展了几年的今天,感觉周边成熟的库仍然不够,我能吐槽一下翻遍整个 Github 都没有找到个现成好用点的 form validation 的库,只能自己手写正则去 form validate,这还是我用了 lor 框架的情况下的现实

稍微吐槽一下,也不算吐槽吧,就是小学生试用了 lua 和 Openresty 以后的一点体会

Openresty 的设计真心适合 Nginx web/api 这样的场景

Lua 的设计真心简洁,不过也实在太简洁了~ 我还是回到 Python 的怀抱里吃着各种语法糖做梦好了~