This document attempts to catalog the various means by which you might consider creating functional components. This table lists the various means of componentizing an application:
| Method | Description | Ads/Disads |
|---|---|---|
| Tiered | This is how enterprise systems are built. Well defined layers (independant programs) take well defined input and convert it to well-defined output. When one tier is done, it knows what tier to call next. | The biggest win with this type of componentization is the ability to use operating system interrupts to "pop the execution stack". For example if tier A calls tier B calls tier C and you want tier C to stop, you can simply kill the process and you will return to tier B. This would be very difficult to do with Perl objects because signal handlers are global to an application, not to a conceptual tier of execution. |
| Piped | A piped system leverages the wealth of tools available in the Unix shell. One of the most amazing shell-level complex applications is NOSQL, a truly relational database which makes use of a number of shell-utilities on tab-delimited files to relate and compute on tables without SQL. In fact, a related commercial utility, /RDB, makes a strong case for The Unix Shell as a 4th Generation Language | The great advantage is no part of the stream stays in memory longer than it is used. Also it is very easy to study steps of the process by simply chopping off a few members of the pipeline. The downfall is that dataflow is unidirectional. Also all data must be passed from process to process instead of being memory-resident. Another downfall is that data tends be accessed by position instead of name, thus changes in data format must be accomodated manually in each script dependant on the old format. However, should a naming convention exist, as it does for JDB, then each element of the pipeline must acquant itself with the format before beginning its work. |
| Client-Server | In this case, you can again reduce the memory footprint of your application by creating a large number of "remote procedures". Perl support for this is available in POE and STEM, SOAP::Lite, RPC::XML::Client, as well as the Net::* hierarchy on CPAN. | The great win with this sort of system is that each daemon will have well-defined input and output, thus reducing the number of errors resulting from package variables hanging around to snatch the rug out from under you. You also don't have to have the whole program on one machine and tax the memory. |
| Perl Objects | This approach should be obvious |
So what I wish to now describe is our workflow.
Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality
Edit by tye to add READMORE tag
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [swengr] Componentizing Complex Apps
by djantzen (Priest) on Nov 27, 2002 at 02:53 UTC | |
by princepawn (Parson) on Dec 02, 2002 at 17:06 UTC |