You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by zwoop <gi...@git.apache.org> on 2014/01/14 20:17:00 UTC

trafficserver pull request: First whack a lua in core.

GitHub user zwoop opened a pull request:

    https://github.com/apache/trafficserver/pull/32

    First whack a lua in core.

    Wraps records, ssl_multicert and remap UrlRewrite.cc stuff.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/postwait/trafficserver lua_in_core

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/32.patch

----
commit c2ca0dca541bf98608a1ec998a7c258bffaabb29
Author: Theo Schlossnagle <je...@omniti.com>
Date:   2013-10-18T23:58:02Z

    First whack a lua in core.
    
    Wraps records, ssl_multicert and remap UrlRewrite.cc stuff.

----


Re: trafficserver pull request: First whack a lua in core.

Posted by Leif Hedstrom <zw...@apache.org>.
On Jan 15, 2014, at 10:21 AM, Yongming Zhao <mi...@gmail.com> wrote:

> looks great, that rise me an very important issue, we have a heavy modified remap system, that is a blocking for me to keep in sync with apache tree, can I expect we can make the remap module a easy to extent system which we can put  origin remap.config, the new lua config, our ugly remap config, or even someone may write squid style & varnish style config?
> 
> please consider my concerns, and help me out. thanks


Yeah, you could for example write a Lua script that reads your format :). I’d imagine once things are done, we’ll have Lua scripts that reads all the old configurations as well, as a migration path. Note that we’re still in very early state of this, so everyone work on the specifications, reviews and code :), but as a proof of concept, I believe Theo already wrote a simple parser that read LI’s YAML format! This is the power of a scripting format, and why we picked Lua, it makes it really easy to do these things. We just have to make the bindings easy to use and flexible.

Another thing that was discussed was to replace the guts of all configs inside the core, and use TSConfig as an intermediary layer. I don’t know if Alan has pondered over this any more, or if it’s still reasonable. One concern of course is that various configurations (e.g. remap.config vs records.config) have vastly different requirements on the underlying data structures. This is orthogonal from the Lua fronted (IMO), and I see it mostly as a way to simplify and cleanup our config guts (but alas, it’s possible we could expose TSConfig format to the users as well).

Cheers,

— Leif


Re: trafficserver pull request: First whack a lua in core.

Posted by Yongming Zhao <mi...@gmail.com>.
looks great, that rise me an very important issue, we have a heavy modified remap system, that is a blocking for me to keep in sync with apache tree, can I expect we can make the remap module a easy to extent system which we can put  origin remap.config, the new lua config, our ugly remap config, or even someone may write squid style & varnish style config?

please consider my concerns, and help me out. thanks



在 2014年1月15日,下午12:20,Leif Hedstrom <zw...@apache.org> 写道:

> On Jan 14, 2014, at 12:18 PM, Leif Hedstrom <zw...@apache.org> wrote:
> 
>> 
>> On Jan 14, 2014, at 12:17 PM, zwoop <gi...@git.apache.org> wrote:
>> 
>>> GitHub user zwoop opened a pull request:
>>> 
>>>  https://github.com/apache/trafficserver/pull/32
>>> 
>>>  First whack a lua in core.
>>> 
>>>  Wraps records, ssl_multicert and remap UrlRewrite.cc stuff.
>>> 
>>> You can merge this pull request into a Git repository by running:
>>> 
>>>  $ git pull https://github.com/postwait/trafficserver lua_in_core
>>> 
>>> Alternatively you can review and apply these changes as the patch at:
>>> 
>>>  https://github.com/apache/trafficserver/pull/32.patch
>> 
>> 
>> This is mine, I’m going to try to merge Theo’s work into a branch on our ASF repo. 
> 
> 
> 
> We have landed most of this Github branch onto a new branch on our main repo, named “lua_config”. The UrlRewrite.cc code (which is needed for remap.config replacement in Lua) needs some work, since that code has been majorly refactored since last summit. :).
> 
> But this is a start, we can now work on configurations in Lua. I’ve also created a “stub” wiki page, where we can formulate and discuss both design and implementation details:
> 
> 	https://cwiki.apache.org/confluence/display/TS/Lua+Configurations
> 
> 
> Many thanks to Theo for getting this started!
> 
> — leif

Yongming Zhao
赵永明
aka 永豪 yonghao@taobao.com


Re: trafficserver pull request: First whack a lua in core.

Posted by Leif Hedstrom <zw...@apache.org>.
On Jan 14, 2014, at 12:18 PM, Leif Hedstrom <zw...@apache.org> wrote:

> 
> On Jan 14, 2014, at 12:17 PM, zwoop <gi...@git.apache.org> wrote:
> 
>> GitHub user zwoop opened a pull request:
>> 
>>   https://github.com/apache/trafficserver/pull/32
>> 
>>   First whack a lua in core.
>> 
>>   Wraps records, ssl_multicert and remap UrlRewrite.cc stuff.
>> 
>> You can merge this pull request into a Git repository by running:
>> 
>>   $ git pull https://github.com/postwait/trafficserver lua_in_core
>> 
>> Alternatively you can review and apply these changes as the patch at:
>> 
>>   https://github.com/apache/trafficserver/pull/32.patch
> 
> 
> This is mine, I’m going to try to merge Theo’s work into a branch on our ASF repo. 



We have landed most of this Github branch onto a new branch on our main repo, named “lua_config”. The UrlRewrite.cc code (which is needed for remap.config replacement in Lua) needs some work, since that code has been majorly refactored since last summit. :).

But this is a start, we can now work on configurations in Lua. I’ve also created a “stub” wiki page, where we can formulate and discuss both design and implementation details:

	https://cwiki.apache.org/confluence/display/TS/Lua+Configurations


Many thanks to Theo for getting this started!

— leif


Re: trafficserver pull request: First whack a lua in core.

Posted by Leif Hedstrom <zw...@apache.org>.
On Jan 14, 2014, at 12:17 PM, zwoop <gi...@git.apache.org> wrote:

> GitHub user zwoop opened a pull request:
> 
>    https://github.com/apache/trafficserver/pull/32
> 
>    First whack a lua in core.
> 
>    Wraps records, ssl_multicert and remap UrlRewrite.cc stuff.
> 
> You can merge this pull request into a Git repository by running:
> 
>    $ git pull https://github.com/postwait/trafficserver lua_in_core
> 
> Alternatively you can review and apply these changes as the patch at:
> 
>    https://github.com/apache/trafficserver/pull/32.patch


This is mine, I’m going to try to merge Theo’s work into a branch on our ASF repo. 

— leif