Nginx 未来版本里的 Javascript 虚拟机 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Livid
54.38D
440.24D
V2EX    NGINX

Nginx 未来版本里的 Javascript 虚拟机

  •  
  •   Livid
    PRO
    2015-10-01 12:22:26 +08:00 6034 次点击
    这是一个创建于 3665 天前的主题,其中的信息可能已经有所发展或是发生改变。
    21 条回复    2015-10-02 00:20:26 +08:00
    vitovan
        1
    vitovan  
       2015-10-01 12:24:57 +08:00
    WTF!
    shuson
        2
    shuson  
       2015-10-01 12:29:41 +08:00
    不得不说老毛子果然是战斗民族
    LazyZhu
        3
    LazyZhu  
       2015-10-01 12:35:33 +08:00
    Niubility.
    vitovan
        4
    vitovan  
       2015-10-01 12:37:40 +08:00
    riaqn
        5
    riaqn  
       2015-10-01 12:38:31 +08:00
    用 js 来配置 nginx ? 是这样理解么……
    xfspace
        6
    xfspace  
       2015-10-01 12:39:10 +08:00 via iPad
    这功能。。。不错
    emric
        7
    emric  
       2015-10-01 12:41:41 +08:00
    简直前端狗的春天.
    db520
        8
    db520  
       2015-10-01 12:47:36 +08:00 via Android
    lua 怎么办,有必要又造一个轮子吗?
    wdlth
        9
    wdlth  
       2015-10-01 12:52:20 +08:00
    nodeGINX 要出现了?
    dndx
        10
    dndx  
       2015-10-01 12:55:16 +08:00
    OpenResty 表示压力很大。
    MaiCong
        11
    MaiCong  
       2015-10-01 13:13:03 +08:00 via iPad
    表示期待
    joyee
        12
    joyee  
       2015-10-01 13:25:41 +08:00
    We run a separate VM for each request, so there ’ s no need for garbage collection.

    谁敢做下小白鼠?
    Roope
        13
    Roope  
       2015-10-01 14:11:56 +08:00
    感觉好你还的样子。

    @wdlth nginScript
    love
        14
    love  
       2015-10-01 14:28:52 +08:00
    @joyee 这很好啊,和第一语言 php 一样的运行模式
    kn007
        15
    kn007  
       2015-10-01 15:58:51 +08:00
    xiqingongzi
        16
    xiqingongzi  
       2015-10-01 16:51:39 +08:00
    我说 nginx 的 wiki 咋改版了呢
    Robling
        17
    Robling  
       2015-10-01 18:32:58 +08:00
    不是作为一个模块而是直接嵌入到里面么?
    cylin
        18
    cylin  
       2015-10-01 18:56:30 +08:00
    好棒(//)
    paulw54jrn
        19
    paulw54jrn  
       2015-10-01 19:47:27 +08:00   1
    评论褒贬不一啊

    ```
    You're using JS, which helps the expressivity issue a bit, but in exchange it's inheriting all the problems of JS, and squishing them into my web server, and with no apparent framework for making common and dangerous tasks simple and safe.

    For example, the comment in your second says that unary + applied to a string will "convert upstream number to integer", but that's not true. It converts a String to a Number (including the "number" NaN). +"0.5" is the Number 0.5, which will send you to the server "my_upstream0.5". +"X" is NaN, which will send you to "my_upstreamNaN". Unary + supports scientific notation, too, so "1.2e-100" becomes "my_upstream1.2e-100". It supports hexadecimal integers, too, though that's less interesting when you clamp to [0,1].

    These mis-routings are probably harmless in this case, but it's not hard to imagine similar situations where they're not.

    If the authors of a feature can't use it safely in their trivial demo examples in the product announcement, what confidence do I have that I'm going to be able to make it work reliably and securely on an actual production website?

    --JS Dude
    ```
    secondwtq
        20
    secondwtq  
       2015-10-01 22:34:53 +08:00
    貌似开发者的意思是希望这东西仅仅用来配置 nginx 服务程序,而不是做出一个完整的服务。和 OpenResty 之类还是有分别的。
    zsj950618
        21
    zsj950618  
       2015-10-02 00:20:26 +08:00 via Android
    世界是 Javascript 的
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1474 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 31ms UTC 16:42 PVG 00:42 LAX 09:42 JFK 12:42
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86