Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Multi tiered web applications in Perl

by adrianh (Chancellor)
on Oct 21, 2003 at 13:19 UTC ( [id://300902]=note: print w/replies, xml ) Need Help??


in reply to Multi tiered web applications in Perl

I want to say that separating business logic and database access into modules that implement CGI::Application, and presentation with HTML::Template is already (logically) a three-tiered architecture.

This is true, and worth emphasising. A tiered architecture can be implemented in any language.

Is it possible, or even interesting to divide these into physical tiers? Placing the presentation logic on one server and the CGI::Application stuff on another?

It's certainly possibly. However in many instances it's more trouble than it's worth - since you add a lot of overhead in communicating between the different physical layers.

There's a recent onjava.com article that discusses this (in the context of PHP but it applies equally to Perl).

What Perl doesn't have is a single commonly accepted way of handling separation of physical tiers. But, with TMTOWTDI, why would you expect to have only one way :-)

For example, it's trivial to create stand alone application servers with POE, RPC::XML or SOAP::Lite. The amount of work involved is tiny. You certainly don't have to drop down to the socket-coding level.

  • Comment on Re: Multi tiered web applications in Perl

Replies are listed 'Best First'.
Re: Re: Multi tiered web applications in Perl
by perrin (Chancellor) on Oct 21, 2003 at 16:49 UTC
    I think mod_perl would be a better base for an application server (using XML-RPC, SOAP, or whatever) than POE. It will typically have better performance.
      It will typically have better performance

      True, mod_perl is pretty hard to beat if it meets your needs. I was just illustrating that there was, as they say, more than one way of doing it :-)

      That said, I've been surprised at how well POE performs.

      A few months back I needed a server to talk to some legacy applications as part of a web app. mod_perl wasn't really suitable (the legacy app wasn't HTTP based, had a stateful protocol, stupidly long connection times, stupidly small number of allowed connections) so I threw it together with POE.

      I was fully expecting to have to rewrite in C once I had the prototype up and running. However, straight POE was more than fast enough. One more reason to like Perl :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://300902]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-24 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found