Re: Non-web use for Apache/mod_perl

2002-03-21 Thread Stas Bekman

Bas A.Schulte wrote:
 Hi,
 
 I've been meaning to write an article about how I used Apache/mod_perl 
 to implement a mobile SMS application platform as it demonstrates use of 
 Apache/mod_perl outside the Web realm, something I hadn't seen so far. 
 Time constraints (as always) have prevented me from doing this properly, 
 however, I'll try to give a short description of the system.
 
 The goal kinda is to see if others are using Apache/mod_perl in a 
 similar way to share experiences, discuss issues that arise or discuss 
 alternatives (I'd love someone to tell me I'm an idiot for handling all 
 this lowlevel stuff myself and move to J2EE/java at once, if he can 
 convince me I could have implemented this with the same budget and time 
 frame).

Very nice, Bas. Thanks for sharing with us.

For J2EE in Perl see http://p5ee.perl.org/. Very early alpha though.

For protocol server httpd-2.0/modperl-2.0 is exactly what you want, 
since it supports protocol servers and other useful things you will most 
likely benefit from (e.g. filtering), but don't hold your breath yet, 
since httpd-2.0 is not out yet. Though if you plan doing a next 
generation some time in the future, you probably better off start 
looking at modperl-2.0. We already have Eliza protocol example running 
as one of the tests:

t/TEST  -v protocol/eliza
protocol/eliza1..6
ok 1
# send: Hello Eliza
# recv: Hi. What seems to be your problem?
ok 2
# send: How are you
# recv: You're not really talking about me -- are you?
ok 3
# send: Why do I have core dumped?
# recv: That's quite interesting.
ok 4
# send: I feel like writing some tests today, you?
# recv: That is interesting. Please continue.
ok 5
# send: good bye
# recv: That is interesting. Please continue.
ok 6
ok
All tests successful.

This is the client:
http://cvs.apache.org/viewcvs.cgi/~checkout~/modperl-2.0/t/protocol/eliza.t
This is the server:
http://cvs.apache.org/viewcvs.cgi/~checkout~/modperl-2.0/t/protocol/TestProtocol/eliza.pm

Also, can we adapt your story for our success stories collection?
http://perl.apache.org/stories/
If so, can you please send me an adapted version, or I can simply throw 
it in as is :)




_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Non-web use for Apache/mod_perl

2002-03-21 Thread Issac Goldstand

Bas A.Schulte wrote:

 Hi,

 I've been meaning to write an article about how I used Apache/mod_perl 
 to implement a mobile SMS application platform as it demonstrates use 
 of Apache/mod_perl outside the Web realm, something I hadn't seen so 
 far. Time constraints (as always) have prevented me from doing this 
 properly, however, I'll try to give a short description of the system.

 The goal kinda is to see if others are using Apache/mod_perl in a 
 similar way to share experiences, discuss issues that arise or discuss 
 alternatives (I'd love someone to tell me I'm an idiot for handling 
 all this lowlevel stuff myself and move to J2EE/java at once, if he 
 can convince me I could have implemented this with the same budget and 
 time frame).

[snip]

I actually implemented a similar system, although it's not SMS specific. 
 Basically, I have a central system in Apache/mod_perl.  The eventual 
design is for full I/O in many protocols, including HTTP, SMTP, FTP and 
a handful of other protocols.  So far the output is pretty much ready, 
and I think I'm going to wait for Apache 2 before I do the inputs.  I 
_could_ write mod_perl handlers to understand other protocols, but 
Apache 2 is being designed around this, as far as I understand, so I'm 
going to do that around Apache 2 (as soon as I get off my ass and learn 
the new API :-))

  Issac





Re: Non-web use for Apache/mod_perl

2002-03-21 Thread Bas A. Schulte

Issac,

On Thursday, March 21, 2002, at 11:01 AM, Issac Goldstand wrote:

 Bas A.Schulte wrote:

 Hi,

 I've been meaning to write an article about how I used Apache/mod_perl 
 to implement a mobile SMS application platform as it demonstrates use 
 of Apache/mod_perl outside the Web realm, something I hadn't seen so 
 far. Time constraints (as always) have prevented me from doing this 
 properly, however, I'll try to give a short description of the system.

 The goal kinda is to see if others are using Apache/mod_perl in a 
 similar way to share experiences, discuss issues that arise or discuss 
 alternatives (I'd love someone to tell me I'm an idiot for handling 
 all this lowlevel stuff myself and move to J2EE/java at once, if he 
 can convince me I could have implemented this with the same budget and 
 time frame).

 [snip]

 I actually implemented a similar system, although it's not SMS 
 specific. Basically, I have a central system in Apache/mod_perl.  The 
 eventual design is for full I/O in many protocols, including HTTP, 
 SMTP, FTP and a handful of other protocols.

Well, this proves again that everything we software developers do has 
been done umteen times before ;)

The system I described actually isn't tied to SMS as well; it has been 
designed with other devices in mind as well. The virtual SMSC component 
as I described it really should have a better name as it really is a 
protocal handler and serializing/deserializing component that is capable 
of handling other protocol and formats. In fact, I am considering 
enhancing it to be able to use it in a WAP or i-Mode context (if we can 
only find a way to get paid by the mobile subscriber using WAP which is 
easy with SMS).


 So far the output is pretty much ready, and I think I'm going to wait 
 for Apache 2 before I do the inputs.  I _could_ write mod_perl handlers 
 to understand other protocols, but Apache 2 is being designed around 
 this, as far as I understand, so I'm going to do that around Apache 2 
 (as soon as I get off my ass and learn the new API :-))

Yep; Apache 2 combined with mod_perl sure sounds interesting, now if it 
only had the stability that 1.x has ;)

Regards,

Bas.




Re: Non-web use for Apache/mod_perl

2002-03-21 Thread Ilya Martynov

 On Thu, 21 Mar 2002 00:40:24 +0100, Bas A.Schulte [EMAIL PROTECTED] said:

BAS To handle a large number of concurrent transactions in a
BAS transaction-safe environment without me having to worry too much about
BAS concurrency issues and referential integrity I will slowly move to
BAS Oracle. $dbh-do('LOCK TABLE USER, INSTANCE, APP_DATA') just plain
BAS sucks unless you want to create a very large distributed *single-user*
BAS system running on multiple machines.

Without changing SQL backend you can have transactions with
MySQL. Just use InnoDB table type. It is faster than default table
type for read/write intensive applications because it doesn't lock
whole tables but provides Oracle style row-level locking.

-- 
oIlya Martynov = http://martynov.org/o
oTIV.net   = http://tiv.net/ o



Re: Non-web use for Apache/mod_perl

2002-03-21 Thread Bas A. Schulte

Hi,

On Thursday, March 21, 2002, at 11:39 AM, Ilya Martynov wrote:

 On Thu, 21 Mar 2002 00:40:24 +0100, Bas A.Schulte 
 [EMAIL PROTECTED] said:

 BAS To handle a large number of concurrent transactions in a
 BAS transaction-safe environment without me having to worry too much 
 about
 BAS concurrency issues and referential integrity I will slowly move to
 BAS Oracle. $dbh-do('LOCK TABLE USER, INSTANCE, APP_DATA') just plain
 BAS sucks unless you want to create a very large distributed 
 *single-user*
 BAS system running on multiple machines.

 Without changing SQL backend you can have transactions with
 MySQL. Just use InnoDB table type. It is faster than default table
 type for read/write intensive applications because it doesn't lock
 whole tables but provides Oracle style row-level locking.

I knew I shouldn't have mentioned MySQL and it's, possibly perceived, 
shortcomings ;)

I know about InnoDB, I know about Postgresql too, it's just that I 
really like Oracle for lots of reasons. I have no personal experience 
with running MySQL or Postgresql in a high-volume concurrent read/write 
transaction situation. It seems most MySQL success stories are about 
websites with 98% read-only transactions on the database which just 
isn't similar to my needs. I used MySQL myself for that type of problem 
and it sure worked.

If someone really wants to do another DB discussion, let's move that to 
a different discussion ;)

Bas.




Re: Non-web use for Apache/mod_perl

2002-03-21 Thread Bill McCabe

Over the last year I've been slowly working on a similar system in my spare time
(of which I have none). To do systems monitoring and reporting I'm using
mod_perl on the front end and communicating with remote systems via XML::RPC.
The XML::RPC server on the remote system runs local command via perl wrappers.
These wrappers are now returning raw command output, but my next step is to have
them convert it first to XML and then return it, where it can be stored in a DB
(I use DB2) and/or processed by AxKit. I decided to go this way so I could
delegate the customization of the local wrappers to other admins, because our
site uses so many different platforms (AIX, Sun, linux, BSD, all stripes of
Windows, OS/2, AS/400, OS/390, MacOS 9, MacOS X, etc etc). So far I've only been
monitoring and reporting disk usage, just to get up and running.



Bill



Re: Non-web use for Apache/mod_perl

2002-03-20 Thread Drew Taylor

Have you tried Postgresql? It's a free, fast, ACID compliant database. I 
have it compiled  running within a few hours, not knowing much of anything 
about it before hand. From what I've read the speed is comparable w/ mysql 
for most applications.

Drew

At 12:40 AM 3/21/2002 +0100, Bas A.Schulte wrote:

To handle a large number of concurrent transactions in a transaction-safe 
environment without me having to worry too much about concurrency issues 
and referential integrity I will slowly move to Oracle. $dbh-do('LOCK 
TABLE USER, INSTANCE, APP_DATA') just plain sucks unless you want to 
create a very large distributed *single-user* system running on multiple 
machines.

==
Drew Taylor JA[P|m_p]H
http://www.drewtaylor.com/  Just Another Perl|mod_perl Hacker
mailto:[EMAIL PROTECTED]  *** God bless America! ***
--
Speakeasy.net: A DSL provider with a clue. Sign up today.
http://www.speakeasy.net/refer/29655
==








Re: Non-web use for Apache/mod_perl

2002-03-20 Thread Bas A . Schulte

Hi,

On Thursday, March 21, 2002, at 12:57 AM, Drew Taylor wrote:

 Have you tried Postgresql? It's a free, fast, ACID compliant database. 
 I have it compiled  running within a few hours, not knowing much of 
 anything about it before hand. From what I've read the speed is 
 comparable w/ mysql for most applications.

 Drew

 At 12:40 AM 3/21/2002 +0100, Bas A.Schulte wrote:

 To handle a large number of concurrent transactions in a 
 transaction-safe environment without me having to worry too much about 
 concurrency issues and referential integrity I will slowly move to 
 Oracle. $dbh-do('LOCK TABLE USER, INSTANCE, APP_DATA') just plain 
 sucks unless you want to create a very large distributed *single-user* 
 system running on multiple machines.

I kinda was afraid about people getting excited about my RDBMS remarks 
which really is a subject in itself ;)

I have zero personal experience with Postgresql even though I've read 
good things about it so that ruled it out for a project with a very 
tight time frame. And I just happen to really, really like Oracle so 
unless the application generates some real money, I will probably always 
go far Oracle.

Regards,

Bas.