in reply to Jakarta Blues: Are Java Wrappers for Perl Practical?


Have you taken a close look at jakarta?
It is actually apache.

I don't think you should attempt to write any wrappers (there's definetly an easier way). Either consult the jakarta website and mailing list on how to configure jakarta to run perl (it'd probably include just editing one of the .xml in the /conf directory, probably server.xml), or just run a regular instance of of apache along with jakarta, and the regular apache will handle your perl stuff, and pretty much anything not contained in your jakarta document root, and jakarta will handle everything else. You can probably just run mod_j (something something, the apache mod plugin for java) from your regular apache server, and have your cake and eat it too. (perl conf's all taken care of, edit httpd.conf, point it to server.xml, load up the mod, and you're all set).

My point being, wrappers you have to write from scratch, and things can go wrong (plus you have to deal with security, and java %^).

It's easier to get 2 servers up and running. I've done it on my machine (granted it's win 98), even though I can't even try to run tomcat(i mean jakarta, i mean jakarta-tomcat, whatever) as a service, I've had success running the servers side by side. I also haven't had luck loading up the mod_j (something something), but I just didn't wanna use the module that bad (I got it to execute my java, I don't care how).

update:
Migrating to a java based website does in no way mean bye-bye perl, nor does it say helloooo wrapper. (that was funny ;-^)

As for the advantages of perl-2-java-bytecode, I've seen something, but I can't find it now. But I figure the only advantage (if the bytecode is as good as if it was compiled from java) is that it'd be executed like java, including all the memory hoopla that carries. This of course will slightly dent your development time of perl scripts.

Another thing to consider is the architecture of java programs, and packages for that matter. What are the consequences of compiling a perl script, which (for example) uses modules like CGI, DBI, and HTML::Template, to java bytecode.

Are you going to be compiling 500K java bytecode files for a 50k perl script?

Are you going to compile CGI and DBI to bytecode separately?

Are you going to add a java wrapper, and all it entails (like the memory managment), on top of the overhead of running perl scripts the way they normally do?

And what about mod_perl for example (or Fast CGI)?

If you want perl, run perl. If you want java, run java.

 
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void

perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

  • Comment on (crazyinsomniac) Re: Jakarta Blues: Are Java Wrappers for Perl Practical?