Thanks,
But Im not want to share the data between worker. :)~ I just want to init my module in the beginning of the worker. Because I need pid. so I will wait for the init_worker_by_lua* or for now I can just use under content_by_lua*. Sure I will try to implement my own init_worker if I can understand the entire flow bc still too new here. Just start to play around less then one week.
Thanks your for adding this page to clarify. I may still consider how to improve your work flow along the way when I more depth understand them. sure for now I will try to follow your guys foot step. and try to see can I contribute something in this community.
BTW, I have another problem, please see this post http://forum.nginx.org/read.php?2,241478,241478#msg-241478
Before, I thought it's nginx problem. But after compare with the default nginx setup I cannot reproduce the same issue. seems this is OpenResty's nginx problem. any idea?
On Saturday, August 3, 2013 12:50:28 PM UTC+8, agentzh wrote:
Hello!
On Fri, Aug 2, 2013 at 8:27 PM, Payne Chu wrote:
> if I init in the content_by_lua* I found out the table's memory address will
> different by each request. I know there have a cache to work on it. but is
> it still have some overhead? my plan is since init_by_lua or
> init_worker_by_lua will only load once and have a feature COW. I like to do
> as mush as possible in that stage. so make the runtime faster to run.
>
You can use your own Lua modules to save per-worker persistent state.
See the documentation here:
http://wiki.nginx.org/HttpLuaModule#Data_Sharing_within_an_Nginx_Worker
This is a common practice.
> BTW, I would like to contribute some code here. but I don't find any
> information in openresty.org about contribution. maybe I missed can let me
> know?
Oh, I'm sorry about that. I've just created a "Getting Involved" page
on the openresty.org site:
http://openresty.org/#GettingInvolved
If I'm still missing anything there, please let me know :)
> Since I cannot find contribution information. I try to explore it
> myself. I checkout ngx_openresty from github. seems this is kind of package
> manager, download through wget and pack to a bundle gzip.
This is correct.
> But what I want is
> a single checkout place after clone already can start to work on. better
> with git's submodule to manage the dependencies with other projects. So for
> the contributor they can easily just do `git clone $url --recursive` for
> checkout, `make` for build, `make test` for test `make run` for run. and
> since is under git's submodule. any change on the submodule can easily push
> to that submodule's repos. Is it have something like that already? If no I
> would like to help on this. or any other suggestion?
>
Because ngx_openresty is just a bundle, each component in the bundle
is developed separately and not every component is using git. You're
very welcome to contribute to each component separately.
Best regards,
-agentzh
On Saturday, August 3, 2013 12:50:28 PM UTC+8, agentzh wrote:
Hello!
On Fri, Aug 2, 2013 at 8:27 PM, Payne Chu wrote:
> if I init in the content_by_lua* I found out the table's memory address will
> different by each request. I know there have a cache to work on it. but is
> it still have some overhead? my plan is since init_by_lua or
> init_worker_by_lua will only load once and have a feature COW. I like to do
> as mush as possible in that stage. so make the runtime faster to run.
>
You can use your own Lua modules to save per-worker persistent state.
See the documentation here:
http://wiki.nginx.org/HttpLuaModule#Data_Sharing_within_an_Nginx_Worker
This is a common practice.
> BTW, I would like to contribute some code here. but I don't find any
> information in openresty.org about contribution. maybe I missed can let me
> know?
Oh, I'm sorry about that. I've just created a "Getting Involved" page
on the openresty.org site:
http://openresty.org/#GettingInvolved
If I'm still missing anything there, please let me know :)
> Since I cannot find contribution information. I try to explore it
> myself. I checkout ngx_openresty from github. seems this is kind of package
> manager, download through wget and pack to a bundle gzip.
This is correct.
> But what I want is
> a single checkout place after clone already can start to work on. better
> with git's submodule to manage the dependencies with other projects. So for
> the contributor they can easily just do `git clone $url --recursive` for
> checkout, `make` for build, `make test` for test `make run` for run. and
> since is under git's submodule. any change on the submodule can easily push
> to that submodule's repos. Is it have something like that already? If no I
> would like to help on this. or any other suggestion?
>
Because ngx_openresty is just a bundle, each component in the bundle
is developed separately and not every component is using git. You're
very welcome to contribute to each component separately.
Best regards,
-agentzh
On Saturday, August 3, 2013 12:50:28 PM UTC+8, agentzh wrote:
Hello!
On Fri, Aug 2, 2013 at 8:27 PM, Payne Chu wrote:
> if I init in the content_by_lua* I found out the table's memory address will
> different by each request. I know there have a cache to work on it. but is
> it still have some overhead? my plan is since init_by_lua or
> init_worker_by_lua will only load once and have a feature COW. I like to do
> as mush as possible in that stage. so make the runtime faster to run.
>
You can use your own Lua modules to save per-worker persistent state.
See the documentation here:
http://wiki.nginx.org/HttpLuaModule#Data_Sharing_within_an_Nginx_Worker
This is a common practice.
> BTW, I would like to contribute some code here. but I don't find any
> information in openresty.org about contribution. maybe I missed can let me
> know?
Oh, I'm sorry about that. I've just created a "Getting Involved" page
on the openresty.org site:
http://openresty.org/#GettingInvolved
If I'm still missing anything there, please let me know :)
> Since I cannot find contribution information. I try to explore it
> myself. I checkout ngx_openresty from github. seems this is kind of package
> manager, download through wget and pack to a bundle gzip.
This is correct.
> But what I want is
> a single checkout place after clone already can start to work on. better
> with git's submodule to manage the dependencies with other projects. So for
> the contributor they can easily just do `git clone $url --recursive` for
> checkout, `make` for build, `make test` for test `make run` for run. and
> since is under git's submodule. any change on the submodule can easily push
> to that submodule's repos. Is it have something like that already? If no I
> would like to help on this. or any other suggestion?
>
Because ngx_openresty is just a bundle, each component in the bundle
is developed separately and not every component is using git. You're
very welcome to contribute to each component separately.
Best regards,
-agentzh