Dynamic to static web source?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic to static web source?

detlef.hebbel
Hi List.

Is it a common practice to do the following:

1. Building a fully dynamic Lasso driven web site with Content Management
System
2. Saving the 'result html source' as 'static source' in to a database field
3. Process the saved 'static source' from the database on the front end

4. Updating the steps 1 to 3 only after changes

Would this be a way to do? Are you doing this. Are there any disadvantages?

Any feedback would be appreciated.

Cheers

Detlef



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic to static web source?

Greg Willits
On May 26, 2005, at 5:03 PM, Detlef Hebbel wrote:

> Is it a common practice to do the following:
>
> 1. Building a fully dynamic Lasso driven web site with Content
> Management
> System
> 2. Saving the 'result html source' as 'static source' in to a database
> field
> 3. Process the saved 'static source' from the database on the front end
>
> 4. Updating the steps 1 to 3 only after changes
>
> Would this be a way to do? Are you doing this. Are there any
> disadvantages?
>
> Any feedback would be appreciated.

Yes it is not uncommon to build a system which the net effect is to use
dynamic tools to create what is then served as a static page.

However, I would not store that result to a database. I would store it
to a file which can be served directly by apache with absolutely no
intervention from Lasso or any other such language.

The main reason for creating static pages via CMS is to decrease the
computational load on the server in building that page dynamically. By
placing the code in a database, you're now stuck with still using Lasso
to recall that data and generate a page. Unless something in that page
was highly computationally intense, you haven't saved very much.

Asking Apache to talk to Lasso in the first place is one of the more
expensive tasks in the whole dynamic web page process. So you want to
eliminate that step altogether. Apache can serve an order of magnitude
more pages if it does not have to talk to Lasso.

I have test data that shows serving a file with nothing more that the
word 'hello' in it as an .html file directly by apache vs that same
file simply renamed .lasso _massively_ drops Apache's ability to serve
X pages per second throughput when it is .lasso. The same is true for
any other dynamic language although my tests show Lasso didn't compare
well and that its Apache connector could stand to be faster. If you
server is not very busy, this is irrelevant, but if it is busy and you
need to maximize concurrent user performance, it matters.

So, the only reason (I can think of) to store a static file is that
your server is going to be very busy, and that you need to leverage
Apache's speed in serving static files. To do that, they need to truly
be static files on disk.

-- greg willits


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic to static web source?

detlef.hebbel
In reply to this post by detlef.hebbel
Thanks Greg.

Very interesting reading. yes, I can see the point of dividing the tasks,
not serving from database fields. I did this with Images from FMContainers
already (saving as files for further processing) already and will try to get
the dynamic html saved as static html source to be available for Apache.

This may also optimise large dynamic pop-up value lists for speed.

I guess there is no dynamic-to-static solution for '-search'. Or am I
wrong?, is there a way to speed up -search using 'saved-to-static' source?

Cheers

Detlef


on 27.05.2005 12:46, Greg Willits at [hidden email] wrote:

> On May 26, 2005, at 5:03 PM, Detlef Hebbel wrote:
>
>> Is it a common practice to do the following:
>>
>> 1. Building a fully dynamic Lasso driven web site with Content
>> Management
>> System
>> 2. Saving the 'result html source' as 'static source' in to a database
>> field
>> 3. Process the saved 'static source' from the database on the front end
>>
>> 4. Updating the steps 1 to 3 only after changes
>>
>> Would this be a way to do? Are you doing this. Are there any
>> disadvantages?
>>
>> Any feedback would be appreciated.
>
> Yes it is not uncommon to build a system which the net effect is to use
> dynamic tools to create what is then served as a static page.
>
> However, I would not store that result to a database. I would store it
> to a file which can be served directly by apache with absolutely no
> intervention from Lasso or any other such language.
>
> The main reason for creating static pages via CMS is to decrease the
> computational load on the server in building that page dynamically. By
> placing the code in a database, you're now stuck with still using Lasso
> to recall that data and generate a page. Unless something in that page
> was highly computationally intense, you haven't saved very much.
>
> Asking Apache to talk to Lasso in the first place is one of the more
> expensive tasks in the whole dynamic web page process. So you want to
> eliminate that step altogether. Apache can serve an order of magnitude
> more pages if it does not have to talk to Lasso.
>
> I have test data that shows serving a file with nothing more that the
> word 'hello' in it as an .html file directly by apache vs that same
> file simply renamed .lasso _massively_ drops Apache's ability to serve
> X pages per second throughput when it is .lasso. The same is true for
> any other dynamic language although my tests show Lasso didn't compare
> well and that its Apache connector could stand to be faster. If you
> server is not very busy, this is irrelevant, but if it is busy and you
> need to maximize concurrent user performance, it matters.
>
> So, the only reason (I can think of) to store a static file is that
> your server is going to be very busy, and that you need to leverage
> Apache's speed in serving static files. To do that, they need to truly
> be static files on disk.
>
> -- greg willits
>



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic to static web source?

Greg Willits
In reply to this post by detlef.hebbel
> on 27.05.2005 12:46, Greg Willits at [hidden email] wrote:
>> On May 26, 2005, at 5:03 PM, Detlef Hebbel wrote:
>>
>>> Is it a common practice to do the following:
>>> 1. Building a fully dynamic Lasso driven web site with Content
>>> ManagementSystem
>>> 2. Saving the 'result html source' as 'static source' in to a
>>> database
>>> field
>>> 3. Process the saved 'static source' from the database on the front
>>> end
>>> 4. Updating the steps 1 to 3 only after changes

>> Yes it is not uncommon to build a system which the net effect is to
>> use
>> dynamic tools to create what is then served as a static page.
>>
>> However, I would not store that result to a database. I would store it
>> to a file which can be served directly by apache with absolutely no
>> intervention from Lasso or any other such language.....

On May 26, 2005, at 6:14 PM, Detlef Hebbel wrote:

> Very interesting reading. yes, I can see the point of dividing the
> tasks,
> not serving from database fields. I did this with Images from
> FMContainers
> already (saving as files for further processing) already and will try
> to get
> the dynamic html saved as static html source to be available for
> Apache.
>
> This may also optimise large dynamic pop-up value lists for speed.

But... if the value list is dynamic (that is it changes), then you
can't generate a static version or new values won't be represented.
Unless you mean a large calculated value list -- i.e. one that you're
now acquiring data for on the fly, but which doesn't ever really
change. I have a few value list custom tags which read display and
value options from config files. I simply make a list of the data and
let Lasso write the HTML code needed. These lists don't change, so I
cache the resulting HTML code and serve that on subsequent uses. The
plain HTML list (with no selection) is updated to show current
selections with a quick regex before drawing to the page. Its the best
of both worlds -- on-demand code generation so that list definitions
are centralized and the quick drawing of fixed HTML.


> I guess there is no dynamic-to-static solution for '-search'. Or am I
> wrong?, is there a way to speed up -search using 'saved-to-static'
> source?

No there's no practical way to do that--likely too many search options
to make it worth the effort. SQL databases will cache queries, so if
you get the same query often, there's a good chance the db will return
results from the cache and not actually perform the search again. I
believe Lasso can do that on behalf of FileMaker too (haven't used it).

BTW -- why the fixation on creating static files? Does your server
experience high concurrent loads? If so, you might even consider having
two servers: one to serve the static pages, and one dedicated to the
dynamic ones to further reduce the demand on the dynamic server to give
it more CPU time for Lasso.

-- greg willits




--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic to static web source?

Grubic, James
In reply to this post by detlef.hebbel
There is also a very common way of generating static pages - using the
log tags.

Here's the tried-and-true method I use:

[log: (string_concatenate: 'PageTemp/',(field:'PageTitle'),'.html')]
[include:'pagetemplate.lasso']
[/log]

[File_Control]
[File_Move: (string_concatenate:
'/TeacherLink/PageTemp/',(field:'PageTitle'),'.html'),(string_concatenate:
'/Pages/',(field:'PageTitle'),'.html'), -FileOverwrite]
[/File_Control]

[include:(string_concatenate: '/Pages/',(field:'PageTitle'),'.html')]


This is a results file that simply creates a log. The log is HTML source
with a .html extension. So everytime one of our teachers clicks submit
from our web-page creation database, it generates a static page. This
process simplifies the link, eliminates the dependency on the database
for the casual visitor, and speeds it up quite a bit.

If you have stuff like changing value lists you can always set up an
event which will process a results file on a regular basis, getting you
the static page you want.



James

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic to static web source?

Adam Randall
In reply to this post by detlef.hebbel
Wow, that's some old code. Don't your hands hurt from typing all  
that? ;)

Adam.

--
Adam Randall <[hidden email]>
http://www.omnipilot.com/
(954) 874-3100
AIM/iChat: adamomni

On May 27, 2005, at 10:15 AM, James Grubic wrote:

> There is also a very common way of generating static pages - using  
> the log tags.
>
> Here's the tried-and-true method I use:
>
> [log: (string_concatenate: 'PageTemp/',(field:'PageTitle'),'.html')]
> [include:'pagetemplate.lasso']
> [/log]
>
> [File_Control]
> [File_Move: (string_concatenate: '/TeacherLink/PageTemp/',
> (field:'PageTitle'),'.html'),(string_concatenate: '/Pages/',
> (field:'PageTitle'),'.html'), -FileOverwrite]
> [/File_Control]
>
> [include:(string_concatenate: '/Pages/',(field:'PageTitle'),'.html')]
>
>
> This is a results file that simply creates a log. The log is HTML  
> source with a .html extension. So everytime one of our teachers  
> clicks submit from our web-page creation database, it generates a  
> static page. This process simplifies the link, eliminates the  
> dependency on the database for the casual visitor, and speeds it up  
> quite a bit.
>
> If you have stuff like changing value lists you can always set up  
> an event which will process a results file on a regular basis,  
> getting you the static page you want.
>
>
>
> James
>
> --
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  http://www.listsearch.com/ 
> lassotalk.lasso?manage
>


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic to static web source?

Doug Gentry
In reply to this post by detlef.hebbel
I had a similar solution once, but my problem was how to deal with  
updates to the database information. They'd have to trigger another  
process like that below. To complicate things the database was  
Filemaker, and many times they made their updates directly in the  
database, rather than through Lasso. So I had to build a page where  
they could go to trigger a "rewrite" of the static page.

Switching to a one file or custom error.lasso page helped this a lot.

Greg made good points about reducing computational drag and getting to  
bypass Lasso processing. It seems like there is a balancing act between  
those concerns (particularly for high volume sites) and taking  
advantage of the dynamic character of the database.

...Doug

On May 27, 2005, at 7:15 AM, James Grubic wrote:

> There is also a very common way of generating static pages - using the  
> log tags.
>
> Here's the tried-and-true method I use:
>
> [log: (string_concatenate: 'PageTemp/',(field:'PageTitle'),'.html')]
> [include:'pagetemplate.lasso']
> [/log]
>
> [File_Control]
> [File_Move: (string_concatenate:  
> '/TeacherLink/PageTemp/
> ',(field:'PageTitle'),'.html'),(string_concatenate:  
> '/Pages/',(field:'PageTitle'),'.html'), -FileOverwrite]
> [/File_Control]
>
> [include:(string_concatenate: '/Pages/',(field:'PageTitle'),'.html')]
>
>
> This is a results file that simply creates a log. The log is HTML  
> source with a .html extension. So everytime one of our teachers clicks  
> submit from our web-page creation database, it generates a static  
> page. This process simplifies the link, eliminates the dependency on  
> the database for the casual visitor, and speeds it up quite a bit.
>
> If you have stuff like changing value lists you can always set up an  
> event which will process a results file on a regular basis, getting  
> you the static page you want.
>
>
>
> James
>
> --
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  
> http://www.listsearch.com/lassotalk.lasso?manage
>

---
Doug Gentry
Dynapolis & Southern Oregon University
p:  541-261-8501 / Toll Free: 888-490-0644
[hidden email]


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic to static web source?

Greg Hemphill
In reply to this post by detlef.hebbel
Detlef

I've done something like this with weekly ads for grocery retailers.  
One of these retailers often has 20 page ads, 20 zones (groups of
stores with unique offers), and the pages contain different features if
you are logged in vs not logged in.  So every week we run a Lasso
crunch process that generates about 800 static pages.  The up side to
doing all this is that on busy days our server is less likely to crash
due to heavy lasso/db activity.  The negative is that it was less work
when the whole thing was dynamic (about 20 min to crunch, and another
5-10 to move files around).  Another negative is that if there is a
mistake, say we spelled a sale item wrong, you have to re-create the
static pages.

Another thing to keep in mind is that if you want most of the page to
be pre-processed by Lasso (creating a static page), but you still need
some Lasso dynamic stuff on the page you can use the [NoProcess] tags
around the lasso code you want processed when the "static" page is
served.


Greg Hemphill

On May 26, 2005, at 8:03 PM, Detlef Hebbel wrote:

> Hi List.
>
> Is it a common practice to do the following:
>
> 1. Building a fully dynamic Lasso driven web site with Content
> Management
> System
> 2. Saving the 'result html source' as 'static source' in to a database
> field
> 3. Process the saved 'static source' from the database on the front end
>
> 4. Updating the steps 1 to 3 only after changes
>
> Would this be a way to do? Are you doing this. Are there any
> disadvantages?
>
> Any feedback would be appreciated.
>
> Cheers
>
> Detlef
>
>
>
> --
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>
>
---------------------------------
    Greg Hemphill
    VP of Development
    Webstop.com, Inc.
---------------------------------
    Company: http://www.Webstop.com
    Personal: http://www.MrGHemp.com
    Email: [hidden email]
    AIM: MrGHemp
    Office: 727.942.2797
    Fax: 727.938.2347
    Mobile: 727.692.6886
---------------------------------


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic to static web source?

detlef.hebbel
In reply to this post by detlef.hebbel
Thanks for all the feedback on this, I am going to build some test "static"
pages and may come back with some queries/

Thanks

Detlef


on 03.06.2005 10:32, Greg Hemphill at [hidden email] wrote:

> Detlef
>
> I've done something like this with weekly ads for grocery retailers.
> One of these retailers often has 20 page ads, 20 zones (groups of
> stores with unique offers), and the pages contain different features if
> you are logged in vs not logged in.  So every week we run a Lasso
> crunch process that generates about 800 static pages.  The up side to
> doing all this is that on busy days our server is less likely to crash
> due to heavy lasso/db activity.  The negative is that it was less work
> when the whole thing was dynamic (about 20 min to crunch, and another
> 5-10 to move files around).  Another negative is that if there is a
> mistake, say we spelled a sale item wrong, you have to re-create the
> static pages.
>
> Another thing to keep in mind is that if you want most of the page to
> be pre-processed by Lasso (creating a static page), but you still need
> some Lasso dynamic stuff on the page you can use the [NoProcess] tags
> around the lasso code you want processed when the "static" page is
> served.
>
>
> Greg Hemphill
>
> On May 26, 2005, at 8:03 PM, Detlef Hebbel wrote:
>
>> Hi List.
>>
>> Is it a common practice to do the following:
>>
>> 1. Building a fully dynamic Lasso driven web site with Content
>> Management
>> System
>> 2. Saving the 'result html source' as 'static source' in to a database
>> field
>> 3. Process the saved 'static source' from the database on the front end
>>
>> 4. Updating the steps 1 to 3 only after changes
>>
>> Would this be a way to do? Are you doing this. Are there any
>> disadvantages?
>>
>> Any feedback would be appreciated.
>>
>> Cheers
>>
>> Detlef
>>
>>
>>
>> --
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription:
>> http://www.listsearch.com/lassotalk.lasso?manage
>>
>>
> ---------------------------------
>     Greg Hemphill
>     VP of Development
>     Webstop.com, Inc.
> ---------------------------------
>     Company: http://www.Webstop.com
>     Personal: http://www.MrGHemp.com
>     Email: [hidden email]
>     AIM: MrGHemp
>     Office: 727.942.2797
>     Fax: 727.938.2347
>     Mobile: 727.692.6886
> ---------------------------------
>



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage