[OpenWrt-Devel] LuaJIT Vs Lua and other questions
Anton D. Kachalov
mouse at yandex-team.ru
Wed Jun 29 17:43:50 EDT 2016
Hello there.
Could someone advise what is the right place to discuss this topic?
Thanks.
06.06.2016, 11:15, "Anton D. Kachalov" <mouse at yandex-team.ru>:
> Hello.
>
> I'm trying to replace standard "lua" package with "luajit" from my repo:
>
> https://github.com/ya-mouse/openbmc-packages
>
> First I've tried to name package as "luajit" and add CONFLICTS:=lua (version should be provided to conflict with) and PROVIDES:=lua variables like for RPM to make a replacement package, but I get a dependency loop. Therefore, I name produceable packages "lua" and "liblua". The problem is that I unable to override default "lua" package from openwrt tree (it is not possible to "uninstall", no effect of scripts/feeds uninstall ...). Only one possible way is to remove "lua" directory from "package" dir and install own luajit pack via "scripts/feeds install -p ... luajit". Does mainstream package directory has a feed name while it is not separate from build tree like an extra openwrt/packages repo and other 3rd party repos? It could be fair to have an ability to override core packages with "scripts/feeds install".
>
> I'm going to use LuaJIT on our BMCs (ARM Aspeed SoC) as a HTTP API backend. Nginx compiled with LuaJIT takes about 220 RPS on dynamic content (reading one value from i2c bus at each call). With auth checking (and caching result of auth via ubus for 1min at Nginx site via shared dict) I've got 200 RPS (9% drop). For reference, static pages serves by Nginx at 330 RPS. Simple micropython http server takes 40 RPS. LUCI + uhttpd is dramatically slow (2-4 RPS) even with LuaJIT cause at each request there are a lot and a lot of file access. Current LuCI modules are not compatible with Nginx (there are a lot of global vars read & write). So, as a replacement for IPMI proto calls we would prefer to use RPC calls (REST-like) made separately from LUCI eco system. We leave LUCI for Web configuration staff only.
>
> Also I found a little complicated to add more authentication methods (like AD, LD, Radius, O-Auth and so on). It's a little tricky, but possible. I made O-Auth like http requester to our auth center. For HTTP-RPC module it should be done as duplicate code.
>
> Another problem that I've faced is an access from Nginx to ubus (nginx runs under "nobody"). I'm able to send requests, but get an empty response. Only Nginx running under root lead to receive a proper answers. Socket file has enough permissions. What is the proper way to configure ubus to allow nginx process to make requests to ubus?
>
> PS. The script to install targets from a specific feed do not proceed with "-a" option. The command "scripts/feeds install -a -p openbmc_target" will not install all targets. Only explicit add works: "scipts/feeds -p openbmc_target TARGET_NAME". Why dash isn't allowed in feed's name, but for packages it's fine? E.g. "src-git openbmc-target https://github.com/ya-mouse/openbmc-target.git" doesn't work. Need to specify "src-git openbmc_target ...".
>
> Thank you in advance!
>
> --
> Anton D. Kachalov
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list