Monday, January 21, 2008

Less is More

Like most people, over the past 20 years I have amassed quite a collection of books that I find difficult to part with but will rarely open, if ever. I guess I have been saving them for that one special day when I'll thank my lucky stars that I held onto these books forever and shipped them all over the U.S., going wherever I have lived.

Well, those days are over. My personal goal is a "less is more" lifestyle (or as my brother says, "the more you own, the more owns you"). All of these books will be donated and hopefully someone can either read them or the recipient of the donation can sell them for some money. I've discovered books that I borrowed long ago, I've discovered books that I obviously must have "borrowed" from my high school (which I'll have to return), and I came across a host of computer books from my days at school and early in my career. Although many of these books taught fundamental concepts that apply to today, it's almost laughable how out of touch some of them are with today's technology:
  • Assembler Language Programming for the IBM System/370 Family by George Strubel
  • File Management Techniques by Billy G. Claybrook
  • Pascal Plus Data Structures by Nell Dales and Susan Lilly
  • Data Structures Using Pascal by Aaron M. Tenenbaum and Moshe J. Augenstein
  • Programming in Ada by J.G.P. Barnes
  • LISP by Patrick Henry Winston and Berthold Klaus Paul Horn
Oh yeah, I got plenty of use out of that LISP book. But don't laugh at that Ada book. Ada heavily influenced the design of Oracle PL/SQL.

Oracle HTTP Server, Apache 2.0 and connection pooling

Three years ago, at the Deutsche Oracle-Anwendergruppe in Mannheim, a customer from a large German manufacturer asked me about the availability of Oracle HTTP Server based upon Apache 2.0. They had already standardized on WebSphere based upon Apache 2.0, and they did not want to support both Apache 2.0 and Apache 1.3 configurations. Certainly, a reasonable request.

Within a year, Oracle released a version of the Oracle internet Application Server based upon Apache 2.0. Most Apache modules delivered with iAS were usable in an Apache 2.0 environment. But the most glaring omission was mod_plsql, which was not ported to Apache 2.0 and still required Apache 1.3.9. To this day, I'm still baffled by the decision to not port mod_plsql at that time.

Fast forward to Fall 2007, and with the Oracle Database Release 11g distribution is something called Oracle HTTP Server (Apache 2.0) (10.1.3.3.0) for Linux x86. This is the version of Oracle HTTP Server that is based upon Apache 2.0 and has a supported version of mod_plsql. At last!

One of the benefits of Apache 2.0 is that it supports various Multi-Processing Modules. You can choose to either use the legacy process-based (prefork) architecture or the multi-threaded (worker) architecture. One of the benefits of using the multi-threaded implementation with mod_plsql is that it supports a true database connection pool. In the previous implementations of mod_plsql on Oracle HTTP Server on Linux, there is one database connection per HTTP Server process. There really isn't any "pool". But in the multi-threaded implementation, there is a database connection pool that is shared among all threads of a child process by mod_plsql.

The size of the database connection pool cannot be adjusted within mod_plsql. If N concurrent requests require database connections, then N connections will be created. If a connection is idle for more than X minutes (governed by PlsqlIdleSessionCleanupInterval), it is cleaned up. Indirectly, the Apache configuration for maximum processes and maximum threads defines the worst case peak value for possible database connections.

So I downloaded this thing called "Oracle HTTP Server (Apache 2.0) (10.1.3.3.0) for Linux x86", installed it, configured it, and thought I was good to go. But I examined the number of processes running on Linux, and I also examined the number of database connections, and I didn't notice anything different. I believe the default was set to the multi-process module, simply for backward compatibility reasons.

MetaLink Note 299125.1 gives instructions how to configure the multithreaded MPM in Oracle HTTP Server/Apache 2.0 (without recompiling). The relevant portion of this note:

SWITCHING FROM PREFORK TO WORKER
--------------------------------

- Edit opmn.xml and find the section which defines the HTTP Server:

<ias-component id="HTTP_Server">
<process-type id="HTTP_Server" module-id="OHS2">
<module-data>
<category id="start-parameters">
<data id="start-mode" value="ssl-disabled"/>
</category>
</module-data>
<process-set id="HTTP_Server" numprocs="1"/>
</process-type>
</ias-component>

- Add start parameter "mpm":

<ias-component id="HTTP_Server">
<process-type id="HTTP_Server" module-id="OHS2">
<module-data>
<category id="start-parameters">
<data id="start-mode" value="ssl-disabled"/>
<data id="mpm" value="worker"/>
</category>
</module-data>
<process-set id="HTTP_Server" numprocs="1"/>
</process-type>
</ias-component>

and save this change to the opmn.xml file

- Execute "opmnctl reload"

- Stop Oracle HTTP Server and start it up again (just "restart" will not suffice)
To verify that Oracle HTTP Server is really using the "worker" or multi-threaded MPM, examine the output of the process listing "ps -ef" on the server operating system. If you see one or more processes named "httpd", then you are still running the "prefork" or mulit-process MPM. If you see one or more processes named "httpd.worker", then you are indeed running the multi-threaded MPM of Apache 2.0.


* Oracle HTTP Server on Windows has always been multi-threaded.

Stand back, OraNA. Here I come.

Sunday, January 20, 2008

It's too cold

I couldn't help but notice this one on My Yahoo this morning:





For those of you who hail from outside the U.S., this would be:


I'm tired of the cold. I'm tired of living in the cold. Although I've spent the majority of my adult life in Dublin and Powell, Ohio, I've also lived in Naperville, Illinois and Moorestown, New Jersey. Guess what? They're all very cold in the winter.

I've always justified it by saying that I am able to relish the full four seasons in a year and also have a white Christmas. Better yet, given the many things there are to like about Central Ohio (well educated and congenial Midwest people, very reasonable cost of living, safe, good schools, not crowded), I've often said that it's much better for me to travel on business/pleasure to these warmer destinations, just for a vist. Well, the older I get, the more I realize that my time is limited and I have this all backwards. It would be much better to pay the money, live in a smaller place, and just exist in an environment where you can get outside and truly live all the time.

Saturday, January 19, 2008

ODTUG Kaleidoscope 2008

As luck would have it, my abstract "Go Global with Application Express!" has been accepted for presentation at ODTUG Kaleidoscope 2008. I'm quite happy about this because:

1) I'm covering a topic that I believe is relevant to many people, whether they realize it or not. If it isn't today, it will be eventually. Europeans typically have to design and support multi-lingual and multi-locale applications (those poor Swiss get hit the hardest), it's common throughout Asia, especially in China with the support of Simplified and Traditional Chinese, and the requirement to develop these types of applications will only continue to grow in America.

2) There should be a plethora of sessions on Application Express, once again. Some of the ones that the committee just "couldn't bear to turn down" include Patrick Wolf, John Scott and Dimitri Gielis. The ever-growing APEX community will be there.

3) I love crawfish.

See you in New Orleans in June.

Monday, January 14, 2008

Tag backlash

It's interesting to note the backlash against this game of blog-tag that originated here. Some have said that this has polluted the Oracle news aggregators, and you know what? They're right.

Granted, when Carl told me that I was tagged (and after he explained it to me), I thought it was rather sophomoric, especially given the looming APEX 3.1 milestones and all the other commitments on my time. But I have no remorse for posting my 8 boring things, simply because I think there has to be 0% chance my minuscule and meaningless blog has made it into an Oracle news aggregator. So I have not contributed to the pollution.

Thursday, January 10, 2008

What you never knew (and probably never want to know)

Okay...first of all, I'm not an active blogger (obviously). How I became embroiled in this BlogTag business is still beyond me. It's ultimately due to Flavio. Carl Backstrom didn't even know I had a blog until our buddy Flavio called me out. I'm sure Tom Kyte would find this "game" completely annoying and would refuse it in a second. I'm sure Carsten Czarski would sure enjoy this, as well as my good friend Sergio Leunissen.


So here are the most inconsequential 8 things I could conjure.
  1. I'm the seventh child of the seventh child. Don't worry, there's nothing magical or spiritual about this. My mother was the seventh child, so you only need to worry about the seventh son of the seventh son, so says Iron Maiden.
  2. I'm second-generation American. My grandparents were immigrants from Poland and Germany and came to America with literally nothing. My brothers and sisters and I bought a plaque at Ellis Island in their remembrance.
  3. I hardly ever read novels of fiction, maybe one book a year at best. My wife, in-laws and father are all avid novel readers. It's bizarre, but I just don't find it compelling. Don't think I don't read, because I do all the time. But my reading list is usually www.opinionjournal.com (every day), Barron's, Money Magazine, Kiplinger's, and occasionally the computer trade magazines.
  4. I wouldn't be at Oracle if it weren't for Tom Kyte. I worked with Tom and a bunch of other excellent individuals (Chris Beck, Tim Taylor, David Bliss, Don Bostrom, George DeGraaf, among others) back in 1990-1991. They worked for a subcontractor. I worked for a subcontractor to the subcontractor. Those were the days when we were changing the world, and when very few people ever heard of SGML.
  5. My most memorable job was my one at McDonald's in high school and during my summer breaks from college. You might laugh at this being a favorite job, but I learned a great deal. It is from the general manager there (Lou Stallman, wherever he may be) who taught me respect and courtesy for customers and co-workers alike, as well as the quality to take pride in all you do and to always do it well. And there was never any standing around or goofing off there, as they often said "if you have time to lean, you have time to clean."
  6. I spent the summer of 1985 in Quantico, Virginia at the U.S. Marine Corps Officer's Candidate School. My goal was to become a Marine Corps aviator. I got in better shape during that summer than anyone normally could in an entire year. And there was no fantastic array of exercise equipment, it was always go-go-go. This was another one of those value-forming experiences, where I truly learned what discipline was all about. As luck would have it, that's the summer that my uncorrected vision went South, my fantasy of making it into Aviation School vanished, and I did not return to OCS the next summer (well, this was really one of a number of reasons).
  7. I started off at Ohio State in Electrical Engineering. I went through class after class of mathematics, did fairly well at it, and when I was done and ready to start the electrical engineering coursework, I thought "whew, finally done with all that math". Guess what? Electrical engineering is nothing but math. I remember calling my father and explaining to him that I wished to switch to computer engineering and get out of electrical engineering. My Dad (who always wanted an engineer in the family) calmly explained to me that I was making a mistake, and that there wouldn't be any money in that. Funny, huh?
  8. I am very competitive, probably too much so. I love to win, I hate to lose. I love to gamble at many things. I enjoy betting, from football games, basketball games, Super Bowl pools, March Madness pools to craps and blackjack.
This is exactly why I don't blog. I started this two days ago and off and on I finally finish it. Maybe one of these days I'll actually write something about Application Express.