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

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

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 的怀抱里吃着各种语法糖做梦好了~