[pLog-svn] resserver usage

Jon Daley plogworld at jon.limedaley.com
Tue Oct 3 19:09:51 GMT 2006


 	I would expect it to be pretty widespread.  That said, I think the 
default should be the way it is now, and then people can turn on this 
feature.  We shouldn't add something that would break for some people, I 
think.

On Tue, 3 Oct 2006, Oscar Renalias wrote:

> Is it a good thing to depend on mod_rewrite? Is it even a core module of 
> Apache or does anybody know how widespread it is?
>
> On 3 Oct 2006, at 21:55, Paul Westbrook wrote:
>
>> Hello,
>>   Gallery2 (http://gallery.menalto.com/) does this as well.  It encloses 
>> it's changes to the .htaccess file with:
>> 
>> # BEGIN Url Rewrite section
>> # (Automatically generated.  Do not edit this section)
>> 
>> # END Url Rewrite section
>> 
>> It should be easy for the plugin to read the .htaccess file, overwrite this 
>> section when writing the file out.
>> 
>> --Paul
>> 
>> 
>> 
>> On Oct 3, 2006, at 10:30 AM, Jon Daley wrote:
>>
>>> 	You need to be able to parse the .htaccess file and not add a 
>>> duplicate rule, and remove old rules, etc.  Seems a little tricky.  I 
>>> guess as long as no one ever edits the file themselves, it would be okay.
>>> 
>>> On Tue, 3 Oct 2006, Paul Westbrook wrote:
>>> 
>>>> Hello,
>>>> I was thinking that we could do an easy solution with a plugin.  (This is 
>>>> a little bit of a hack but it should work, and the core LifeType doesn't 
>>>> have to change.)
>>>> 
>>>> The plugin would register for the EVENT_POST_RESOURCE_ADD, 
>>>> EVENT_POST_RESOURCE_UPDATE, and EVENT_POST_RESOURCE_DELETE events.  When 
>>>> the plugin gets one of these events, it would iterate through the 
>>>> resources and create mod_rewrite rules in the .htaccess for each of the 
>>>> resources in the specified blog.  These rules would convert the urls that 
>>>> are generated by the current RequestGenerator into the url to the file 
>>>> itself.
>>>> 
>>>> apache would need to have access to modify the .htaccess file in the 
>>>> LifeType root directory.  Alternatively, when using Custom URLs, you can 
>>>> specify a "resource" directory, and have the plugin put the .htaccess 
>>>> file there.
>>>> 
>>>> This plugin would also have to run after changing the url format.
>>>> 
>>>> 
>>>> --Paul
>>>> 
>>>> 
>>>> On Oct 3, 2006, at 6:14 AM, Oscar Renalias wrote:
>>>> 
>>>>> Just to see how much overhead resserver.php has, I wrote a very short
>>>>> script that will load the same URL 100 times using curl. I ran it once
>>>>> using a resserver.php URL and a second time loading the same file
>>>>> using the web server (straight from the "gallery" folder)
>>>>> I run this in my work laptop and the results are a bit... well, 
>>>>> disappointing:
>>>>> $ time ./repeat.sh
>>>>> ...
>>>>> real    0m13.339s
>>>>> user    0m5.911s
>>>>> sys     0m3.830s
>>>>> $ time ./repeat.sh
>>>>> ...
>>>>> real    0m34.178s
>>>>> user    0m6.011s
>>>>> sys     0m3.530s
>>>>> You can guess which one is which. I've attached the script, you will
>>>>> have to edit it to find two suitable URLs and alter the value of the
>>>>> $URL variable depending on what you want to test but I am expecting
>>>>> comparable results.
>>>>> I am busy with something else right now but if somebody wanted to take
>>>>> a closer look at this issue we can create a branch in svn to play
>>>>> around...
>>>>> On 9/28/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
>>>>>> On Thu, 28 Sep 2006, Oscar Renalias wrote:
>>>>>>> When I said hidden resources, I meant hidden albums. There is a 
>>>>>>> checkbox when
>>>>>>> creating an album that makes it not appear in the list of albums in 
>>>>>>> the
>>>>>>> public side of the blog. I don't see how this could be possible, 
>>>>>>> although I
>>>>>>> am not sure how many people are really using this feature.
>>>>>>       But, I still don't get it - they can still be hidden - URLs 
>>>>>> aren't
>>>>>> ever revealed.
>>>>>>> Regarding URLs and subdomains, I know things like
>>>>>>> http://subdomain.server.com/gallery/1/general/test.jpg will work but
>>>>>>> considering we're using subdomains, would it be possible to have 
>>>>>>> something
>>>>>>> like http://subdomain.server.com/gallery/general/test.jpg? (without 
>>>>>>> the blog
>>>>>>> id)
>>>>>>       Ah, yes.  That wouldn't work.
>>>>>> _______________________________________________
>>>>>> pLog-svn mailing list
>>>>>> pLog-svn at devel.lifetype.net
>>>>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>>>>>> <repeat.sh>
>>>>> _______________________________________________
>>>>> pLog-svn mailing list
>>>>> pLog-svn at devel.lifetype.net
>>>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>>>> 
>>>> --
>>>> Paul Westbrook
>>>> paul at westbrooks.org
>>>> <http://www.westbrooks.org>
>>>> 
>>>> 
>>>> _______________________________________________
>>>> pLog-svn mailing list
>>>> pLog-svn at devel.lifetype.net
>>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>>> 
>>> -- 
>>> Jon Daley
>>> http://jon.limedaley.com/
>>> 
>>> Whining is anger through a small opening.
>>> -- Stuart Smalley
>>> _______________________________________________
>>> pLog-svn mailing list
>>> pLog-svn at devel.lifetype.net
>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>>> 
>> 
>> --
>> Paul Westbrook
>> paul at westbrooks.org
>> <http://www.westbrooks.org>
>> 
>> 
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>> 
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn

-- 
Jon Daley
http://jon.limedaley.com/

You're just jealous because the voices are talking to me.


More information about the pLog-svn mailing list