WYSIWYG Template Editor

2002-01-01 Thread Joachim Zobel


Happy New Year.

Does anybody know a template engine, whose templates can be edited with a 
WYSIWYG editor (favourably dreamweaver) as they will look when filled 
with example data?

Thanx,
Joachim
--
... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden
koennen.- Bertolt Brecht - Leben des Galilei




Re: WYSIWYG Template Editor

2002-01-01 Thread Matt Sergeant

On Tue, 1 Jan 2002, Joachim Zobel wrote:


 Happy New Year.

 Does anybody know a template engine, whose templates can be edited with a
 WYSIWYG editor (favourably dreamweaver) as they will look when filled
 with example data?

If you use XSLT, there's a number of options available to you. Try
searching a site like http://www.cafeconlech.org/

-- 
!-- Matt --
:-Get a smart net/:-




Re: WYSIWYG Template Editor

2002-01-01 Thread C.Hauser - IT assistance GmbH

Basel, Dienstag, 1. Januar 2002, 13:32:54
.

*see original email below*


Hallo Joachim


I use Dreamweaver with HTML::Mason. But none of the Perl based
solutions can be seen with data (as far I tested). You only see icons.
Right now UltraDev only works withs MS ASP and JSP.

I'm happy to hear about other suggestions :-)


Best Regards Christian  -  [EMAIL PROTECTED]  -

.


== beginn original ==
Date: Dienstag, 1. Januar 2002, 13:13:42
Subject: WYSIWYG Template Editor


Happy New Year.

Does anybody know a template engine, whose templates can be edited with a 
WYSIWYG editor (favourably dreamweaver) as they will look when filled 
with example data?

Thanx,
Joachim
--
... ein Geschlecht erfinderischer Zwerge, die fuer alles gemietet werden
koennen.- Bertolt Brecht - Leben des Galilei

=== end original 




Help ! TCP stream kept open by mod_perl : possible ?

2002-01-01 Thread Denis Bucher


Hello !

I have a project with Apache mod_perl and I don't know it
it is able to do it. I am of course beginner and any help is
welcomed :-))

I want to do a simple webmail, where the program on the server side
KEEP a TCP stream permamently open to the mail server (POP3) for
each user/customer while he's using the webmail. (Closed after
timeout or at logoff)

Is this possible ? Thanks for any suggestion !

And happy new year 2002 to everyone !

Denis Bucher

P.S. More details and examples :

My webmail could be used like that :

At login :
- open TCP stream to pop3.horus.ch
- USER/PASS
- reading emails info (that would be put into an array)
- nothing more

http://.../webmail.pl?showmails;start=1;end=20
- display all mails between 1 and 20 based on array

http://.../webmail.pl?deletemail;uidl=hkjdfhskjh43879
- send DELE 34 on the TCP stream

This is easily possible with Java Servlets. If it isn't with
perl, it means that mod_perl isn't as powerful.


--

Denis Bucher,   /  [EMAIL PROTECTED]   Tél. +41-32-7254111   \  Internet
Horus Networks /  www.horus.infoFax: +41-32-7254112   \  Services
   /  USA: (206) 888-2335   US Fax: (508) 437-1261  \  Provider




Re: Help ! TCP stream kept open by mod_perl : possible ?

2002-01-01 Thread Ged Haywood

Hi there,

On Tue, 1 Jan 2002, Denis Bucher wrote:

 I have a project with Apache mod_perl and I don't know it
 it is able to do it.

It is able.

 and any help is welcomed :-))

http://perl.apache.org/guide

 I want to do a simple webmail,

Have you checked out the various packages on CPAN?

73,
Ged.




Re: mod_perl site challenge: proposal to use ASF site design (fwd)

2002-01-01 Thread Ask Bjoern Hansen

-- Forwarded message --
Date: Mon, 17 Dec 2001 14:30:24 -0800 (PST)
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: mod_perl site challenge: proposal to use ASF site design

David wrote:

 (a) See if others also think that the three alternatives for a mod_perl site
 are not very desirable. If you agree, please speak up and say that you
 agree.

I don't have a strong opinion.

 (b) See if others also think that using the ASF generic site design (even
 though it's not cool and distinctive) would be a good idea. If you agree,
 please speak up and say that you agree.

I agree that using the ASF generic site is a good idea.  And why not?
mod_perl is so closely integrated with Apache, why shouldn't mod_perl's
website at least adapt the Apache website look and feel?

 Also, lets keep in mind something that Stas pointed out to me: most anything
 is a step up from our existing site design. So, if we go with one of the
 three existing options it's still a step up.

That's for sure!  :)

-- keith
[EMAIL PROTECTED]
public key:  http://wombat.san-francisco.ca.us/kkeller/public_key
alt.os.linux.slackware FAQ:  http://wombat.san-francisco.ca.us/perl/fom





Re: mod_perl site challenge: proposal to use ASF site design (fwd)

2002-01-01 Thread Ask Bjoern Hansen

-- Forwarded message --
Date: Mon, 17 Dec 2001 17:12:56 -0600
From: Carlos Ramirez [EMAIL PROTECTED]
To: David Harris [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: mod_perl site challenge: proposal to use ASF site design

 From: David Harris [EMAIL PROTECTED]

 Carlos Ramirez's design is broken: broken navigation and pages that don't
 even exist. The page look is somewhat nice, but I can't really evaluate the
 navigation because it's so broken.

My purpose was to submit a proposed 'layout' and
'navigation' and not a fully function website (due to
time constraints). I think you can get the picture of
how the site will navigate without having all the content.
I mentioned this to Stas when I submitted it.

But, let's not forget that people where given a chance to
submit their designs and ideas and also to vote. I did not
have too much time to complete entry (hence the broken
links and missing content), but because I wanted some
change, I submitted a design and voted. I was very
surprised to see only three entries and even more when
Stas announced the low  turn-out. But, this does not
justify the elimination of the 'election', altogether.
We should go with the winning design and go from there.

We can always tweak the winning design abit aftwards (??).

My only suggestion is that the navigation of the site be
somewhere on the top instead of 'squishing' the menu and
the content together. You have more real estate for
content when the navigation is on top. Which is the
main purpose for sites like these. $0.02

-Carlos





PushHandler and Cookies

2002-01-01 Thread Jon Robison

I'm having some troubles with a system I am writing.  The system uses
the Ticket system from the Eagle book, with some minor modifications.

I have also created a logout module, which SHOULD delete the person's
cookie and redirect them to the main page (where they should be
re-directed by the Ticket system to a login screen as the cookie is
gone).

Currently, it isn't working.  I had it working (click Log Out and
you got sent to the login screen), but I noticed that the cookie wasn't
deleted, and that I could type the correct URL (non Ticket redir url)
into the browser and I was back in! This is obviously not a good thing!

I placed a bunch of print STDERR statements in it and what I see now
in the log (after editing to try and make it correctly delete the
cookie) is the logout module processes correctly, the action does get
re-set to view. . . and then it re-runs the logout module!  Maybe I'm
not using the correct Apache return name (DONE, OK, DECLINED, etc.)? or
maybe I'm just totally screwing up the cookie re-make.

Can anyone take a moment and review this code to see what this beginner
has fouled up?

Modified TicketAccess.pm:

###
package FES::Apache::TicketAccess;
use strict;
use Apache::Constants qw(:common);
use FES::Apache::TicketTool ();

sub handler {
  my $r = shift;
  my %input = $r-args; # for 
checking input items
  my $ticketTool = FES::Apache::TicketTool-new($r);
  my($result, $msg) = $ticketTool-verify_ticket($r);
  unless ($result) {
$r-log_reason($msg, $r-filename);
my $cookie = $ticketTool-make_return_address($r);
$r-err_headers_out-add('Set-Cookie' = $cookie);
return FORBIDDEN;
  }
  ## Here is where I added a push_handler insert.

  my $action = defined $input{'act'} ? $input{'act'} : 'view';

  if ($action eq 'logout')  {
$r-push_handlers('PerlHandler' = 'FES::Control::Logout');
return OK;
  } elsif ($action eq 'view') {
$r-push_handlers('PerlHandler' = 'FES::Control::View');
return OK;
  } else {
$r-push_handlers('PerlHandler' = 'FES::Control::View');
return OK;
  }
}

1;
##

And the Logout module hit by clicking a link built as 
a href=/fes?act=logoutLog Out/a


package FES::Control::Logout;
use strict;
use Apache;
use Apache::Constants qw(:common);
use CGI::Cookie;

sub handler {
  my $r = shift;
  my $q = new CGI;
  my $ticket = _get_ticket('r' = $r);
## These next two lines are to re-make the two cookies set
## by the Ticket system from the Eagle book to expiration dates
## from before today, thus deleting them (I wish!)
  my $cookie1 = new
CGI::Cookie(-name='Ticket',-value=undef, 
-expires='-100m');
  my $cookie2 = new
CGI::Cookie(-name='request_uri',-value=undef,
-expires='-100m');
  $r-header_out('Set-Cookie',[$cookie1,$cookie2]);
  $r-internal_redirect(/fes);
  return OK;
}

sub _get_ticket {
  my $args = {
'r' = undef,
@_
};
  my $r = $args-{'r'};
  my %cookies = fetch CGI::Cookie;
  my %ticket = $cookies{'Ticket'}-value;
  return \%ticket;
}

1;
##3

I have tried switching from CGI::Cookie to Apache::Cookie (and modifying
the commands to suit) - no luck.  Same thing.

Can anyone see something obvious that I am doing wrong?  I realized that
this is probably a newbie question, but I could use the help.  I have
re-written the Logout.pm a dozen times, to no avail.

--Jon Robison



Re: Anyone know of specific problems with the malloc in Sun's libc?

2002-01-01 Thread Tim Bunce

On Sun, Dec 30, 2001 at 02:12:47PM -0600, Steven Lembark wrote:
 
 W/ current apache and mod_perl, perl-5.6.1, Solaris-2.8.
 Been having problems with DBI dropping connections. One
 suggestion was to override the default of no and use
 the malloc that comes with perl-5.6.1.
 
 Anyone know of problems or any obvious symptoms?

Umm, problems with DBI dropping connections isn't much to go on :)
I'd expect more spectacular problems if malloc mismatch was the cause.

I think it is generally recommended to use the system malloc on
Solaris.  If you want to try the perl one then try it with and
without the 'hide my malloc' option.

Tim.



Suggestions on an XML-RPC Service using modperl?

2002-01-01 Thread Bruce W. Hoylman


Ciao!

I would like some input on an intranet web service I am currently in the
process of designing, the core of which will be modperl on UN*X.

The service itself is to access a couple of back end data stores given
parameters received in an XML-RPC request, then return the results in an
XML-RPC formated response.  The data from the back end sources will be
loaded into memory at service initialization, for fast access.  The data
is small enough and memory plentiful enough to allow this.

That's pretty much it in terms of the high level data flow.  It has to
be relatively fast, OTO 5+ requests/sec. as a relative volumetric.

I'm going to use modperl due to the embedded perl interpreter
characteristics it provides, allowing initialization overhead to be
incurred at startup.  I also wish to use an in-memory, read-only hash
structure shared across all modperl processes for access to the cached
back end data, rather than making expensive calls to these stores for
each request.  Again, throughput is critical.

I would like your thoughts on the cache management concept of the
service.  I'm looking at MLDBM::Sync as the mechanism for managing the
filesystem representation of the in-memory hash content.  What to manage
the in-memory structure itself in terms of accessing its content?  Is a
Tie structure too expensive?  I want to end up with a single structure
accessible to all of the modperl processes, loaded at service startup.

This service will ultimately be registered within a UDDI/SOAP framework,
FYI.  However this will not be in the first incarnation of the service
itself.

Thoughts and comments welcome.  Obviously this is an early brainstorm
(more like a drizzle) but I hope to get a few stimulating comments from
this most excellent resource, the list.

Peace.



Re: Fast template system. Ideas,theorys and tools

2002-01-01 Thread Jason Czerak

On Sun, 2001-12-30 at 19:47, Ryan Thompson wrote:
 Mark Maunder wrote to Ryan Thompson:
 
  Ryan Thompson wrote:
 
   There must be a faster way. I have thought about pre-compiling each
   HTML file into a Perl module, but there would have to be an automated
   (and secure) way to suck these in if the original file changes.
  
   Either that, or maybe someone has written a better parser. My code
   looks something like this, to give you an idea of what I need:
 
  Sure there are tons of good template systems out there. I think
  someone made a comment about writing a template system being a
  right of passage as a perl developer. But it's also more fun to do
  it yourself.
 
 :-)
 
 
  I guess you've tried compiling your regex with the o modifier?
 
 Yep, problem is there are several of them. I've done some work
 recently to simplify things, which might have a positive effect.
 
 
  Also, have you tried caching your HTML in global package variables
  instead of shared memory?  I think it may be a bit faster than
  shared memory segments like Apache::Cache uses. (The first request
  for each child will be slower, but after they've each served once,
  they'll all be fast). Does your engine stat (access) the html file
  on disk for each request? You mentioned you're caching, but
  perhaps you're checking for changes to the file. Try to stat as
 
 My caching algorithm uses 2 levels:
 
 When an HTML file is requested, the instance of my template class
 checks in its memory cache. If it finds it there, great... everything
 is done within that server process.
 
 If it's not in the memory cache, it checks in a central MySQL cache
 database on the local machine. These requests are on the order of a
 few ms, thanks to an optimized query and Apache::DBI. NOT a big deal.
 
 If it's not in either cache, it takes it's lumps and goes to disk.
 
 In each cache, I use a TTL. (time() + $TTL), which is configurable,
 and usually set to something like 5 minutes in production, or 60
 seconds during development/bug fixes. (And, for this kind of data, 5
 minutes is pretty granular, as templates don't change very often.. but
 setting it any higher would, on average, have only a negligible
 improvement in performance at the risk of annoying developers :-).
 
 And, with debugging in my template module turned on, it has been
 observed that cache misses are VERY infrequent ( 0.1% of all
 requests).
 
 In fact, if I use this cache system and disable all parsing (i.e.,
 just use it to include straight HTML into mod_perl apps), I can serve
 150-200 requests/second on the same system.
 
 With my parsing regexps enabled, it drops to 50-60 requests/second.
 
First. I would love to know what kinda machine your using here. :)

Second. Im creating a template based shopping cart. Yeah. there are a
ton of carts out there. But they all either under powered/featured/coded
or over powered/features/coded. Plus most of the free ones don't support
multiple domains. And I'm not in the mood duplicated a good single
domain cart 'x' times per client.

Key features were easy intergration into web sites, also,'pure
intergration' for a custom look and feel. 

I looked at just about every template system on CPAN and came across
text::template. Anyone use this one? I don't require if/then's within
the template. Infact all I really need are call backs to an API that I
am currently developing. And in the case that I do need if/then's. I can
use pure perl within the template. Even do SQL queries with-in the
template, or not even use the API at all if I wanted to.

There are how ever a few quirks that I need to work out with
text::template. I plan on posting a thread about it later today once I
make sure it's not my coding.

Anyways, getting closer to my point here. How my  cart works is that you
have something like this.

html
body
table trtd
{ #display catagory view here
%vars = ( #this modifies the global defaults for html output. 
'border' = '1',
'cellpadding' = '2'
);
JC::API::cat_view(/%vars);
''
}
/td
/tr
/body/html

That's basicly it. You make call backs to various parts of the API to
create the look and feel of the site based on what is in the database.

I implamented some google style timing in the API. It's basicly gets a
Time::HiRes timestamp in the beginning and does the math at the very end
and posts it in an html comment.  On my dev machine, a dual PIII-750
with a gig of ram and mod_perl running with full caching enabled and
fully persistant code base for the cart. My average transaction time is
about .08 of a second. That leads me to think that my machine can handle
10 html page generations a second (this isn't an exact science, but
close).

Now, As with the bug I think I am having with text::template. I'm using
STDOUT when I compile the template and execute all call backs and sql
queries and the such fixes things for now. (the buffering bit it can use
to compile the output into a 

Re: WYSIWYG Template Editor

2002-01-01 Thread Les Mikesell

From: Matt Sergeant [EMAIL PROTECTED]

  Does anybody know a template engine, whose templates can be edited with a
  WYSIWYG editor (favourably dreamweaver) as they will look when filled
  with example data?

 If you use XSLT, there's a number of options available to you. Try
 searching a site like http://www.cafeconlech.org/

I can't reach that site - is the spelling correct?   I'd like to find something
that
would allow non-technical people to write their own templates for pages
that, as they are accessed, fill in variables pulled by a server-side http
request
to an XML data source.   To make things even more difficult, I'd like parts
of the resulting page to appear in editable form fields that could be modified
before submitting to yet another location.   We have data servers with
commodity
exchange data, and reporters that need to generate stories showing those
values,
sometimes including comments.   Some of the layouts never change, but it
would really be best if the reporters could generate and control their own
templates without having to understand all of the details involved.

Les Mikesell
[EMAIL PROTECTED]




Re: WYSIWYG Template Editor

2002-01-01 Thread Robin Berjon

On Tuesday 01 January 2002 21:08, Les Mikesell wrote:
 From: Matt Sergeant [EMAIL PROTECTED]

   Does anybody know a template engine, whose templates can be edited with
   a WYSIWYG editor (favourably dreamweaver) as they will look when
   filled with example data?
 
  If you use XSLT, there's a number of options available to you. Try
  searching a site like http://www.cafeconlech.org/

 I can't reach that site - is the spelling correct?

No, it's http://www.cafeconleche.org/

  I'd like to find something that
 would allow non-technical people to write their own templates for pages
 that, as they are accessed, fill in variables pulled by a server-side http
 request to an XML data source.

This may not at all fit your needs but Illustrator 10 has data binding 
options and exports to SVG (which can then be viewed on the web). I haven't 
yet looked into it enough to know whether what it offers is sufficient or 
not. Given that Adobe is heading very heavily in the direction of end-user 
XML these days, you should probably look into GoLive 6 when it comes out 
(probably in less than a week).

Another option might be XML Spy. XML+XSLT editors are probably to replace 
HTML editors as time goes by and people increasingly realise just how much 
easier it is with real templates (as opposed to the stuff you get in current 
editors). Given that your data is XML and you need them to control the 
output's structure a bit to add form fields (which can't be done _yet_ with 
CSS), something that generates XSLT is probably the solution as any other 
XML-transforming option will likely require code (tough you might be able to 
do it in XPathScript).

 To make things even more difficult, I'd like parts
 of the resulting page to appear in editable form fields that could be
 modified before submitting to yet another location.   We have data servers
 with commodity
 exchange data, and reporters that need to generate stories showing those
 values,
 sometimes including comments.   Some of the layouts never change, but it
 would really be best if the reporters could generate and control their own
 templates without having to understand all of the details involved.

A lot of this depends on just how much layout power you need to give them, 
and on the degree of complexity and context-dependency of your source XML. If 
it's only simple stuff and the XML is rather context-free (ie element foo 
means the same thing and has pretty much the same layout irrespective of its 
relationship to the rest of the tree) then you could have some simple 
interface onto a backend that would generate user-specific stylesheets. Of 
course, I'm missing a lot of data and requirements about your project so this 
is all educated hand waving at best :-)

Happy new year all !

-- 
___
Robin Berjon [EMAIL PROTECTED] -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
---
Sex is not the answer.  Sex is the question.  Yes is the answer.




Re: WYSIWYG Template Editor

2002-01-01 Thread Matt Sergeant

On Tue, 1 Jan 2002, Les Mikesell wrote:

 From: Matt Sergeant [EMAIL PROTECTED]

   Does anybody know a template engine, whose templates can be edited with a
   WYSIWYG editor (favourably dreamweaver) as they will look when filled
   with example data?
 
  If you use XSLT, there's a number of options available to you. Try
  searching a site like http://www.cafeconlech.org/

 I can't reach that site - is the spelling correct?   I'd like to find something
 that
 would allow non-technical people to write their own templates for pages
 that, as they are accessed, fill in variables pulled by a server-side http
 request
 to an XML data source.   To make things even more difficult, I'd like parts
 of the resulting page to appear in editable form fields that could be modified
 before submitting to yet another location.   We have data servers with
 commodity
 exchange data, and reporters that need to generate stories showing those
 values,
 sometimes including comments.   Some of the layouts never change, but it
 would really be best if the reporters could generate and control their own
 templates without having to understand all of the details involved.

One interesting tool is Xsplit from percussion. You might find it quite
interesting.

I missed the e off cafeconleche.org, fwiw.

-- 
!-- Matt --
:-Get a smart net/:-




Re: Fast template system. Ideas,theorys and tools

2002-01-01 Thread Thomas Eibner

On Tue, Jan 01, 2002 at 03:02:23PM -0500, Jason Czerak wrote:
 I looked at just about every template system on CPAN and came across
 text::template. Anyone use this one? I don't require if/then's within
   ^
A template system should (IMO) do exactly that. The logic shouldn't be
embedded in the templates. That's why I settled on CGI::FastTemplate
(Yes, yet another templating system). 

 the template. Infact all I really need are call backs to an API that I
 am currently developing. And in the case that I do need if/then's. I can
 use pure perl within the template. Even do SQL queries with-in the
 template, or not even use the API at all if I wanted to.

I don't want any code/sql in my templates, and it works out fine that
way for whatever project I do. And it's certainly easier for the
project's webdesigner to gasp when there's no code they can break by
using whatever windows-app they want to use to edit their html.

I tried Mason and other of the more featurefull template systems out there
but I always ended up going back to CGI::FastTemplate.

my $cent = 2; # on templates

-- 
  Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/
  mod_pointer http://stderr.net/mod_pointer 




RE: WYSIWYG Template Editor

2002-01-01 Thread Paul G. Weiss

Must be www.cafeconleche.org.
-P



-Original Message-
From: Matt Sergeant [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 01, 2002 5:50 PM
To: Les Mikesell
Cc: Joachim Zobel; [EMAIL PROTECTED]
Subject: Re: WYSIWYG Template Editor


On Tue, 1 Jan 2002, Les Mikesell wrote:

 From: Matt Sergeant [EMAIL PROTECTED]

   Does anybody know a template engine, whose templates can be edited
with a
   WYSIWYG editor (favourably dreamweaver) as they will look when
filled
   with example data?
 
  If you use XSLT, there's a number of options available to you. Try
  searching a site like http://www.cafeconlech.org/

 I can't reach that site - is the spelling correct?   I'd like to find
something
 that
 would allow non-technical people to write their own templates for pages
 that, as they are accessed, fill in variables pulled by a server-side http
 request
 to an XML data source.   To make things even more difficult, I'd like
parts
 of the resulting page to appear in editable form fields that could be
modified
 before submitting to yet another location.   We have data servers with
 commodity
 exchange data, and reporters that need to generate stories showing those
 values,
 sometimes including comments.   Some of the layouts never change, but it
 would really be best if the reporters could generate and control their own
 templates without having to understand all of the details involved.

One interesting tool is Xsplit from percussion. You might find it quite
interesting.

I missed the e off cafeconleche.org, fwiw.

-- 
!-- Matt --
:-Get a smart net/:-



Re: Fast template system. Ideas,theorys and tools

2002-01-01 Thread Ryan Thompson

Jason Czerak wrote to [EMAIL PROTECTED]:

 
  In fact, if I use this cache system and disable all parsing (i.e.,
  just use it to include straight HTML into mod_perl apps), I can serve
  150-200 requests/second on the same system.
 
  With my parsing regexps enabled, it drops to 50-60 requests/second.

 First. I would love to know what kinda machine your using here. :)

It's part of a testing environment. Nothing fancy... Lightly loaded
single CPU PII-400MHz, 512MB RAM, Adaptec Ultra160 SCSI (no RAID),
FreeBSD 4.4-RELEASE, with some in-house kernel patches applied, latest
MySQL, mod_perl, modules.. It's great for testing, because when we
move things to the REAL server (more power, more load), I know they'll
be at least as fast over there and won't crack under pressure :-)

The database this runs off of has several tables. The smallest has
about 15K rows. The largest is pushing 300K rows.


 3rd. my sql queries are not the most optimized and mostly tossed
 together. But then again my developemnt tables are not that big at
 all.

This might be one of your largest areas to improve upon. Thanks to
practical and theoretical experience with RDBMS', I write fairly well
optimized SQL when I throw things together, but I recently rewrote a
JOIN in one of my applications that was fast enough and doubled the
observed performance (oops.. should have noticed that the first time).
Check your table design and indexing, too, as these are areas which
are tremendously important, that many people overlook.

Even a development table that is not that big might be a few
thousand rows. If your query is poorly designed, and your DBMS has to
read every row in the table, you're going to take a noticeable hit
over a number of queries. Worse yet, if, for example, you're taking
the cartesian product by mistake (this is easy enough to do), pretty
quickly you've got hundreds of thousands of rows to deal with. :-)

I guess what I'm saying is, never underestimate the importance of
carefully constructed SQL.


 Keep in mind that my times are based also on the time it takes to
 make the transmission of the data from server to client as well as
 the time it takes to compile the template and do sql queries. Im
 not sure if your times are factoring that in. Locally times are
 .08/sec but remotely from T1 to cable times are .16/sec to .20/sec
 depending on network conditions and size of html file at the time
 naturally. Some of the html files can be about 50K in size we
 found.

Generally when testing application performance, it is wise to
eliminate highly variable things like network performance. Network
importance might be significant in your application deployment, but
you can test that in isolation with the many great network tools out
there.


 Also, pages will do about 3 sql queries on average plus queries to
 the Apache::Session state information.

Take advantage of query caching... Instead of
$cursor = $dbh-prepare('SELECT * FROM yourtable WHERE foo = bar');

use

$cursor = $dbh-prepare('SELECT * FROM yourtable WHERE foo = ?');
$cursor-bind_param(1,bar);

This way, your SQL database will cache the queries so that they do not
have to be parsed and examined each time. Note that this does NOT
cache the results of the queries. You can do that, as well, but can
lead to nasty surprises.

Also, try to limit the total number of SQL queries you make per
request. Take advantage of joins, group by, etc, if you can.


 Do these numbers sound right? There are places were I could move
 from doing SQL to keeping some data in Apache::Session. but it
 would be small speed improments unless the catagories are very
 deep, I do have recursive SQL queries inplace for some things.

 Your talking 50 to 60/sec as slow. So I dunno what is 'fast'.

I optimized a few things wrt. the parsing and am now seeing
110-115/sec pretty consistently. IIRC, this server won't handle much
more than that without SQL.

- Ryan

-- 
  Ryan Thompson [EMAIL PROTECTED]
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669 (877-SASKNOW) North America




cvs commit: modperl-2.0/t/apache post.t

2002-01-01 Thread stas

stas02/01/01 02:07:55

  Modified:t/apache post.t
  Log:
  - test cleanup
  
  Revision  ChangesPath
  1.4   +4 -7  modperl-2.0/t/apache/post.t
  
  Index: post.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/apache/post.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- post.t20 Dec 2001 03:54:40 -  1.3
  +++ post.t1 Jan 2002 10:07:55 -   1.4
  @@ -2,6 +2,7 @@
   use warnings FATAL = 'all';
   
   use Apache::Test;
  +use Apache::TestUtil;
   use Apache::TestRequest;
   
   plan tests = 2;
  @@ -19,10 +20,6 @@
   my $data = join '', map { $_=$data{$_} } keys %data;
   
   $str = POST_BODY $location, content = $data;
  -
  -my $expect = join(':', length($data), $data);
  -ok $str eq $expect;
  -
  -print EXPECT: $expect\n;
  -print STR: $str\n;
  -
  +ok t_cmp(join(':', length($data), $data),
  +$str,
  +POST);
  
  
  



cvs commit: modperl-2.0/t/response/TestAPI request_rec.pm

2002-01-01 Thread stas

stas02/01/01 02:21:39

  Modified:t/response/TestAPI request_rec.pm
  Log:
  start non-harness-control prints with #
  
  Revision  ChangesPath
  1.14  +2 -2  modperl-2.0/t/response/TestAPI/request_rec.pm
  
  Index: request_rec.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/request_rec.pm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- request_rec.pm13 Nov 2001 18:40:01 -  1.13
  +++ request_rec.pm1 Jan 2002 10:21:38 -   1.14
  @@ -98,10 +98,10 @@
   
   {
   local $| = 0;
  -ok 9  == $r-print(buffered\n);
  +ok 11  == $r-print(# buffered\n);
   ok 0  == $r-print();
   local $| = 1;
  -ok 13 == $r-print('n','o','t',' ','b','u','f','f','e','r','e','d',\n);
  +ok 15 == $r-print('#',' ','n','o','t',' 
','b','u','f','f','e','r','e','d',\n);
   }
   
   #no_local_copy
  
  
  



cvs commit: modperl-2.0/t/response/TestAPR lib.pm

2002-01-01 Thread stas

stas02/01/01 02:24:21

  Modified:t/response/TestAPR lib.pm
  Log:
  debug prints start with #
  
  Revision  ChangesPath
  1.2   +2 -1  modperl-2.0/t/response/TestAPR/lib.pm
  
  Index: lib.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/lib.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- lib.pm2 Apr 2001 09:04:28 -   1.1
  +++ lib.pm1 Jan 2002 10:24:21 -   1.2
  @@ -4,6 +4,7 @@
   use warnings FATAL = 'all';
   
   use Apache::Test;
  +use Apache::TestUtil;
   
   use APR::Lib ();
   
  @@ -22,7 +23,7 @@
   
   my $str= APR::strerror($status);
   
  -print strerror=$str\n;
  +t_debug strerror=$str\n;
   
   ok $str eq 'passwords do not match';
   
  
  
  



cvs commit: modperl-2.0/t/response/TestModperl dir_config.pm print.pm

2002-01-01 Thread stas

stas02/01/01 02:36:05

  Modified:t/response/TestModperl dir_config.pm print.pm
  Log:
  - cleanups
  
  Revision  ChangesPath
  1.2   +1 -1  modperl-2.0/t/response/TestModperl/dir_config.pm
  
  Index: dir_config.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/dir_config.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- dir_config.pm 13 Nov 2001 18:35:08 -  1.1
  +++ dir_config.pm 1 Jan 2002 10:36:05 -   1.2
  @@ -110,7 +110,7 @@
   my @expected = qw(1_SetValue 2_AddValue 3_AddValue);
   
   ok t_cmp(\@expected, \@received,
  - testing PerlAddVar ITERATE2 in $s);
  + testing PerlAddVar ITERATE2 in \$s);
   }
   
   {
  
  
  
  1.3   +1 -1  modperl-2.0/t/response/TestModperl/print.pm
  
  Index: print.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/print.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- print.pm  20 Dec 2001 18:12:15 -  1.2
  +++ print.pm  1 Jan 2002 10:36:05 -   1.3
  @@ -16,7 +16,7 @@
   
   ok 2;
   
  -printf ok %d, 3;
  +printf ok %d\n, 3;
   
   Apache::OK;
   }
  
  
  



cvs commit: modperl-2.0/t/protocol echo.t echo_filter.t eliza.t

2002-01-01 Thread stas

stas02/01/01 02:44:30

  Modified:t/protocol echo.t echo_filter.t eliza.t
  Log:
  debug prints start with #
  
  Revision  ChangesPath
  1.3   +2 -3  modperl-2.0/t/protocol/echo.t
  
  Index: echo.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/protocol/echo.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- echo.t17 Jun 2001 12:24:41 -  1.2
  +++ echo.t1 Jan 2002 10:44:29 -   1.3
  @@ -2,6 +2,7 @@
   use warnings FATAL = 'all';
   
   use Test;
  +use Apache::TestUtil;
   use Apache::TestRequest ();
   
   my @test_strings = qw(hello world);
  @@ -13,9 +14,7 @@
   ok $socket;
   
   for (@test_strings) {
  -print SEND ='$_'\n;
   print $socket $_\n;
   chomp(my $reply = $socket);
  -print REPLY='$reply'\n;
  -ok $reply eq $_;
  +ok t_cmp($_, $reply);
   }
  
  
  
  1.2   +2 -3  modperl-2.0/t/protocol/echo_filter.t
  
  Index: echo_filter.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/protocol/echo_filter.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- echo_filter.t 15 Jul 2001 22:39:36 -  1.1
  +++ echo_filter.t 1 Jan 2002 10:44:29 -   1.2
  @@ -2,6 +2,7 @@
   use warnings FATAL = 'all';
   
   use Test;
  +use Apache::TestUtil;
   use Apache::TestRequest ();
   
   my @test_strings = qw(hello world);
  @@ -13,9 +14,7 @@
   ok $socket;
   
   for (@test_strings) {
  -print SEND ='$_'\n;
   print $socket $_\n;
   chomp(my $reply = $socket);
  -print REPLY='$reply'\n;
  -ok $reply eq $_;
  +ok t_cmp($_, $reply);
   }
  
  
  
  1.3   +3 -2  modperl-2.0/t/protocol/eliza.t
  
  Index: eliza.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/protocol/eliza.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- eliza.t   18 Sep 2001 15:20:11 -  1.2
  +++ eliza.t   1 Jan 2002 10:44:30 -   1.3
  @@ -2,6 +2,7 @@
   use warnings FATAL = 'all';
   
   use Apache::Test;
  +use Apache::TestUtil;
   use Apache::TestRequest ();
   
   my @test_strings = ('Hello Eliza', 
  @@ -17,9 +18,9 @@
   ok $socket;
   
   for (@test_strings) {
  -print SEND ='$_'\n;
   print $socket $_\n;
   chomp(my $reply = $socket);
  -print REPLY='$reply'\n;
  +t_debug send: $_;
  +t_debug recv: $reply;
   ok $reply;
   }
  
  
  



Rent.com runs mod_perl (fwd)

2002-01-01 Thread Ask Bjoern Hansen

-- Forwarded message --
Date: Fri, 14 Dec 2001 14:27:41 -0800
From: Eric Hammond [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Rent.com runs mod_perl


http://www.rent.com/

Rent.com is a dynamic, database driven web site built on mod_perl.
Initial development took 3 months to replace an NT/IIS/ASP
implementation.

--
Eric Hammond
[EMAIL PROTECTED]




cvs commit: modperl-site/netcraft index.html

2002-01-01 Thread stas

stas02/01/01 19:14:20

  Modified:netcraft index.html
  Log:
  removing the embed image to securityspace graph, it doesn't get loaded
  from remote server :(
  
  Revision  ChangesPath
  1.44  +1 -3  modperl-site/netcraft/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/modperl-site/netcraft/index.html,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- index.html2 Jan 2002 03:08:24 -   1.43
  +++ index.html2 Jan 2002 03:14:20 -   1.44
  @@ -19,9 +19,7 @@
   provide a a 
href=http://www.securityspace.com/s_survey/data/man.200112/apachemods.html?mod=cGVybA==;page/a
 similar to this one with statistics and a graph based
   on the data collected by a
   href=http://www.securityspace.com/;www.securityspace.com/a
  -IMG
  -src=http://www.securityspace.com/s_survey/modgraph.php?month=200112mod=cGVybA==;
  -ALT=mod_perl growth data
  +
   p
   
   hr