pas-dev Mailing List for Perl Application Server (Page 17)
Status: Beta
Brought to you by:
mortis
You can subscribe to this list here.
2002 |
Jan
|
Feb
(6) |
Mar
(19) |
Apr
(3) |
May
(147) |
Jun
(6) |
Jul
(4) |
Aug
(12) |
Sep
(1) |
Oct
(12) |
Nov
(23) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(4) |
Feb
(12) |
Mar
(13) |
Apr
(16) |
May
(28) |
Jun
(9) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(84) |
Dec
(25) |
2004 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
From: Kyle R . B. <mo...@vo...> - 2002-05-17 15:43:29
|
> Sounds reasonable. I often get the feeling we're following java at this > point. I suppose we are. Still, its a good idea. I can see it being > useful. Yea and no. We're modeling the good aspects of JSP and the servelt model as those aspects translate and work well in the Perl/mod_perl arena. The log4j package is not Java, it is just a really good logging package that happens to have been first written in Java. Now it's available for Perl, and it's good, so I say we use it. That's 2 +1s, anyone else have an opinion? > > Second proposal: Exception handling > > It didnt silently fail, it was in pas.log, just not in the browser. But > yes. Why reinvent the wheel? Error.pm does indeed have some nice > to-haves. Leverage CPAN and note it in the INSTALL. That's 2 +1s, anyone else have an opinion? > > Third proposal: get rid of _gss()/_get_set_scalar() > > I agree for different reasons. I feel generic get/set functions are > error prone. Except in the most basic situations they're probably not > what you want. If its just a string to display, remember it. What errors? Their purpose is to keep you from writing the ever present standard get/set functions. That's all - if you need more functionality, then don't use it, write the get/set yourself and add in the desired behavior. Just because it's there doesn't mean you have to use it, it's optional so you don't have to use it if it's not appropriate. > The context of this will determine if I like it or not. The only difference between makeGetSetMethods() and _gss() is that _gss is slower, and you have to write more code, which opens up possibilities for errors. That's it. I know I've doen this before: sub foo {shift->_gss('foo');} and wasted time debugging it, when it should have been: sub foo {shift->_gss('foo',@_);} makeGetSet is better for these kinds of programmer errors. It is also faster because there is 1 level of function call involved, not two. It's also faster, because you're not shifting @_ to call your parent's _gss() method. The only faster thing I know of (besides going back to direct hash access) is to use pseudo hashes, and I'm not going to suggest that for a few reasons - it's documented as experimental, and in Larry's most recent state of the Onion, he talks about getting rid of them. > They also dont catch errors. And thats a big issue with me right now. > For blobby unstructured data, rock on. But for db stuff, this causes > issues further down the road. You talk about this more below, so I'll comment on it there. > It also raises the issue of backwards compatibility. Will this cause > code to break? If its transparent to 'old style' stuff, fine. If not, is > this a new branch/release major version/whatever? Just asking. They're > good ideas. Most of it will not. Some of the codebase is already using makeGetSetMethods. The change to Exception should be drastic - we should gut the codebase of all instances of $self->throw(). The logging change should also be drastic in the same way. > I think I'm seeing the issues with DB abstraction so I'm doing a first > round of 'just make it work' coding. > > I do have a fourth proposal. > > four: Modify object generator to gen smarter objects. I personaly like this. On a project Justin and I just did, and in some conversations I had with Andy, we want to generate the proper SQL staemetns for SELECT,INSERT,UPDATE and DELETE. That way they can deferr to a parent object for these operatsions -- the generated record objects will be smart enough to know how to perform these operations on themselves. For the project Justin and I worked on, we only wrote sql statements for reporting purposes. Of the few hundred sql statemetns we would have had to write for the 30 or so database tables, they all got handled implicitly by the code in the generated objects. That saved us no end of time. Of course it's not necessarily the most optimized SQL code, but we optmized afterwards when we saw hotspots in the application, which ended up being about 2 places. > I think we can make db records be smart enough that when I call a get > set with bad data, the object catches it and yells. > > Thus, if an object is generated and has a get/set for a number 2 column, > and call $obj->foo('string'), it shouldn't like it. My argument for > doing this is its easier to do when generating an object than it is when > trying to store an object. Its too error prone. And getting exceptions > on insert doesnt always tell me _which_ value was too large for a > column. The side effect of this is that we're probably going to have to > subclass objectgenerator for every database we support to deal with > their different personalitys. Since we currently only support MySQL, > this isnt a huge amount of work. However, going forward, the question of > access to every possible backend becomes an issue. I like the idea of adding in type checking or validation. We could either make that a switch on the generator, or a run-time swtich so you could use it in development, and turn it off for production for speed/performance reasons. > What do you think? This lack of data checking in generated objects is > making me seriously rethink their merits. Sure it takes longer, but I > can write an object by hand that will not accept bad data. I'd rather > spend the time up front writing the object, than debugging on insert > errors. I have a new proposal for the generator. The current appraoch sucks. I don't think we need to sub-class the generator, we need to throw it away. As It is currently written it is a bad approach (too much maintenence). I propose that we do what Justin and I did for the last project at HMS: use PSP to generate the objects. It's _soo_ much easier. We write a driver program: dbRecGenerator.pl --dbiDsn="dsnString" --dbUser=user --dbPass=pass \ --dbTable=TABLE_NAME --genClassName=Some::Class::RecName \ --pspTemplate=recGen.psp The driver program connects to the database, and puts togeather a data structure (or better yet, an object) that has all of the data about the table. Then the PSP looks like this: <% my $tableInfo = $self->query()->param('tableInfo'); my $packageName = $self->query()->param('packageName'); %>package <%= $packageName %>; use strict; use warnings; <% foreach my $use ( @someListOfObjectsToUse ) { %> use <%= $use %>; <% } %> our @ISA = qw( <%= @ourParentList %> ); <% foreach my $colInfo ( $tableInfo->columns() ) { %> sub <%= $colInfo->functionName() %> { my($self) = @_; if( @_ > 2 ) { # a set $self->validate<%= $colInfo->functionName() %>($_[1]); return $self->setVal(x,y,z); # something like that } # put get code here } sub validate<%= $colInfo->functionName() %> { my($self,$val) = @_; # do your validation based on the col type and precision here... } <% } %> sub recInsertSql { # return sql for a basic insert } # also do a select, update, and delete... 1; Does this make sense? Then you can just substitute out the particular psp template that generates the recod objects in the way you like it to. The templates will be infinitly easier to create and maintain than the current borked generator design. Comments? Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Mental <me...@ne...> - 2002-05-17 15:31:20
|
Hello. What do we think of dropping tags like SCRIPT,et all from the request inside the RequestHandler? Sure, each page should be doing input validation, but if we prune off malicious code at the source, we win. It could even be configurable. It would make things like this impossible on every page (this should be one long line): http://www.neverlight.com/pas/css.psp?foo=%3Cscript%3Ealert('oops')%3C/script%3E Since I never embed javascript, iframe or any html tags really in query parameters I was considering a couple different aproaches. URL encode all angle brackets. That would make the litteral script print in the page when it retrieves the query parameter. Look for all the malicious tags in the cert advisory re: css from a year or so ago and remove them. That would still let you embed image tags and what not (like on a discussion board), but would filter out 'known malicious' tags. -- Mental (Me...@Ne...) |
From: Mental <me...@ne...> - 2002-05-17 15:15:45
|
On Fri, 2002-05-17 at 10:41, Kyle R . Burton wrote: > First proposal: logging > > Justin and I recently worked on a project that used the Apache/Jakarta > projects' Log4j logging package. We absolutely loved it. > Sounds reasonable. I often get the feeling we're following java at this point. I suppose we are. Still, its a good idea. I can see it being useful. > Second proposal: Exception handling > > I'd like to propse that we get rid of throw() in favor of using the CPAN > module Error.pm. That will give us typed exceptions. Maybe we can even > update the request handler to catch the permissions problems that Doug > just ran into and report them instead of silently failing. > > It didnt silently fail, it was in pas.log, just not in the browser. But yes. Why reinvent the wheel? Error.pm does indeed have some nice to-haves. Leverage CPAN and note it in the INSTALL. > Third proposal: get rid of _gss()/_get_set_scalar() > I agree for different reasons. I feel generic get/set functions are error prone. Except in the most basic situations they're probably not what you want. If its just a string to display, remember it. > I'd like to propose that we get rid of these in favor of makeGetSetMethods(). > Example: > > package MyObj; > use strict; > use warnings; > use Org::Bgw::Base; # or any object derived from Base::Common > our @ISA = qw( Org::Bgw::Base ); > MyObj->makeGetSetMethods( qw( foo bar qux ) ); > The context of this will determine if I like it or not. <SNIP> > It creats the get/set function at run-time and obviates the extra level > of function call to _gss(). It also makes the code cleaner to look at. > They also dont catch errors. And thats a big issue with me right now. For blobby unstructured data, rock on. But for db stuff, this causes issues further down the road. > > The first two proposals raise the issue of external dependencies...should > we start depeding on external modules? I guess in some sense we already > do -- some apapche modules, the mysql driver, and soon the pg driver. > It also raises the issue of backwards compatibility. Will this cause code to break? If its transparent to 'old style' stuff, fine. If not, is this a new branch/release major version/whatever? Just asking. They're good ideas. > > What do the other developers think? > I think I'm seeing the issues with DB abstraction so I'm doing a first round of 'just make it work' coding. I do have a fourth proposal. four: Modify object generator to gen smarter objects. I think we can make db records be smart enough that when I call a get set with bad data, the object catches it and yells. Thus, if an object is generated and has a get/set for a number 2 column, and call $obj->foo('string'), it shouldn't like it. My argument for doing this is its easier to do when generating an object than it is when trying to store an object. Its too error prone. And getting exceptions on insert doesnt always tell me _which_ value was too large for a column. The side effect of this is that we're probably going to have to subclass objectgenerator for every database we support to deal with their different personalitys. Since we currently only support MySQL, this isnt a huge amount of work. However, going forward, the question of access to every possible backend becomes an issue. What do you think? This lack of data checking in generated objects is making me seriously rethink their merits. Sure it takes longer, but I can write an object by hand that will not accept bad data. I'd rather spend the time up front writing the object, than debugging on insert errors. -- Mental (Me...@Ne...) |
From: Kyle R . B. <mo...@vo...> - 2002-05-17 14:41:51
|
First proposal: logging Justin and I recently worked on a project that used the Apache/Jakarta projects' Log4j logging package. We absolutely loved it. There is a CPAN package that says it's a Perl version of Log4j, it's called Log::Dispatch and Log::Dispatch::Config. I'd like to propose that we remvoe the current logging system and implement the Log::Dispatch. It'll be alot more configurable as far as log levels go, and it'll be alot easier to have it log to other places -- you can configure a dispatch to go to a file, to the sys log, or you can configure it to log fatal errors as email (I think), plus it provides an api for you to implement your own logging. Second proposal: Exception handling I'd like to propse that we get rid of throw() in favor of using the CPAN module Error.pm. That will give us typed exceptions. Maybe we can even update the request handler to catch the permissions problems that Doug just ran into and report them instead of silently failing. Third proposal: get rid of _gss()/_get_set_scalar() I'd like to propose that we get rid of these in favor of makeGetSetMethods(). Example: package MyObj; use strict; use warnings; use Org::Bgw::Base; # or any object derived from Base::Common our @ISA = qw( Org::Bgw::Base ); MyObj->makeGetSetMethods( qw( foo bar qux ) ); sub method1 { my($self) = @_; $self->foo('this'); $self->bar( $self->qux() ); } It creats the get/set function at run-time and obviates the extra level of function call to _gss(). It also makes the code cleaner to look at. The first two proposals raise the issue of external dependencies...should we start depeding on external modules? I guess in some sense we already do -- some apapche modules, the mysql driver, and soon the pg driver. What do the other developers think? k -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kyle R . B. <mo...@vo...> - 2002-05-17 14:17:24
|
----- Forwarded message from "Kyle R . Burton" <mo...@vo...> ----- Date: Fri, 17 May 2002 09:52:25 -0400 From: "Kyle R . Burton" <mo...@vo...> To: Mental <me...@ne...> Subject: Re: [Pas-dev] install stuff Reply-To: "Kyle R . Burton" <mo...@vo...> X-Mailer: Mutt 095 us In-Reply-To: <1021641569.14626.27.camel@warpath>; from Mental on Fri, May 17, 2002 at 09:19:28AM -0400 > Hello. I seem to have a little time to help out with some stuff. :) > > I helped Doug get pas all set up. He got bit by file permissions. Apache > couldnt write to the psp-cache nor the session-cache. I added a note to > the quick start INSTALL file. Hopefully I wasn't overly verbose :) Great! I did write about this issue in the administrators guide. The admin's guide talks about the differences between a development install (where it's probably ok to have those directories writable) and a production install (where it is probably _not_ ok for those directories to be writable). The text I'm referring to is in section 3.2.1 and 4 & 4.3 (as the section numbering curently stands): 3.2.1 Filesystem Permissions If you are installing a development server you will likely want to set some permissions based on your system configuration. To give the software access to the log file, you should set the ownership of the $PAS_BASE/logs directory to the user and group of the web server. The same should be done for the psp-cache and session-cache directories. and: 4 Production System Recommendations Most of the configuration examples detailed in this document are targeted for setting up Pas for development use. Production environments often have very different concerns from development environments. Not the least of which revolve around security. 4.1 Build System The build system was created to help with security concerns. The build system allows an administrator to explicitly compile the PSP pages so that they are ready to be used by Pas. This allows you to set the psp-cache directory up with read only permissions. Thus eliminating the possibility of the webserver writing to the psp-cache directory. For production use, you will also want to set pas.psp.dynamicRecompile to 'no'. 4.2 Sessions The file based session system is not recommended for production systems. File based sessions will not perform as well, or scale as well as database based sessions. Not using file based sessions also allows you to have one less directory writable by the uid/gid of the webserver. 4.3 Development and Deployment Our best practices for development revolve around the use of a versioning system, like CVS. The easiest way to perform development is to keep your Page objects in a directory structure sepearate from your PSP pages. The directory structure for your PSP pages should match that used on your website. In fact, we recommend that the location of your PSP pages be your document root for dynamic content. Static content can be included into the same directory, or located seperatly. Sites wishing to acheive higher levels of performance and redundancy may wish to keep static content (like images, PDF files, and static HTML files) on a seperate web server tuned and dedicated to serving up static content. Keeping your Page objects in a hierarchical directory structure also allows you to add that directory directly to Perl's include path. This makes it easy to set up Apache. It also makes it easy for multiple developers to work independantly the same server. Organizing your development tree in this way will also greatly simplify deployment to your testing and production environments. Using CVS, you can do an export of your codebase, build the PSP pages and then create a tar and gzip archive of your website's codebase. That archive can then be deployed to your testing and production systems. Alternativly, using CVS directly to perform your deployment can be even simpler. If your development tree matches your website's document root, then deployment with CVS can be as simple as performing a cvs update command. Rolling back to a previous version of your website, if you make use of tags within CVS, is just as simple. I'm not yet settled on Lyx as the documentation tool, it just looked like it'd be a wysiwyg editor that could output to the formats I wanted (which I have yet to be able to get it to do). I'm thinking of DocBook (it's what O'Reilly uses), but it seem really complicated and I haven't gotten it to work yet either. Perhaps this means we should consider an install program that verifies the environment? It could be as simple as a tool that reports on the environment...shouldn't be too hard. Maybe I'll take a crack at something. > That said, I'm writing a PostgreSQL backend piece. Looking over the > MySQL stuff, I'm going to be re-implementing a lot of stuff. I'm already > using postgres for imp and I'd rather not use mysql also. I'm a little > short on ram :) Thanks for doing that. It'll be a useful thing to have. > Would it be better to have an abstract class(es) for what MySQL.pm is > doing today? Rather than calling it MySQL.pm, call it SQL.pm. Set what > db to use in the config file... > > I'm still thinking about stuff. It just seems like I'm going to be > duplicating a lot of code. I'd like to find a better way to leverage DBI > and abstract the database stuff a little more. > > In my mind, what would be ideal is a generic SQL class that could be > easily subclassed for whatever DBD driver you're using. > > I guess I just need to think about it more. I just have a nagging > feeling that I'm needlessly duplicating code. > > Feedback would be welcome as I'd like to cleanly support postgres, mysql > and others... I like the idea of abstraction. Unfortunatly you're about to learn about some of the significant differences between the database systems. MySQL implicitly supports BLOBs, and so does Oracle. PostgreSQL does not. You can support BLOBs, but you can not do it through SQL statements and bind parameters. You have to use a api custom to PostgreSQL. Some of the other differences betwen MySQL and Oracle are how you interact with autonumber columns and sequences. MySQL doens't support explicit sequences, though Oracle and PostgreSQL do. And how you interact with sequences differs betwen each of these databases. See DBD::Pg, and look for blob_read(), also see the PostgreSQL documentation for more information on the API. You should have access to a session style object I wrote that uses BLOBs in PostgreSQL on the project we both worked on. If we can find alot of common behavior between the RDBMS session implementations, then I'm all for teasing out the inheritence hierarchy. There are just some behavioral differences in the databases that we'll have to account for. Also, you're not forced to implement all the stuff the mysql driver does, you only have to implement these functions: read_from_storage write_to_storage get_timestamp update_timestamp The rest of the stuff in the MySQL.pm driver are functions I wrote to try to keep the code clean. Thanks for discussing this... k -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ ----- End forwarded message ----- -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kyle R . B. <mo...@vo...> - 2002-05-17 14:17:12
|
----- Forwarded message from "Kyle R . Burton" <mo...@vo...> ----- Date: Fri, 17 May 2002 10:16:39 -0400 From: "Kyle R . Burton" <mo...@vo...> To: Douglas Riordan <dou...@mi...> Subject: Re: [Pas-dev] bug in RequestHandler.pm Reply-To: "Kyle R . Burton" <mo...@vo...> X-Mailer: Mutt 095 us In-Reply-To: <3CE...@mi...>; from Douglas Riordan on Fri, May 17, 2002 at 10:00:08AM -0400 > i discovered a bug in RequestHandler.pm: > > eval " require $pkg; "; > > trouble is the '%' and '@' in the filename > pas/htdocs/diagnostics/_perls_%inc.psp and > pas/htdocs/diagnostics/_perls_%inc.psp are interpolated in the eval > line. i'm still pokin' around a bit, but i'll fix it. jason said that > the eval worked at some point as i'm sure this would've been caught > originally. You're right. When you try to access that file directly, it barfs on the special character. It does work as an included file -- the compiler can handle that just fine. I don't think this is necessarily a poblem with the request handler though -- funny characters like that are not legal for Perl module names. So what could the code really do in this case? We probably need to document that you shouldn't use funky characters in the psp file names as they get translated into package names. For files included via: <%@ page include="file"%> it's not a problem, as it's a file system level issue. > how do i become an author for pas? mother may i? 8^) You have to start by applying for an account on source forge. Then one of the project admin's for Pas has to give you write access. k -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ ----- End forwarded message ----- -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Douglas R. <dou...@mi...> - 2002-05-17 14:00:02
|
i discovered a bug in RequestHandler.pm: eval " require $pkg; "; trouble is the '%' and '@' in the filename pas/htdocs/diagnostics/_perls_%inc.psp and pas/htdocs/diagnostics/_perls_%inc.psp are interpolated in the eval line. i'm still pokin' around a bit, but i'll fix it. jason said that the eval worked at some point as i'm sure this would've been caught originally. how do i become an author for pas? mother may i? 8^) peace, doug |
From: Mental <me...@ne...> - 2002-05-17 13:19:34
|
Hello. I seem to have a little time to help out with some stuff. :) I helped Doug get pas all set up. He got bit by file permissions. Apache couldnt write to the psp-cache nor the session-cache. I added a note to the quick start INSTALL file. Hopefully I wasn't overly verbose :) That said, I'm writing a PostgreSQL backend piece. Looking over the MySQL stuff, I'm going to be re-implementing a lot of stuff. I'm already using postgres for imp and I'd rather not use mysql also. I'm a little short on ram :) Would it be better to have an abstract class(es) for what MySQL.pm is doing today? Rather than calling it MySQL.pm, call it SQL.pm. Set what db to use in the config file... I'm still thinking about stuff. It just seems like I'm going to be duplicating a lot of code. I'd like to find a better way to leverage DBI and abstract the database stuff a little more. In my mind, what would be ideal is a generic SQL class that could be easily subclassed for whatever DBD driver you're using. I guess I just need to think about it more. I just have a nagging feeling that I'm needlessly duplicating code. Feedback would be welcome as I'd like to cleanly support postgres, mysql and others... -- Mental (Me...@Ne...) |
From: Kyle R . B. <mo...@vo...> - 2002-05-15 02:29:44
|
I wrote more documentation in those guides tonight. Some is new material, some is copied from other files in the docs directory. I'm having trouble using the default version of Lyx to export the files to other formats. Is anyone famillar enough with these tools to know how to export to the other formats? I'd like to include a Makefile that builds HTML, post script, PDF and text versions of the documentation. Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kyle R . B. <mo...@vo...> - 2002-05-14 22:17:11
|
The docs directory now has Lyx files that use the DocBook DTD (if I'm doing things the way I think I am). There is the beginnings of an administrators guide and a developer's guide. Without the benefit of feedback based on what should be included in these manuals, I've started by adding in whatever I can think of. Thanks, Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kyle R . B. <mo...@vo...> - 2002-05-14 20:13:43
|
> I do like the flexibility and scalability of a separate server. I also think > that it's easier to tune performance of a separate server. But all this is > more gut feeling and less science. Well, with Apache's request forwarding you can set up an instance of Apache dedicated to running your Pas based application having the front end server serve up static content and forward requests off to the dedicated serever. In fact, I'm running Mandrake right now, and by default it does just this. It sets up an Apache instance on port 80 for normal http traffic, and and instance of Apache that has mod_perl on port 8200. I then have a rewrite rule in my http.conf that forwards requests for dynamic content to the mod_perl server: RewriteRule ^(.*\/pas\/.*)$ http://%{HTTP_HOST}:8200$1 [P] This forwards any url that contains /pas/ over to the mod_perl instance. > What developers are you referring to? As it's the first time I saw Pas, I > would like to know how big the community is. I'm referring to the current active developers, which includes myself and 2 other programmers. The community is small at this point. > Do you have any idea about performance numbers? How easy is it to develop > with Pas? I don't have any hard numbers relating to performance. As far as how easy it is to develop with Pas, that's probably a matter of opinion. Personaly I beleive it is very easy. > It's OK. If you like, you can join me to this list. I'd like to listen in on > Pas development for a while, until I have the time to try it out. The time is > not now; maybe later this summer. Joining the list is a voluntary process. If you are interested in joining, you can find instructions on how to subscribe at: http://sourceforge.net/mail/?group_id=19226 http://lists.sourceforge.net/lists/listinfo/pas-dev Good luck with your project. Best regards, Kyle R. Burton -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kaare R. <ka...@ka...> - 2002-05-14 19:20:38
|
> We do not currently have plans to make Pas a stand-alone server. Because > it is built into Apache via mod_perl, we can still use a 3 teir design > to keep the data, logic and presentation layers architectularly seperated, > while having them in the same process which gives it good performance. I do like the flexibility and scalability of a separate server. I also think that it's easier to tune performance of a separate server. But all this is more gut feeling and less science. > As far as I know, JSP only requries a servlet engine, such as Tomcat > from the Jakarta project: Sorry, my mistake. That's what I would have said. > As far as I know, there are no building blocks of the kind you mention > currently available for Pas, though I'm sure the developers are willing > to help with those kinds of things. What developers are you referring to? As it's the first time I saw Pas, I would like to know how big the community is. > the results and forwards the request on to the PSP page for display back > to the web browser. Do you have any idea about performance numbers? How easy is it to develop with Pas? > I hope this has been helpful. I would be happy to continue the > discussion. I have CC'd my response to the pas-devel mailing list, and > with your permission would like to continue to CC our discussion to > that list. It's OK. If you like, you can join me to this list. I'd like to listen in on Pas development for a while, until I have the time to try it out. The time is not now; maybe later this summer. -- Kaare Rasmussen --Linux, spil,-- Tlf: 3816 2582 Kaki Data tshirts, merchandize Fax: 3816 2501 Howitzvej 75 Åben 12.00-18.00 Web: www.suse.dk 2000 Frederiksberg Lørdag 11.00-17.00 Email: ka...@ka... |
From: Kyle R . B. <mo...@vo...> - 2002-05-14 14:19:48
|
> Hi > > I'm the project owner of Freemoney (Demo: http://www.web-counting.com), an > effort to make an Open Source Financial Application. Freemoney is based on > Perl. > > I've tried several models. Amongst them is Embperl, but for now I've settled > for Interchange (http://developer.akopia.com) as a development platform for > my project. Do you know Interchange? I've had some less than positive experiences with Embperl and most of the other standard HTML templating languages that are available for Perl for that matter. Embperl works as a templating language, it just leaves alot to be desired in my opinion. I did not know about Interchange until your email. I will take a more detailed look at it at some point. > In my search for a Perl Application Server, I found pas through freshmeat. > > One thing I really like about Interchange is that it's really an application > server, using a separate process. Do you have any plans to make pas do the > same. I can see that you compare it with jsp. To my knowledge, jsp requires > jboss or another (separate) server. We do not currently have plans to make Pas a stand-alone server. Because it is built into Apache via mod_perl, we can still use a 3 teir design to keep the data, logic and presentation layers architectularly seperated, while having them in the same process which gives it good performance. There is no reason why you could not set up a seperate instance of Apache running Pas and then either have your front end web server forward requests to the secondary server, or use a remote api (such as xml-rpc, or soap) to access the secondary server. We made use of Apache precisely because it is a stable, high performance server architecture. One way to think about Apache/mod_perl with Pas is that it is an application server at it's core. It accepts requests and produces responses. The normal mode of operation for it is to use HTTP as the transport and HTML as the presentation. As far as I know, JSP only requries a servlet engine, such as Tomcat from the Jakarta project: http://jakarta.apache.org/ JBoss is only necessary (appropriate) if you are giong to use Enterprise Java Beans [EJB]. > Pas seems rather new in the current implementation - how many real world > projects do you think is using it? Do you know of any building blocks made > for pas - like menus, calendar, content management, searching, report writer > or the like? Pas in it's current implementation is about a year old. I am not currently aware of any public websites that make use of it. Pas grew out of my experiences building Vwr Scientific Product's ewcommerce site: http://www.vwrsp.com/ That site produces over 150000 dynamic page generations a day. That is the count of pages produced by the software, the actual number of requests to the site is higher than that number. When I left that project, the site was generating about 8 million US in sales per month. Pas has a cleaner more efficient internal design than what we did for that site. I have been using Pas for projects at my current employer, so I know that there are two real world projects using it. Unfortuantly they are internal applications, so they are not avaialble to the outside world. As far as I know, there are no building blocks of the kind you mention currently available for Pas, though I'm sure the developers are willing to help with those kinds of things. > is the database interface well suited for a classic application like a > financial system? Most of it consists of overview and detail pages. > Interchange i OK for that, but it's not perfect, and it really can't > separate the business logic from the page layout. The database interface is the standard Perl pacakge DBI. It is a general database interface layer. For projects where I've used Pas, we general break the database layer out away from everything else by generating a Perl object to represent a record from a single table from the database. These objects know how to insert, update, select and delete records from the respective tables. We then implement the bulk of the business logic in Page objects. We then use the PSP pages for the displaying of the data processed/gathered by the Page objects. An inbound request is targeted at a page object, the page object interacts with the data layer to perform the requested functionality, summarizes the results and forwards the request on to the PSP page for display back to the web browser. I hope this has been helpful. I would be happy to continue the discussion. I have CC'd my response to the pas-devel mailing list, and with your permission would like to continue to CC our discussion to that list. Best Regards, Kyle R. Burton -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kyle R . B. <mo...@vo...> - 2002-05-08 18:21:02
|
> > There isn't an exception message? It's just blank? The handler _should_ > > be reporting the error message... > > *shrugs* Are permissions ok? Can the uid/gid of the webserver read the directories in quesiton? Does the uid/gid of the webserver have write access to the psp-cache an/or session-cache directories pointed to by your pas.conf file? If you don't want Pas to be able to dynamicly re-build your psp pages, you can run the manual build system to build them staticly. > > What is your pas.documentRoot set to in your pas.conf? I don't have the > > exception handler printing out the configuration file because of potentialy > > sensitive data... > > pas.documentRoot=htdocs > PerlSetEnv PAS_BASE "/home/driordan/bin/src/pas" Hrm, these look ok. I'm not sure what it could be if there is no error message. Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Douglas R. <dou...@mi...> - 2002-05-08 18:11:07
|
why do keep replying only to me? can you setup mailman to set the reply-to to the list? Kyle R . Burton wrote: >>i tried to hit the 1st example. >> >>pas.log said: >>M:Org::Bgw::Pas::RequestHandler->/home/driordan/bin/src/pas/src/Org/Bgw/Pas/RequestHandler.pm(270) >>EXECUTE: handling request: >>/home/driordan/bin/src/pas/htdocs/examples/test.psp >> >>nuthin' in the apache error log. > > > Depending on your linux distribution, you might have seperate error logs > for the standard apache and the mod_perl one. On Mandrake, apache is set up > as 2 processes, the 1st being a standard Apache instance, which forwards > connections to the mod_perl [2nd] instance for uri's specified in the > http.conf files. On Mandrake, they typicly are: > > /etc/httpd/logs/error_log > /etc/httpd/logs/perl-error_log afaik, debian's apache logs are in /var/log/apache. >>here's the whole exception page: >> >>Pas: Internal Server Error >>Exception: > > > There isn't an exception message? It's just blank? The handler _should_ > be reporting the error message... *shrugs* > At first glance, nothing looked strange about the environment stuff. > > What is your pas.documentRoot set to in your pas.conf? I don't have the > exception handler printing out the configuration file because of potentialy > sensitive data... pas.documentRoot=htdocs PerlSetEnv PAS_BASE "/home/driordan/bin/src/pas" peace, doug |
From: Douglas R. <dou...@mi...> - 2002-05-08 17:38:03
|
Kyle R . Burton wrote: >>i came across an error that wasn't covered in the FAQ: >> >>Pas: Internal Server Error >>Exception: >> >>Org::Bgw::Pas::RequestHandler=HASH(0x8349460) >> >>i believe i've almost got pas configured correctly, but i don't know >>what to do about this one. my apache trouble-shotting skillz aren't the >>best either. 8^) > > > Is there any other information? I assume you've installed Pas, and > Apache/mod_perl. I assume from that error that you've also reached > the point where you're trying to hit Pas from your web browser -- that's > where you got that error message right? What was the URL you were > trying to hit? Was there a stack trace with that error message? i tried to hit the 1st example. pas.log said: M:Org::Bgw::Pas::RequestHandler->/home/driordan/bin/src/pas/src/Org/Bgw/Pas/RequestHandler.pm(270) EXECUTE: handling request: /home/driordan/bin/src/pas/htdocs/examples/test.psp nuthin' in the apache error log. > That message is [I'm pretty sure] from the exception handler built into > Pas, but I think there is other [useful] information missing from your > email. here's the whole exception page: Pas: Internal Server Error Exception: Org::Bgw::Pas::RequestHandler=HASH(0x8349528) Query Parameters: Parameter Value Environment Variables: Variable Value DOCUMENT_ROOT /home/driordan/public_html/ GATEWAY_INTERFACE CGI-Perl/1.1 HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1 HTTP_ACCEPT_CHARSET ISO-8859-1, utf-8;q=0.66, *;q=0.66 HTTP_ACCEPT_ENCODING gzip, deflate, compress;q=0.9 HTTP_CACHE_CONTROL no-cache HTTP_CONNECTION keep-alive HTTP_HOST localhost HTTP_KEEP_ALIVE 300 HTTP_PRAGMA no-cache HTTP_REFERER http://localhost/pas/examples/00INDEX.HTML HTTP_USER_AGENT Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020412 Debian/0.9.9-6 MOD_PERL mod_perl/1.26 PAS_BASE /home/driordan/bin/src/pas PATH /bin:/usr/bin:/sbin:/usr/sbin QUERY_STRING REMOTE_ADDR 127.0.0.1 REMOTE_PORT 1762 REQUEST_METHOD GET REQUEST_URI /pas/examples/test.psp SCRIPT_FILENAME /home/driordan/bin/src/pas/htdocs/examples/test.psp SCRIPT_NAME /pas/examples/test.psp SERVER_ADDR 127.0.0.1 SERVER_ADMIN webmaster@furious SERVER_NAME furious SERVER_PORT 80 SERVER_PROTOCOL HTTP/1.1 SERVER_SIGNATURE Apache/1.3.24 Server at furious Port 80 SERVER_SOFTWARE Apache/1.3.24 (Unix) Debian GNU/Linux mod_perl/1.26 PHP/4.1.2 UNIQUE_ID PNlh6n8AAAEAAAR9AKU Perl's @INC: * /home/driordan/bin/src/pas/src * /home/driordan/bin/src/pas/pages * /home/driordan/bin/src/pas/psp-cache * /usr/local/lib/perl/5.6.1 * /usr/local/share/perl/5.6.1 * /usr/lib/perl5 * /usr/share/perl5 * /usr/lib/perl/5.6.1 * /usr/share/perl/5.6.1 * /usr/local/lib/site_perl * . * /etc/apache/ * /etc/apache/lib/perl Perl's %INC: Package File /home/driordan/bin/src/pas/src/startup.pl /home/driordan/bin/src/pas/src/startup.pl Apache.pm /usr/lib/perl5/Apache.pm Apache/Connection.pm /usr/lib/perl5/Apache/Connection.pm Apache/Constants.pm /usr/lib/perl5/Apache/Constants.pm Apache/Constants/Exports.pm /usr/lib/perl5/Apache/Constants/Exports.pm Apache/Server.pm /usr/lib/perl5/Apache/Server.pm Apache/StatINC.pm /usr/lib/perl5/Apache/StatINC.pm Apache/Table.pm /usr/lib/perl5/Apache/Table.pm AutoLoader.pm /usr/share/perl/5.6.1/AutoLoader.pm CGI.pm /usr/share/perl/5.6.1/CGI.pm CGI/Cookie.pm /usr/share/perl/5.6.1/CGI/Cookie.pm CGI/Util.pm /usr/share/perl/5.6.1/CGI/Util.pm Carp.pm /usr/share/perl/5.6.1/Carp.pm Config.pm /usr/lib/perl/5.6.1/Config.pm Cwd.pm /usr/share/perl/5.6.1/Cwd.pm Data/Dumper.pm /usr/lib/perl/5.6.1/Data/Dumper.pm Digest/MD5.pm /usr/lib/perl5/Digest/MD5.pm DynaLoader.pm /usr/lib/perl/5.6.1/DynaLoader.pm Errno.pm /usr/lib/perl/5.6.1/Errno.pm Exporter.pm /usr/share/perl/5.6.1/Exporter.pm Exporter/Heavy.pm /usr/share/perl/5.6.1/Exporter/Heavy.pm Fcntl.pm /usr/lib/perl/5.6.1/Fcntl.pm File/Spec.pm /usr/share/perl/5.6.1/File/Spec.pm File/Spec/Unix.pm /usr/share/perl/5.6.1/File/Spec/Unix.pm IO.pm /usr/lib/perl/5.6.1/IO.pm IO/File.pm /usr/lib/perl/5.6.1/IO/File.pm IO/Handle.pm /usr/lib/perl/5.6.1/IO/Handle.pm IO/Seekable.pm /usr/lib/perl/5.6.1/IO/Seekable.pm Org/Bgw/Base.pm /home/driordan/bin/src/pas/src/Org/Bgw/Base.pm Org/Bgw/Base/Common.pm /home/driordan/bin/src/pas/src/Org/Bgw/Base/Common.pm Org/Bgw/Config.pm /home/driordan/bin/src/pas/src/Org/Bgw/Config.pm Org/Bgw/Environment.pm /home/driordan/bin/src/pas/src/Org/Bgw/Environment.pm Org/Bgw/Exception.pm /home/driordan/bin/src/pas/src/Org/Bgw/Exception.pm Org/Bgw/Pas/Base.pm /home/driordan/bin/src/pas/src/Org/Bgw/Pas/Base.pm Org/Bgw/Pas/Page.pm /home/driordan/bin/src/pas/src/Org/Bgw/Pas/Page.pm Org/Bgw/Pas/Pages/ErrorPage.pm /home/driordan/bin/src/pas/src/Org/Bgw/Pas/Pages/ErrorPage.pm Org/Bgw/Pas/Psp/Compiler.pm /home/driordan/bin/src/pas/src/Org/Bgw/Pas/Psp/Compiler.pm Org/Bgw/Pas/Request.pm /home/driordan/bin/src/pas/src/Org/Bgw/Pas/Request.pm Org/Bgw/Pas/RequestHandler.pm /home/driordan/bin/src/pas/src/Org/Bgw/Pas/RequestHandler.pm Org/Bgw/Pas/Response.pm /home/driordan/bin/src/pas/src/Org/Bgw/Pas/Response.pm Org/Bgw/Pas/Session.pm /home/driordan/bin/src/pas/src/Org/Bgw/Pas/Session.pm Org/Bgw/Pas/Session/File.pm /home/driordan/bin/src/pas/src/Org/Bgw/Pas/Session/File.pm SelectSaver.pm /usr/share/perl/5.6.1/SelectSaver.pm Symbol.pm /usr/share/perl/5.6.1/Symbol.pm XSLoader.pm /usr/lib/perl/5.6.1/XSLoader.pm base.pm /usr/share/perl/5.6.1/base.pm constant.pm /usr/share/perl/5.6.1/constant.pm fields.pm /usr/share/perl/5.6.1/fields.pm lib.pm /usr/share/perl/5.6.1/lib.pm mod_perl.pm /usr/lib/perl5/mod_perl.pm overload.pm /usr/share/perl/5.6.1/overload.pm strict.pm /usr/share/perl/5.6.1/strict.pm vars.pm /usr/share/perl/5.6.1/vars.pm warnings.pm /usr/share/perl/5.6.1/warnings.pm warnings/register.pm /usr/share/perl/5.6.1/warnings/register.pm >>btw, i've added verbiage re: setting up the pas_session table in the >>INSTALL file. i've also been correcting spelling *shoots arrow* as i >>go. i swear i'm gonna implant a silicon spell-check chip in your head >>kyle. =) > > > Can I have 2? ;-) yes. whatever it takes. :) > You can just mail any of us the updates (thanks for doing it by the way) > and we'll make sure it gets committed into the archive. isn't that gonna be messy? i assume i can't just commit my changes as an anonymous user. peace, doug |
From: Justin B. <ju...@le...> - 2002-05-08 17:08:52
|
Douglas Riordan wrote: > > btw, i've added verbiage re: setting up the pas_session table in the > INSTALL file. i've also been correcting spelling *shoots arrow* as i > go. i swear i'm gonna implant a silicon spell-check chip in your head > kyle. =) make it a dual-processor. :D justin |
From: Douglas R. <dou...@mi...> - 2002-05-08 17:03:27
|
i came across an error that wasn't covered in the FAQ: Pas: Internal Server Error Exception: Org::Bgw::Pas::RequestHandler=HASH(0x8349460) i believe i've almost got pas configured correctly, but i don't know what to do about this one. my apache trouble-shotting skillz aren't the best either. 8^) btw, i've added verbiage re: setting up the pas_session table in the INSTALL file. i've also been correcting spelling *shoots arrow* as i go. i swear i'm gonna implant a silicon spell-check chip in your head kyle. =) peace, doug |
From: Kyle R . B. <mo...@vo...> - 2002-05-07 18:33:47
|
> > Actualy, the fact that I answered that way means we need to add that > > to the documentation somewhere...thanks for pointing this out, and > > sorry it's not already in the documentation. > > np. i'd been poking around in those modules briefly, but hadn't found > my answer yet. it definitely should be documented. =) Well, it is documented. It's just documented in the POD of those modules. The problem with that is that it's not intuitive that that's where you should go to look for how to set up MySQL based sessions. There should at least be a pointer to those modules in the install manual or something. Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Douglas R. <dou...@mi...> - 2002-05-07 18:27:13
|
Kyle R . Burton wrote: > Actualy, the fact that I answered that way means we need to add that > to the documentation somewhere...thanks for pointing this out, and > sorry it's not already in the documentation. np. i'd been poking around in those modules briefly, but hadn't found my answer yet. it definitely should be documented. =) peace, doug |
From: Kyle R . B. <mo...@vo...> - 2002-05-07 18:18:39
|
Actualy, the fact that I answered that way means we need to add that to the documentation somewhere...thanks for pointing this out, and sorry it's not already in the documentation. Kyle On Tue, May 07, 2002 at 02:14:01PM -0400, Kyle R . Burton wrote: > > is there any documentation on how to setup the pas_session table? i'm > > using mysql. i believe i've setup everything correctly thus far, but > > wondering about the field attributes of that table. does pas create it? > > do i create it? > > perldoc Org::Bgw::Pas::Session::MySQL > perldoc Org::Bgw::Pas::Session::MySQL::Factory.pm > > or: > > perldoc src/Org/Bgw/Pas/Session/MySQL.pm > perldoc src/Org/Bgw/Pas/Session/MySQL/Factory.pm > > depending on how your PERL5LIB is set up, the first should work, if not, > the second will work from the main project directory. > > Actualy you only need to read the factory manpage, the first manpage > only points to the second. > > > hth, > > Kyle > > -- > > ------------------------------------------------------------------------------ > Wisdom and Compassion are inseparable. > -- Christmas Humphreys > mo...@vo... http://www.voicenet.com/~mortis > ------------------------------------------------------------------------------ > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: ban...@so... > _______________________________________________ > Pas-dev mailing list > Pa...@li... > https://lists.sourceforge.net/lists/listinfo/pas-dev -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kyle R . B. <mo...@vo...> - 2002-05-07 18:14:17
|
> is there any documentation on how to setup the pas_session table? i'm > using mysql. i believe i've setup everything correctly thus far, but > wondering about the field attributes of that table. does pas create it? > do i create it? perldoc Org::Bgw::Pas::Session::MySQL perldoc Org::Bgw::Pas::Session::MySQL::Factory.pm or: perldoc src/Org/Bgw/Pas/Session/MySQL.pm perldoc src/Org/Bgw/Pas/Session/MySQL/Factory.pm depending on how your PERL5LIB is set up, the first should work, if not, the second will work from the main project directory. Actualy you only need to read the factory manpage, the first manpage only points to the second. hth, Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Douglas R. <dou...@mi...> - 2002-05-07 18:09:33
|
Kyle R . Burton wrote: >>>Worked first time? >> >>yes it did. i wasn't paying attention to what dir i was in. i was >>trying to co pas to my own repository. serves me right for trying to >>rush thru the co before i left last nite. 8^) >> >>so where do i start? i'm reading the TODO file now. =) > > > We should really start by moving the discussion to pas-dev (see sf.net for > how to subscribe). It'll get archived, and other people will see that > we're working on/discussing pas that way. is there any documentation on how to setup the pas_session table? i'm using mysql. i believe i've setup everything correctly thus far, but wondering about the field attributes of that table. does pas create it? do i create it? peace, doug |
From: Kyle R . B. <mo...@vo...> - 2002-05-07 15:38:37
|
3.0.16 has just been released. pas-3-0-16 is now a tag in CVS. The file should be availalbe from: http://sourceforge.net/project/showfiles.php?group_id=19226 It's a stable version that is currently being used in a production environment at my employer. Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kyle R . B. <mo...@vo...> - 2002-05-07 14:57:28
|
> > Worked first time? > > yes it did. i wasn't paying attention to what dir i was in. i was > trying to co pas to my own repository. serves me right for trying to > rush thru the co before i left last nite. 8^) > > so where do i start? i'm reading the TODO file now. =) We should really start by moving the discussion to pas-dev (see sf.net for how to subscribe). It'll get archived, and other people will see that we're working on/discussing pas that way. Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |