Tuesday, August 18, 2009

Thoth Gateway: mod_plsql replacement for Microsoft IIS

Take a look at this screenshot:

Yes, that's right... Oracle Application Express running on Microsoft's Internet Information Server (IIS)! In-between trips to the beach this summer, I decided to write a PL/SQL gateway module for IIS. The result, called the Thoth Gateway, is now available as open source.

This means that the deployment options for PL/SQL web applications are now:

  • The Embedded PL/SQL Gateway (DBMS_EPG), which is a webserver built into the database itself
  • The Oracle HTTP Server (OHS), which is based on the Apache codebase, with mod_plsql
  • Java-based web servers (such as Tomcat, WebLogic, and others) with the open-source DBPrism plugin, or the upcoming, Oracle-supported Apex Listener
  • And now, Microsoft Internet Information Server (IIS) with the Thoth Gateway module

The Thoth Gateway is implemented in C# as an ASP.NET HttpModule and uses the Oracle Data Provider for .NET (ODP.NET) to communicate with the database.

The Thoth Gateway supports almost all of mod_plsql's features, and even adds a few more (such as CLOB parameter support for values over 32K). Check out the project page for the details.

It's also worth noting that the Thoth Gateway, being a volunteer project, is not officially supported by Oracle in any way. But at least now you have the option of using Microsoft's IIS as the web server for Oracle PL/SQL web applications. In fact, you can use any of the above listed gateways side-by-side for the same PL/SQL web application (all on the same box, or on different physical servers).

I am very interested in feedback if you decide to go ahead and try the Thoth Gateway, so feel free to add comments to this post about any bugs or problems you encounter, or use the project's issue tracker (adding issues requires a Google account).


Arave said...

Hi Morton,

Do you have any thoughts on which configuration of the 4 listed has the best performance?


Gary Myers said...

There is also an Open Source replacement for mod_plsql for Apache called modowa.

Doesn't run Apex though.

Morten Braten said...

@Todd: I believe DBMS_EPG is the slowest of the four, since it must serve images and other static files from the database rather than from the filesystem, thus resulting in more work for the database.

The Thoth Gateway implements many of the same performance-improving techniques as mod_plsql, including procedure metadata caching, configurable fetch buffer size and bind bucket lengths/widths, and connection pooling (via ODP.NET).

I might run some tests with JMeter to get some statistics for the different alternatives.

Patrick Wolf said...

Hi Morten,

really cool!

Just a quick question. Does your gateway also map some of the CGI environment variables? For example if-modified-since to
HTTP_IF_MODIFIED_SINCE and all the other HTTP_*. That's done by mod_plsql and we use the mapped ones in the APEX engine/OWA toolkit.


Morten Braten said...

@Patrick: Yes, in ASP.NET terms the (full) "ServerVariables" collection is passed to the OWA toolkit, which means that owa_util.get_cgi_env can return the value of various headers such as HTTP_ACCEPT, HTTP_ACCEPT_CHARSET, HTTP_ACCEPT_ENCODING, HTTP_REFERER, HTTP_USER_AGENT, etc.

Prabahar said...

Hi Morton
I am trying to configure Thoth Gateway in windows 2003 II2 6... I am having problem connecting to APEX screen..It seems gateway is generating the session but getting error in IE 8 (Page can't be found)..
URL generated (http://golfrorat1/ThothGateway/apex/f?p=4550:1:87578369594101)

Would you plz able to throgh some ideas how to proceed further


Morten Braten said...

@Prabahar: Set the Log4Net log level to "DEBUG" and inspect the log file, and/or set the "ErrorStyle" DAD parameter to "DebugStyle" and see what happens.

- Morten