Wednesday, August 08, 2012

Moving to the Oracle APEX Listener

Are you already using the Oracle APEX Listener in front of Oracle Application Express (APEX) or are you still using Apache with mod_plsql as your webserver (or the EPG)?



This year I started to give a presentation why I believe you should move to the APEX Listener.

If you missed my presentation at OGh, ODTUG or UYOUG, I'll give this presentation again in Brazil and Santiago as part of the LA OTN Tour, at Oracle Open World (OOW) and at the UKOUG.

In the presentation I go briefly over the pros and cons of Apache with mod_plsql, the Embedded PL/SQL Gateway (EPG), but spend most of the time on the APEX Listener (hence the title).
After OOW I'll publish a whitepaper about this topic as well, so you can read it in full detail and have some test cases you can try in your environment.

Nevertheless I already wanted to blog about some points of my presentation and whitepaper, especially in the light of APEX 4.2 and the upcoming 2.0 version of the APEX Listener.

Background; before I wanted to move off Apache with mod_plsql (to the APEX Listener) there were two important parts I wanted to be sure of:

  • is the APEX Listener as reliable and performant as Apache with mod_plsql and
  • do I get at least the same features (or more) with the APEX Listener compared to the others
For the first point I can say we successfully run the APEX Listener now for 1,5 year in different environments. To name two; one environment is using Glassfish and the APEX Listener on top of Oracle Linux on the hardware of a customer and another one is running on our own server at Amazon, Oracle Linux and Glassfish with the APEX Listener with an Apache reverse proxy in front of it.

JMeter configuration

Performance wise I show in my presentation and whitepaper how you can test your own configuration with JMeter, so you have real metrics. Depending the test case I ran on my system, I got different results, but in general the APEX Listener was as fast or faster than Apache with mod_plsql.
Again you don't need to take my worth for granted, but test it out yourself in your environment by simulating your load with JMeter. How to do that you can read in my whitepaper or in this excellent post of Chris Muir (note that in APEX 4.1.1 you need to add some extra parameters to get it to work which are not described in the blog post).

On the second point; the features of the APEX Listener compared to the other choices, I can be short.
The APEX Listener will give you more features... even more interesting... if you are not using the APEX Listener from APEX 4.2 onwards, some functionalities for ex. RESTful Services won't work for you.

RESTful Services


At the moment APEX Listener 1.1.4 is the production version, but a few days ago APEX Listener 2.0 (EA) was released. You can read more about this release on Kris' blog. In my next post I will also  highlight the biggest differences between APEX Listener 1.x and 2.x.

Hopefully by this post I hope to trigger you to look at the APEX Listener a bit closer in the next weeks and months if you are not using it yet... 

16 comments:

Noons said...

WOW! How timely is this! Thanks Dimitri, much appreciated!

We're about to chose an alternative to mod-plsql in Apache due to the difficulty in getting it after 10gr2.
The Apex Listener was one of the options considered recently but we knew of no one using it.
Now I do!
Is there any chance of getting hold of your presentation or better yet, having you do a webcast presentation for our SydneyOracle Meetup user group?
I'd love the opportunity to present this to them!

Belinda Chisholm said...

Are there any plans for apex.oracle.com to use the Apex Listener in the near future?

Belinda Chisholm said...

Will apex.oracle.com be using the Apex Listener in the near future?

Dimitri Gielis said...

Noons, sure happy to do a webcast, we just need to see at timing...

Belinda, APEX 4.2 EA is using the listener, apex.oracle.com I don't know, but when 4.2 is installed there, it will for sure.

fateh.cis said...

Hello,
Thanks Dimitri,
If we deploy the listener on Glassfish server.
Then how can we map different internet domain names to different APEX Apps ???
I tried to create virtual servers but to no avail.

Best Regards,
Fateh

Matthias Hoys said...

Interesting post, Dimitri. We are currently migrating from APEX 4.1 with OHS to APEX 4.1 with GlassFish 3.1.2 and the APEX Listener. We had some problems where the APEX Listener would cause a hang when the caching folder was removed, I blogged about it here: http://matthiashoys.wordpress.com/2012/08/07/removal-of-apex-listener-cache-folder-causes-hanging-of-apex/

Otherwise, very happy about the performance, but I must add that GlassFish in combination with APEX Listener uses more memory than OHS with mod_plsql, especially if you are using a separate GlassFish server instance for your APEX deployment (which I would recommend).

Dimitri Gielis said...

Fateh.cis; to route your domain to different apps you have a couple of choices:
- the APEX Listener 1.x doesn't support multiple routings yet, but
- you can do it with a plugin in Glassfish
- or we use an Apache Reverse Proxy in front of our Glassfish so we can create Virtual hosts and redirects
- With the APEX Listener 2.x it will be possible to route the different domains to different APEX apps, so you don't need a plugin for Glassfish or the Apache Reverse Proxy

Buzz Killington said...

What about NTLM? Right now mod_ntlm works on Apache. I haven't seen a great solution for Apex Listener yet - what do you suggest for people who need Single Sign On but want to move to the listener?

Dimitri Gielis said...

Hi Buzz,

I don't really see it as Apache vs APEX Listener, but more mod_plsql vs APEX Listener.

The APEX Listener works on Glassfish and Weblogic so if you find a plugin for Glassfish and Weblogic you are ok or you can do it like us with an Apache Reverse Proxy in front of the APEX Listener (running on top of Glassfish).

Hope that helps,
Dimitri

jp kreps said...

Hi, Dimitri -

Thanks for your analysis. For years we've been running our Apex and htp.p generated web applications using mod_plsql on a 32-bit 10gR2 database and the OHS that accompanied it. We used mod_ntlm as our single-sign-on solution.

I've been trying to experiment with 64-bit 11gR2 and Apex 4.1 running against Apex 2 running on Glassfish 3. I've been unsuccessful at finding a replacement for mod_ntlm for our single-sign-on solution. Also, I understand that there are no Data Access Descriptors used with Apex Lister. But I haven't found any examples of how to set up the Apex Listener in a way that our applications can be configured to run against their respective parsing database schemas. In other words, how do you replace the DAD functionality in Apex Listener? We'd be grateful for any advice or reference sources that you can point us toward. Thanks!

Dimitri Gielis said...

Hi JP,

If you do your configuration like this:
DB -> Glassfish + APEX Listener -> Apache Reverse Proxy (+ mod_ntlm)

You can still use your current single sign on configuration. Concerning the DAD's in the APEX Listener; in 2.0 you configure the connection to the database. New in 2.0 is that you can configure multiple connections. With SQL Developer 3.2 you will find it a bit easier than doing everything command line.

Hope that helps,
Dimitri

sharad nagariya said...

Which one is better option and why?
1) Apex Listener + Glassfish
2) Apex Listener + Oracle web logic server
Point to compare
Cost
Deployment
efficiency

Dimitri Gielis said...

I'm not the right person to compare Glassfish vs Oracle Weblogic as I only used Glassfish so far.

For your points:
-) Cost; Glassfish has a community edition which is free. So hard to beat if you don't care about official Oracle support.
-) Deployment of an APEX application is identical, as your APEX app is basically metadata in the database.
Adding files on the webserver is kinda the same on both environment.
-) Efficiency is hard... I don't like to say this is more efficient than that, I think it depends your use case, application, load etc. So I always recommend to do test cases and some load testing (with JMeter for ex.).
Most efficiency in APEX applications is not on the webserver, but in the database though.

Hope that helps,
Dimitri

Brian said...

Does APEX Listener support passing CGI variables from Apache to the PL/SQL environment like mod_plsql did using the PlsqlCGIEnvironmentList parameter in the dads.conf file?

Luis said...

Hello Dimitri,

Nice post and nice presentation too (http://2012.ukoug.org/default.asp?p=9339&dlgact=shwprs&prs_prsid=7046&day_dayid=62), thanks!

I am trying to configure the PL/SQL validation, like: http://krisrice.blogspot.com.ar/2013/01/apex-listener-plsql-validations.html but my function is never executed!!!

Any advice on this?

Thanks in advance,

Luis

Luis said...

Hello Brian,

You can add your own custom headers extending HttpServletRequest. Use this class in a filter and add it to the apex.war.

Hope it helps,

Luis