Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, david.

Asked: March 18, 2001 - 8:58 pm UTC

Last updated: May 07, 2013 - 2:55 pm UTC

Version: 9

Viewed 10K+ times! This question is

You Asked

Why/when do we need an application server? Can't we just have a database server and create application using, let's say, Microsoft Visual Interdev?

and Tom said...

The main #1 purpose of an application server is to avoid having to deploy an application to the desktop.

the major failing of client server is that after I build an application, anyone who wants to use it must install it. Take your example above, just use MS visual interdev. Well, to have an Oracle application, you also need the Oracle client. So, now you have to install your app and make sure the Oracle client is there. That desktop probably needs to run other applications other then yours as well. They might need Oracle8.0 client support, you might need Oracle8i client support. In fact, you might need version 8.1.6.2 and some other application needs 8.1.5. That client might end up with 2, 3, 4 or more installs of Oracle software -- each with their own configuration files and so on. Couple that with the fact that each machine in this PC environment is a "unique" machine. Each will experience a unique glitch, a DLL conflict, something.

Now, think about doing that on 100 machines, or 1,000, or 10,000 or more. Not very pleasant. Especially when you discover a bug in your developed application. Now you have to track down the 1,000 users who have installed your application and tell them about it. They have to get the patch and upgrade it.

with an application server, you host your application there. people run it on that machine. You install it on typically one and maybe a couple of machines. If you find a bug, you fix it -- thats it. There are no DLL conflicts, no install glitches, nothing like that at all.

That is the #1 motivation behind an application server. It is not performance related at all -- it is 100% "manageability". I remember within Oracle we tried to roll out some sales force automation software in 1994 (right before the web). It was an utter failure. Try to get 10,000 sales reps to install and configure a complex piece of software and then support them on it. By the time the 3rd patch was shipped out, many had abandoned it already. Tired of spending more time installing and configuring then selling. Along comes the web and now the applications "just work". You goto the site and there they are. No muss, no fuss. I get a new PC and my applications are all still there, no reinstall, no hassle.

A note to Denise below...

Agreed, but I never mentioned the name of a product -- just the technology. The point is "use an app server". Use anyone you would like, use the one that has the feature set you need. You'll achieve to goal of not having 10,000 desktops to deploy to.

I will point out however that you might want iAS built on Apache or any app server OTHER then Microsofts if you believe that there is a chance that in 5 years, Windows won't be what it is today. Portability and choice of OS is something to be considered in a huge way. 5 years ago, no one ran windows for real. 5 years before that, Unix was just making headway. 5 years before that VMS was doing what only mainframes did before. 5 years before that......

Rating

  (186 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Helena Markova, March 19, 2001 - 2:52 am UTC


david, March 19, 2001 - 3:12 am UTC


But, why Oracle's Application Server?

Denise Overstreet, March 19, 2001 - 8:45 am UTC

Microsoft has their own application server. You could install MS's app server and develop in MS Visual InterDev and deploy as web-enabled and do all the things you have listed.

Why would you choose Oracle's Application Server? Let's talk about connection to the database, integration of tools, etc.

Thanks.


Good Questuion and very useful answer.

Gururaj, March 19, 2001 - 12:59 pm UTC

I am surprised to see 3 stars from David. Was he expecting
something else ?

Now iAS is finally getting mature !

Andre Whittick Nasser, March 19, 2001 - 2:58 pm UTC

I used to work for a big bank, and we didn't choose OAS (app. server's old version) because it was not "mature" enough. It seems Oracle's focus was too much on the RDBMS. I suppose 9i's integrated RDBMS/iAS support is finally offering a very reliable and consolidated product after all.

very Useful

Pertisth, January 12, 2002 - 1:07 am UTC

I Think this is better ,effective and best application server for deploying Web based application.. and this has long long future.

8i IAS

mo, November 12, 2002 - 7:19 pm UTC

Tom:

For an oracle web app developed using stored procedures and using mod_plsql and 8iIAS:

1. A manager says that we are not fully using the capabilities of the J2EE platform such as Session Management, Security, Persistence. Is it possible to use these here for a pl/sql app? Are not those only for java based apps.

2. Is it possible to avoid passing the too many parameters from one procedure to another through submit or URL.

3.Is it possible to place the PL/SQL code on the app server rather than the database? If yes, is there an advantage to it?

4. Would PSP eliminate the need to pass parameters and allow to use J2EE functionality?

5. Would JSP be a better choice to fully use the app server capabilities?
Would you still be doing submits and parameter passing when you use JSP same way.

6. Is it true that when you use J2EE app server you create a session and all
information is traced/saved in that session so you do not need to keep passing
infor from one page to another?

THank you






Tom Kyte
November 13, 2002 - 12:47 pm UTC

1) you have session managment, security and persistence already. J2ee is just a different way.

My question to them would be "so?"

2) does not compute. there is no such thing as too many or too few - there is only "just right" and just right is the set of parameters necessary for your application to function

3) no, no and no

4) no -- you are comparing apples and toaster ovens.

5) no, yes, maybe, sort of, not really, sometimes.

6) and you can easily do the same with PLSQL. It is true that with J2ee you'll be buying tons more hardward, app server farms and have more moving pieces (complexity) as well. Now what?

asktom is built using plsql -- you can see my pages -- I do not pass hundreds of things from page to page -- I use this thing called a database to store a session state. databases are built to store and retrieve data, we are pretty good at it.

8i IAS

mo, November 13, 2002 - 1:26 pm UTC

Tom:

As a followup:

1. Where do you have session managment, security, and
persistence using PL/sql? is it in database or pl/sql web toolkit (i.e. owa_sec)?

2. Is this correct?
It seems J2EE is only for java applications (servlets, JSP, beans), and you can only use the 9iAS J2EE features if you are developing using those languages?

3. how are you handling parameter passing in asktom? when you have a form and you submit you still have to pass it to an insert procedure? how can you avoid that using a table?
do you have any examples anywhere on doing this?

4. Is it true that industry is heading toward J2EE development because it is an open standard. You keep saying oracle power is it is portable and you do not have to tie yourself to an O/S (I agree), but also is not the same true for JAVA apps. It is portable to any O/S and any database while PL/sql will need an oracle database?

Thank you,


Tom Kyte
November 13, 2002 - 2:18 pm UTC

1) the database is all about persistance -- it is WHAT THEY DO (think about it -- define persistance for me).

security -- that is what we do -- think about it -- "grant", "revoke", fine grained access control etc etc etc.

session managment -- it is called a database table by some (that is what I use, simple table with state and a session id). Others use the stateful model provided with mod_plsql -- i never do and do not recommend it (scales not as well, scales like j2ee does -- meaning "more hardware"

2) J2ee does stand for "java" -- servlets, jsp's, beans are all part of j2ee. So, umm, yes, if you want to use j2ee -- you use java (thats the language) the other things are "techniques" or implementations if you will.

3) don't know what you mean.

4) no comment

8i IAS

mo, November 13, 2002 - 2:29 pm UTC

Tom:

Thanks for the great clarification:

1. What I meant by previous 3 is that, How do you handle the parameter passing the the asktom app. You said you save it to a table rather than pass it. I am trying to do the same because I have so many procedure passing a lot of parameters. If I have an HTML form and user submits it to another procedure I pass all parameters to 2nd procedure and I isnert it into table. I can not think of how to do it without declaring all these parameters in the 2nd procedure. How do you do it?

2. Surprised you did not comment on J2EE versus pl/sql. I was trying to get a convincing answer when someone suggests in a meeting that all apps should be developed using J2EE because it he heard it is the future and the way to go?

Thank you,

Tom Kyte
November 13, 2002 - 3:02 pm UTC

1) read
</code> http://docs.oracle.com/docs/cd/A97329_03/web.902/a90855/feature.htm#1005765 <code>


2) thats just the stupidest reason for making a technical decision don't you think "I heard it is the future and the way to go..."

It is just too broad of a topic to get into the religous war it would turn into on this forum. Ask me about the database -- i'll answser that. Ask me what technology you should use to build your applications -- I'll take a pass



Hmm, some things to consider though

do you have a core of experienced j2ee programmers sitting with you? (it takes a while to learn you know)

Does your company have any training or experience with it?
Can you articulate the explicit benefits you will derive from it?
will it cost you less to develop with it?
do you need something as big as it is?

Train themself

A reader, November 13, 2002 - 3:30 pm UTC

Hi, Tom,

I agree with you, basically, the people choose the most
"advanced/or popular" language is ready for train themself
and benefit from the project development. I don't think
they are really good at the new tech but only to
get some experences on that for the new job in case
some future needs. This is just like how many good programmers out there who are really good at combining JDEV 9.0.3 and BI beans etc.? Look the oracle forum and then you will see. It needs time to fix the bugs itself and experience themselves to get familiar with the new tech.
But get into the new tech is always a good thing to
everybody, period.

Thanks


Tom Kyte
November 13, 2002 - 6:01 pm UTC

"But get into the new tech is always a good thing to
everybody, period."


Hah. disagree... maybe good for resume padding, maybe good for computer science experiments. Good to get something done now, today, fast? nah.

application server

mo, November 13, 2002 - 9:36 pm UTC

TOm:

1. can you run pl/sql web app using other application servers like websphere or weblogic or not?

2. For J2EE development, is not all you need to know how to code in JAVA?

THank you,

Tom Kyte
November 13, 2002 - 11:23 pm UTC

1) sure, if you write mod_plsql for them.

2) no, you need to know a ton of stuff. That would be like saying "for Oracle development -- all you need to know is SQL" (you have my book -- you tell me whats wrong with that statement -- what other knowledge might you think you would need to have in order to program CORRECTLY against oracle)

Excellent

Jim, November 13, 2002 - 11:49 pm UTC


IAS

mo, November 14, 2002 - 7:43 am UTC

Tom:

1. For oracle programming, you need to know SQL and plsql.
It sure helps to know the packages oracle provides and the
architecture of the database but it is not a must. FOr J2EE development, you may just need to know JSP and you can develop a web app according to J2EE standards.

2. From your discussion the only advantage I am seeing out of J2EE development is that the application is portable to all O/S and works with all J2EE compliant application servers. You can have the app work with sql server, informix, sybase and windows/unix/linux.

PL/SQL web app (my preference) is fast and easy but you are stuck with oracle application server and oracle database.

Correct?

3. Why in your book you do not talk about oracle web technologies?

Thank you,

Tom Kyte
November 14, 2002 - 7:12 pm UTC

1) read J2EE books -- then report back. See you next year

2) Hmm, lets see, if the database is Oracle and you develop in the database guess what? You are portable to even MORE OS's...

stuck is a relative term mo.

3) cause it was a book on databases -- did you count the pages? (you don't have to, just goto the last one). 1265 of em, had to draw the line somewhere don'tcha think.

all application server java developer ever need is tomcat

Mikito Harakiri, November 14, 2002 - 1:22 pm UTC

I never felt I need anything beyond tomcat and JDBC connection to the database. All these Enterprise Beans, eXtremely Messy Language, SOAP, etc are for SQL challenged developers only.

app server

mo, November 16, 2002 - 12:50 pm UTC

Tom:

let us say I went to a company who uses oracle but use a websphere or weblogic or IIS application server. A lot of them do.

Now do I have to let them give up theri app server to develop a PL/SQL based app or they can just continue on and I can install mod_plsql on same or other server and it will work.

THanks,


Tom Kyte
November 16, 2002 - 1:11 pm UTC

if they have oracle, they have mod_plsql running under apache (it is right there with the database) -- that is what they would use.

ias

mo, November 16, 2002 - 1:24 pm UTC

1. OK so they do not need to buy oracle 9i or 8i IAS and they can continue to use their websphere or other app server for all other apps without a problem.

am i correct?

2. I always wondered where do all the packages for the web toolkit come from? They say it is installed with the applicatin server but it is stored in the database? Does it get installed in the database whe nyou install IAS?

Thank you

Tom Kyte
November 16, 2002 - 2:58 pm UTC

1) they need mod_plsql -- they need apache in order to run mod_plsql.

2) 817 and up -- in the db, with the db, at db install time. before that with ias, oas

IAS

mo, November 16, 2002 - 3:51 pm UTC

Tom:

1. If I am correct, Apache is an http web server (listener) and is not an application server (more softwware to host apps). I think this is the standard web server used by websphere and weblogic anyway.

So reagrdless what app server they use the listener will forward the URL request to mod_plsql and run the procedure.

Tom Kyte
November 16, 2002 - 4:51 pm UTC

tell me -- is a web server an application server?
does an application server have a web server?
what is the line between the two?



IAS

mo, November 17, 2002 - 11:25 am UTC

Tom:

Well Here is my understanding of the two:

1. A web server is not an app server. It is basically an http listener that forwards browser requests to appropriate destination. You can have a static web site with static html files on a directory and all you need is a web server.

2. An app server includes a web server and other modules to host an a web application. Usually you need one when you generate dynamic content out of database.

Tom Kyte
November 17, 2002 - 1:20 pm UTC

what about modules? what are they? part of a web server or not.

I refuse to split hairs. most web servers today contain many/most of the attributes of an app server. I don't even bother trying to differentiate.

web server

mo, November 17, 2002 - 4:05 pm UTC

well are not web servers free while app servers are not.

If I do not need to host servlets, JSP, beans why do I need to buy oracle IAS. all I need is the free apache listener and the mod_plsql which is provided free by 8i database.

If I decided to build my app with servlets, then I MUST buy an app server.

Pay/Free has nothing to do with it.

Jer Smith, November 17, 2002 - 6:42 pm UTC

JBoss, Orion, Tomcat (if all you want is servlets/JSP), etc, are all free. Oracle 9iAS includes Orion (plus a lot of other stuff--check it out). And of course, if you want to be silly, there are plenty of places that'll still sell you a webserver.
:) You just need to pick your feature set and what it's worth to you.




J2EE (JSP ) vs ASP vs Mod Pl/sql vs PSP

Hrishy, November 18, 2002 - 4:12 am UTC

Hi Tom

This is a very interesting discussion..I am a DBA from the client server ERA and feel comfortable with pl/sql...but would love to get my hands dirty with web applications...i feel given my background i would like to narrow down my choice to mod-plsql and psp...which one is the easiest to pick up ..

b)Can PSP provide the same functionality as ASP or mod pl/sql (please excuse me if i am comparing modpl/sql oranges with apples psp)

regards
Hrishy

Tom Kyte
November 18, 2002 - 8:19 am UTC

PSP uses mod_plsql. mod_plsql is needed to run a plsql server page.

PSP is just like ASP or JSP but the procedural language is PLSQL instead of VB/Java

PSP and PL/SQL

reader, November 18, 2002 - 11:08 am UTC

</code> http://otn.oracle.com/tech/pl_sql/pdf/PSP_Best_Practices.pdf <code>

read here for. toc looks like:

WHAT IS PSP
WHEN TO USE PSP
Writing PL/SQL stored procedures directly
Writing PSP pages
HOW TO STRUCTURE A PSP-BASED APPLICATION?
Isolation of application logic.
Framework for your PSP pages
Using procedure invocation to include “pagelets
Exception handling
REUSE FUNCTIONALITY IN EXISTING PL/SQL WEB-BASED APPLICATIONS

somewhere in the regular docs for the pl/sql web toolkit it covers which way to go based on your situation also

I say go with pl/sql and if you really don't want to be bothered with coding up your html as a stored procedure, use one of the many tools that already do that, like webalchemy or even psp to create the procedure for you, and then take the source of that procedure and put it into your packages.

I didn't like PSP because it only allowed creation of separate procedures, not packages, which we know leads to all the dependency issues with procedures. Maybe I just didn't dig hard enough, but I think that is still the case.

psp is just a crutch for html challenged folks that want to use dreamweaver.
psp authors will defeat the purpose by including app logic in their pages anyway.

been reading j2ee books for awhile and still don't have all the architecture down, let alone how to build the kind of apps I can easily build in pl/sql and I know java already.

j2ee

Stu Charlton, November 18, 2002 - 3:05 pm UTC

J2EE is a set of APIs for abstracting core services like databases, web application servers, messaging, etc. Nothing more... Note I said *abstracting* not *ignoring*. If there's anything Tom's book has taught us, is that you can't ignore the details of what you're using, contrary to popular belief. Every server & platform is a bit different - J2EE provides a common set of interfaces to think about it, but it's only a starting point.

There's something to be said for abstraction over transparency. One enables evolvable systems that minimize baked-in-dependencies, the other is a pipe dream.

The way I tend to look at it is, do you prefer PL/SQL (Ada :) or Java as your language? Does it have the expressive power to handle the complexity of what you're trying to do? Java has polymorphism, and PL/SQL only recently added it. There are also a number of very interesting tools in the Java space for refactoring, etc. Both can do any job, but the question is -- which is more maintainable, or leads to higher quality software? This is a difficult question because "maintainable" and "quality" mean different things to different people.


Very interesting thread

Doug, November 18, 2002 - 10:23 pm UTC


Is Apps server a must for Web Applications?

Tony, November 19, 2002 - 12:42 am UTC

Is Applications server a must for web applications?
Is web server alone not enough? When to use/not use Appliaction server for web applications? We are planning to develop web application using JSP, iPlanet and Oracle. Do I have to use any apps server? Some people say App servers will slow down the performance. Please explain.



Tom Kyte
November 19, 2002 - 7:23 am UTC

depends on what/how you define an app server.

I clump web servers right in there (never really see app servers WITHOUT a web server).

In order to run a JSP -- you have components of j2ee in there -- people would say "well, thats an app server".


"some people say app servers will slow down the performance" -- that's a really comical statment don't you think? ask them "well, what'll run the application then?"

Is Apps server a must for Web Applications?

Tony, November 19, 2002 - 12:42 am UTC

Is Applications server a must for web applications?
Is web server alone not enough? When to use/not use Appliaction server for web applications? We are planning to develop web application using JSP, iPlanet and Oracle. Do I have to use any apps server? Some people say App servers will slow down the performance. Please explain.



Future of the OS

Tarry, November 19, 2002 - 6:51 am UTC

Tom,
Pretty rightly said about the come's and go's of hte OS's but why aren't companies/consumers willing to pick linux(say) as an OS?
I have heard that oracle will be penetrating the top and the middle market segment with linux solutions, so what stopping them even though it cost's nothing?

Tom Kyte
November 19, 2002 - 7:40 am UTC

who says they are not?

I work in Government Education and Healthcare here at Oracle.

Govt is adopting linux -- the FAA runs some fairly big stuff using 9iRAC on linux clusters for example. Lots of places in govt.

Education -- they are all over it.

Healthcare -- a little more conservative but starting to look at it.

heck the entire country of Japan is considering moving from windows to linux
</code> http://biz.yahoo.com/rc/021115/tech_japan_windows_1.html

see
http://news.com.com/2100-1001-965843.html <code>
for a recent convert.

I see it literally *everywhere i go*




Nice discussion!

Yogeeraj, November 19, 2002 - 8:45 am UTC

On there server side there is not doubt that Linux is invading the market!

However, on the desktop side there is still a long way to go....but it will come.

Regards

Attaboy/girl linux!!!!

Tarry, November 19, 2002 - 11:03 am UTC


linux

mo, November 19, 2002 - 10:08 pm UTC

Tom:

What is the advantage of using Linux over unix? Is it also a server and desktop O/S?

Tom Kyte
November 19, 2002 - 10:18 pm UTC

it runs on commidity hardware nicely. It is running on my laptop very nicely and my two desktops.

yes, there are server and desktop releases -- there is SO MUCH stuff about linux out there -- suggest you take a look around.

Farnaz, November 20, 2002 - 6:33 am UTC


Tom

Bill, November 20, 2002 - 12:06 pm UTC

do you have a favorite linux distro you prefer for running Oracle
I have run them under SuSE and been pretty happy

Tom Kyte
November 21, 2002 - 12:35 pm UTC

I've only used RH so to say I have a "preference" would be misleading as I don't have a wide variety from which to compare ;)

linux

mo, November 20, 2002 - 1:59 pm UTC

Tom:

What is commidity hardware??

Does it run on all servers (Sun, HP, IBM, DELL, DEC)?

Tom Kyte
November 21, 2002 - 12:37 pm UTC

stuff you can buy in a store, cheap -- interchangeable.


Great initial answer and discussion!

Robert, November 20, 2002 - 5:01 pm UTC

Thanks Tom!

For Mo...

Mark A. Williams, November 21, 2002 - 10:53 am UTC

From the Merriam-Webster online dictionary located at
</code> http://www.m-w.com/ <code>

Commodity:

b) a mass-produced unspecialized product

- Mark

Tom Kyte
November 21, 2002 - 1:15 pm UTC

now thats cheating -- thats my line ;)

hosting vb.net application on oracle application servers

ash, November 22, 2002 - 2:48 am UTC

Dear tom,
I wanted to know that will the oracle 9i IAS suuport a vb.net application. If yes then are there any imcompatibllity features?

Reagards,
Ash


Tom Kyte
November 22, 2002 - 7:27 am UTC

see
</code> http://technet.oracle.com/tech/windows/content.html <code>

for lots of information in that regards.

A reader, November 22, 2002 - 12:16 pm UTC

It is a very informative thread.

Can you please give your openion about which platform you would prefer for the application server? We are considering Report server and 9iAS on Unix and NT. We have Unix as well as NT resources. We have an existing report server on NT and so some people are interested to keep it that way. I want to know of there is any advantage of Unix which I can point out to them (like appache web server runs better on that etc etc.). If you could say a couple of lines on this I'll appreciate it. Thanks.

Tom Kyte
November 22, 2002 - 12:48 pm UTC

sorry -- platform agnostic there.

I have my personal preferences (things that end in x) but that is primary because I know that environment much more intensely then the windows one.

There is alot more choice with li|unux running on the same hardware as windows would as you can easily move about to other hardware platforms that windows just won't even touch.

Why do we need an expensive App Server

Srimal, January 21, 2003 - 3:30 pm UTC

Hello Mr Tom,

With 8.1.7 and now the newer releases of 9i, is it not acceptable to put in a good amount of Business Logic in the Database itself (rather than an App Server) and have a Web/App server just plainly host the pages for data input and display?

The reason for this question is the fact that these versions of Oracle are pretty powerful as to what they can do and if the application is database intensive, it would be rather prudent to have the work done by Oracle and just worry about Oracle rather than have to worry about Oracle in addition to an expensive App Server (the product may be free, but one needs an expensive specialist to maintain them).

Am I right in using this argument for a Cost effective solution where the database has already been selected?

From the forum, I get a feeling that
1. Whatever can be done by the database should be done by the database
2. The improvement to Packages is primarily to handle Business Logic.
3. Security for the database is best handled by the database itself.

Thanks

Tom Kyte
January 21, 2003 - 3:43 pm UTC

you would not get a ton of pushback from me on that line of thinking...

There are systems of a scale to necessitate application server farms.
Many systems can be done more simply then they are.

Thanks very much

Srimal, January 21, 2003 - 4:01 pm UTC

Hello Mr Tom,

Thank you very much for a fast response...

Multi-tier architecture

Samson, January 23, 2003 - 10:33 am UTC

It seems you are not much in favour of much hyped multi-tier architecture.
Where does a middle tier,encapsulating the business logic
fit in your design methodology?
Personally, I myself am more comfortable in putting business logics in database (which to me is the middle tier, but not for many experts/purist). But there is so much hype about adding another middle tier to hold business logic, that it adds to confusion. There are so many vendors supporting it (Microsoft in particular). Many of these claim that datbase is not the most scalable piece of software and the only scalable solution is to add another layer, which carries out mundane tasks like for example, in a loan based application, repayment schedule of a customer can be prepared in middle tier, in lieu of database doing it and on click of Save button, its saved to database.
What's your view on this?

Tom Kyte
January 23, 2003 - 11:07 am UTC

The fact is

o you can do ntier on a single computer.
o you can do ntier on multiple computers.

ntier is just "hey, lets break this UI from the LOGIC from the DATA" -- I can (I did) do that with PL/I on an IBM mainframe running VM/CMS or MVS using VSAM or SQL/DS years ago. It is called "good coding style" (which along with modular coding, path of least resistance, common sense -- sometimes seems to be out of vogue with many camps)

My view -- I'm lazy. I want to admin as few things as possible. I'm easily confused as well -- I'd rather have as few moving pieces as possible. Do I really need a browser to talk http to a servlet that will do some EJB thing to a bean that was built using CMP for persistence to update a row in a table?

I find when I build an app against the database -- guess what? its all about the data. How can that middle tier app work out a repayment schedule in the middle tier *without sucking all of the data out of the database and pretending to be a database itself*?

Therein lies my real problem with some of these technologies. Take CMP for example. Here we move transactions, persistence, concurrency - -everything OUT OF THE DATABASE and put it in something else. Well, what happens pray tell in 3 years when "next great programming paradigm" comes along (as they always do). Oh -- bummer, you cannot really use the data in the database with "new great way to do things" cause if you actually try to access the data in the database (bypassing that great middle tier cache) -- what then? oh, bummer data corruption, you see unless you use the app to access the data -- the data is hosed. Never mind the fact that you need java programmer to read code to tell you what the rules regarding this data are. seems to be totally missing the design goal of the RDBMS in the first place doesn't it.

Oh, my favorite one -- security. We'll do it in the middle tier. Ok, so tell me, when I bypass your middle tier and just go after the data - what then? Oh, no auditing, no access control, no nothing -- yippee...

Is there a time when you need the distributed complexity? Sure, if I was building something on the scale of amazon.com - yahoo.com, sure. Asktom.oracle.com? Nah -- the universe for that is relatively confined. I can more then handle the load - probably on my LAPTOP (actually, my desktop computer today is bigger then my sparc box from 96' that I'm running on). so, would I need 15 tiers to handle the load? Nope. I would bet that there are lots of applications like that -- more then the other kind (only so many amazon's)

Samson, January 23, 2003 - 10:39 pm UTC


http server?

Fahad, May 19, 2003 - 10:40 am UTC

Dear Tom,
I need to know few things:
1.My company has an application built in V.B which we want to deploy on internet using http server on windows.The database ofcourse is oracle.We have 9i database.Is this possible?
2.Does this Http server comes with 9i database?.If it does can i just install the http server from it .Or does it comes with 9iAS only?.. Or do I need to buy 9iAS?
If i can install just the http server, what about licensing?.Do we need to pay something for it.
Tom, to be more clear, just tell me what technical steps should we take to deploy v.b application on net using http server of oracle.(all the details)Your help is highly required.

thank you

Tom Kyte
May 19, 2003 - 10:44 am UTC

1) i don't know, our stuff all works "internet wise". V.B. (virus basic) would be the thing you need to look at.

2) there is an apache server with 9i.


You would need to ask MS how to get their own language up and going on the internet.

Oracle needs an "Ask Mr. AS"

Steven, May 19, 2003 - 11:08 am UTC

Excellent discussion as always. We just made the committment to purchase 9iAS - it would be great of there was an "Ask Mr. AS" with the depth of knowledge and clarity of presentation that one finds on AskTom!

Steven Healey

app server

Sushant Prabhu, May 19, 2003 - 2:10 pm UTC

Hi Tom

Going through this thread i undertand you handle almost everything(session management, security etc ) as mentioned above in the database.
What part or functionality of an application server do you use or you dont use application server and its functionality at all.

if yes do ellaborate a bit on how do you bring the app server to use.
do we need an app server at all or can we handle everything in the database

I reckon when mod_plsql is used , an app server will come into picture.

Kindly clarify

Regards
Sushant

n-Tier

Wendy, May 19, 2003 - 5:07 pm UTC

Great Discussion!

My 2 cents on several of the reviews above

Tyler D. Muth, May 19, 2003 - 8:46 pm UTC

First, I am a colleague of Tom's, so my opinions will be Oracle centric. Second, someone asked about a "Mr. AS" site; check out </code> http://devtrends.oracle.com
 It is a sister-site of AskTom and a good resource.  I actually work on the tool behind AskTom and DevTrends, but more on that in a minute.

Now on to the meat.  Several people asked about building applications using the PL/SQL web toolkit.  My response is that while it is possible, and not really all that hard for simple 1-5 page apps, it's a very tedious process to build a large interactive application.  (Warning, gratuitious plug ahead)...

I propose trying Project Marvel (soon to be renamed) if you are comfortable with SQL and PL/SQL.  It's declaritive, completely contained within the datbase so you don't need a middle tier, and I would challenge you to find a technology that can build a web app faster.  Yes, since there is no middle tier, your scalibility is limited to one machine (for now), but AskTom is an excellent example of how little hardware you actually need.  You can read about it from the link on the AskTom home page, or try it yourself for free at 
http://marvel.oracle.com <code>(did I mention it's FREE).

Now on to iAS. Keep in mind I am NOT a Java developer and do not claim to be an expert on it. iAS is a good choice if you have developers that know Java. There are a lot of talented developers out there. Every CS major coming out of college today will know Java. Do you think they teach PL/SQL at many Univerities? (not likely) In theory, J2EE apps should scale well, as you can expand the number of App servers and eventuallu cluster the database using RAC. Unfortunately (and, yes, I know I am likely preaching to the choir here) too many Java developers know nothing about the database. Tom will (and likely has in other threads) go on for hours about this. How many long running if's or for-loops (of the non-infinate variation) have you run into? How about long running queries? Exactly. The database does the work, and your developers don't know how to exploit it, then your app is doomed to be slow. I've actually seen developers retrieve hundreds of thousands of records into an array and sort that array in the middle tier. Last time I checked, the datbase (any database for that matter) has been pretty good at sorting for a long time.

Someone else posted about being database independant. Tom has a good section in his first book about this, so I wont get into it, but the gist of it is... Desing an app to be database independant is a recipe for failure.

To clear up one more PL/SQL question, the database (817+)comes with Apache and mod_plsql. It is included in the license for the database.

A question about 9ias

A reader, May 19, 2003 - 9:36 pm UTC

We have got two problems.

1) One of our form is hanging when we run thro' the internet using 9ias/oracle 8i using UTF as character set. Even i think it is not reaching the preform trigger. The message in the preform is not coming ! Any ideas from anyone. Its very difficult to trace the problem.

2) the font size showing in client server is different from 9ias so sometimes it is hiding the data. What can we do to solve this problem ??? Is there anyway to solve this without changing the font size because the font size 9(MS Sans Serif) is standard for us.






apache server

Fahad, May 20, 2003 - 4:21 am UTC

Dear tom,
First of all thanx for the prompt reply.Atleast i came to know that license for apache server come along with 9i database.
Actually we have an application in Virus Basic ;),we use odbc to connect to the 9i database for data.In order to use this application on the internet is it possible to connect to the database from v.b 'THROUGH' apache server on the database?
Can u provide me with some link where i can find the technical details.
Thanks once again for replying my question.


Tom Kyte
May 20, 2003 - 9:41 am UTC

time to goto askbill.microsoft.com

no, vb cannot connect "through" apache. you would be using asp's or some other "technology".

VB and Oracle

Tyler D. Muth, May 20, 2003 - 10:14 am UTC

First, if you are using ODBC, you should switch to the "Oracle Provider for OLEDB". Think of ODBC as a least-common-denominator technology; it's the worst of all worlds. The performance is slow and it's impossible to exploit some of Oracle's best features such as packages and stored procedures. Which brings me to my next point...

Move all of your business logic to PL/SQL packages. You might expect this answer from an Oracle employee (which I am), but think of the flexibility. I challenge you to name a front-end technology that cannot call a package: JSPs, ASPs (and C#, VB, etc.), Cold Fusion, Adobe Graphics Server, PHP, and the list goes on. I was working on a project with a very large organization in which we built the primary front end using Project Marvel calling packages for all DML operations. When another group within the org. wanted to "try" to build a mobile solution using .Net, we simply allowed them to call our packages. We didn't have to worry about them putting bad data into our system as all of the validation was done either at the table level or in packages. They only had select privs on tables, not insert/update/delete, so the only way they could change the data is through the packages. And they did not have to re-write any business logic. Packages also have another benefit, in that you can query the user_dependencies view to see what code is dependant on a table. Thus, if I need to change a table structure, I can get a report of all of the code this will affect as well.

Finally, to answer your VB question, you are basically out of luck. There may be technologies out there to automatically transform your VB into a web app, but I guarantee you will not be happy with the appearance or performance. Client server and the web are just too different. I can't tell you how many times I have seen people converting forms or VB apps to Project Marvel and try and do it screen for screen, only to end up with a web page that scrolls vertically AND horizontally for miles. Your best bet is to cut your losses, pick a web technology stack and start re-writing.

Below are some links related to my response:

</code> http://marvel.oracle.com http://otn.oracle.com/sample_code/tech/windows/ole_db/oledb92/content.html http://www.macromedia.com/devnet/server_archive/articles/cf_best_practices_oracle.html http://www.adobe.com/products/server/graphics/main.html http://www.phpbuilder.com/manual/ref.oracle.php <code>


Excellent Discussion.

shan, May 20, 2003 - 1:55 pm UTC

That was an excellent, reassuring and lucid explanation Tylor. Thank you verymuch.

Tom suggested that may be on a much higher scale (like for amazon / yahoo) he would probably go with putting business logic in middle tier.. (Tom, is that what you meant? Or did I misread you..?) It would be great if you could discuss why is it so. Now that with 9i RAC Oracle can achieve near "leanear sclalbility", why can't we still have the same 'project-marvel' model applications extend to truly big systems? I think with the size and traffic, a site like Amazon, will find it more difficult to handle the transactions in the middle-tier than inside the database. And I am sure it will take a ton of hardware to do it. I feel that the practice of using heavy loaded middletier has to do with the notion that database servers cannot scale up well.

Very curious to hear your (Tom/Tylor) take on the big-site-architecture. Thanks for this great site!!

Regards,

Shan,
NewYork

Tom Kyte
May 20, 2003 - 8:41 pm UTC

there will be times when you exceed the limits of what you can do entirely in the database -- when you need layers upon layers of what I call distributed complexity. It takes a really huge system to get there. I can scale out in a huge way with an app server farm, run the cpu/compute intensive stuff there and let the database just do security and transactions. That is what I mean. transactions -- i would never put them in the middle -- the logic of drawing a page -- perhaps, but only when I know I cannot afford the cycles in my database.

RAC with Project Marvel

Tyler D. Muth, May 20, 2003 - 4:56 pm UTC

Shan. I'm embarrassed to say this, but we have never combined RAC and Project Marvel in a production system. I therefore would not recommend that as a solution until I'm personally involved in a project that does so. It's not to say that I don't trust RAC, as I know of a number of customers that are very happy with it, I just don't know how the session state model of Project Marvel will interact with RAC in production. As our beta period draws to a close, this is one of the top items on our list. I will post a followup when we have tested it.

I'm actually not embarrassed we haven't needed RAC; I would say it's more of a sense of pride. The machine running AskTom is a 6 year old Sun e450, has 7 PRODUCTION applications running on it, AskTom alone gets over 300,000 distinct page views per week and the average page time is .5 seconds (a little slow, but I'll look into that later, though the top 5 hit pages are under .4).

I cannot speak to iAS at any level as I have never implemented a production system on iAS and am therefore not qualified to do so.

Someone else made the statement that they thought they need iAS to use mod_plsql. That is not correct. All you need is: 1. The database 2. Apache 3. mod_plsql. That is the exact architecture of AskTom. Project Marvel must be included in this list for AskTom, but it is nothing more than a bunch of PL/SQL and tables that hold meta-data which live 100% inside the database. If you look at the URL of this page:
-f is a public synonym to a PL/SQL package which retrieves the metadata that make up this page.
-p is a parameter of f
-4950 is the flow or application number
-8 is the page number
-the big number after that is the session...


N-tier

Darren, May 20, 2003 - 7:18 pm UTC

Hi Tyler,

>I propose trying Project Marvel (soon to be renamed) if you are comfortable with
>SQL and PL/SQL. It's declaritive, completely contained within the datbase so
>you don't need a middle tier, and I would challenge you to find a technology
>that can build a web app faster. Yes, since there is no middle tier, your
>scalibility is limited to one machine (for now), but AskTom is an excellent
>example of how little hardware you actually need. You can read about it from
>the link on the AskTom home page, or try it yourself for free at .........

If there is no middle tier, why is it limited to one machine? Oracle can be clustered, can it not?

If i have pl/sql packages to handle presentation only, pl/sql packages to handle business logic only and of course the data store itself. Is this not an example of 3-tier design?

Also, some developers, who are keen to get into Java, where I work are pushing for us to move ALL of our pl/sql presentation and business logic code out into servlets/jsps and ejb's, basically turning the Database into a bit-bucket. Im strongly against moving the business logic part out of the database for performance and data integrity reasons. They are pushing it mainly because its the new "stategic" architecture etc. What are your views on ejb's vs stored procs for a medium sized DB (our db is about 3GB in size, runs happily on one sparc box and receives a few thousand web based hits per day).

Daz.

Tom Kyte
May 21, 2003 - 7:31 am UTC

yes, it can run in a clustered environment.


I actually like to call it modular coding myself -- you know, all of these technologies like "Object Oriented programming" and "N-Tier" are just implementations of good old 'modular code'. Good code was always 'object oriented' as good code always separated things like this out. Good code was always ntier.


Not only performance and data integrity but REUSE goes out the window doing what they want to do. Tell me, is java the last language? The last programming paradigm? HAH -- I've seen too many "silver bullets, we have found nirvana" in my career. Not a chance. 3 years from now, we'll be doing it a bit different than today.

I would no more go with massive distributed complexity when I didn't need it then stick a needle in my eye for no reason. Keep it small, keep it simple and you won't be sorry. Make it so you need a professional java programer, database developer and DBA to cobble together their bits and pieces and make everything work and then maintain it over time and, well, you see where I'm going.

great discussion

a reader, May 20, 2003 - 11:23 pm UTC

Change is not permanent, but change is - as we cycle through languages ( currently java ) and complexity ( getting more and more complex - there is a new Jxxx acronym everyday ) i feel we will follow the cycle back to less complexity in our systems.
In our purchasing of systems, we not only need to buy database servers, but servers to host "middle tier".
More developers are needed to chase the EJBs and J2EE application architecture, and they have to pick and choose what container or app server to deploy to. Weblogic, Websphere, JBoss, iAS - they all seem to have their hooks in one way or another.
If I want my mod-plsql app moved to windows - I move it. If i want it on Linux - i move it. Easy. I don't have to worry about Ant or someother tool to deploy - then manage that as well.
I won't even get into deployed usernames/passwords etc in XML files and having to now get my Net Admin involved to lock down my server.
Our developers spend hours and hours developing applications that seem to be as thick as the old client server apps - loading up objects in the middle tier - using object query language to get that data - letting another machine worry about state, resources - connections - security : when it has been there in front of them all along. Oh, now with all this middle tier stuff, i don't need to be concerned with the schema - it's abstracted - and the sql calls don't matter either. (sarcasm)
Then they blame oracle for being "slow".
Its only time before it goes back to client/server - or some other new technology.
But the database remains - through thick and thin

Tom Kyte
May 21, 2003 - 7:56 am UTC

i agree.

It is funny how things cycle like this. I remember in 1994/95 client server ruled. client server was getting infinitely complex however. trying to manage that stuff was horrible. along comes this web thing.

it was so simple back then. remember, it was all just HTML - simple HTML. tiny amounts of javascript, but pretty much HTML. our major formatting tool -- html tables.

enter DHTML, VRML (remember VRML?), blah blah blah. Now we have 500meg web pages with some much complexity that many don't work with my browser of choice or demand version x.y.z of IE and so on.

We've taken the most simple, open, flexible protocols and made them hard, complex, closed....

I wonder what is next myself. I cannot wait (but we'll make it really hard all over again)

Confused on Project Marvel

Steven, May 21, 2003 - 9:19 am UTC

OK, now you've got me really confused with Project Marvel. Perhaps sitting through three months of presentations on how 9iAS is the Swiss Army Knife for all data presentation needs has addled my brain, but could someone (perhaps Tyler) explain exactly what Project Marvel does and how it differs from 9iAS? I have read what is available without committing to the beta program, and I must confess I am still lost.

Enlightentment would be appreciated!

sPh

Tom Kyte
May 21, 2003 - 9:44 am UTC

marvel is a mod_plsql application generator.

mod_plsql is needed, that runs in ias but all it does is convert a url into a stored procedure call.

marvel is the stored procedure. Much like you would in Oracle forms, you layout a screen, define behavior for the screen (what is the next screen, what happens before this screen appears, right after, etc etc etc). You write snippets of code (like triggers in Oracle FORMS) that marvel executes in reaction to various events and so on.

Your application is stored as data in tables -- marvel is the runtime engine then that interprets this data and executes your application.


It is just an application generation environment -- for thos of us who don't want to code alot of java to do something very easy.

over-glorification of mod_plsql

Matthew, May 21, 2003 - 7:19 pm UTC


I agree with Tom & many of the respondants that physical n-tier architectures & EJBs are often overkill.... but I don't think anybody has really looked at where the "simple" solution falls down.

I work on an pure PL/SQL production application with some 100,000 lines of code, written by dozens of people over the last six years (with 6 fulltime maintenance programmers). The data in this system will near the terabyte range in the next couple of years....
=> It's not a "trivial" app.

Poorly written applications are not unique to the J2EE space - this application is horrible to maintain and it's 100% PL/SQL. Why? because of poor abstractions and low code reuse. (oh, and the fact that nobody tried separating logical layers - presentation, control, logic/model).

I find PL/SQL an excellent language for quickly manipulating data - beats the heck out of acquiring Connection, {Prepared}Statement & ResultSet objects from a JDBC driver and then iterating through it... however, it frustrates the heck out of me.

Why? Because it's a procedural language - and a not fully developed one at that. I find OO languages achieve far better code re-use because they lend themselves to more elegant and simple designs to breakdown the same problem.

Many argue OO has no benefit & everything can be done in procedural languages.... unfortunately, many of these solutions rely on features not available in PL/SQL.... like function pointers :) As much as OO is another implementation of 'modular code', the way it is implemented is IMHO far superior to other implementations.

I know I am stepping into a lion's den of PL/SQL proponents, but really there are limits on what the language is capable of.

Pick the right tool for the job. As this application I work on is being redesigned, we're going to keep the database doing some of the things it's good at: referential integrity, validation/security checks in triggers, *transactions*, batched fetches/updates, sorting & searching.

However, we're getting rid of the things it's not good at - the "VC" out of MVC :) Good bye "htp.p" & spaghetti code, hello Struts Framework. I personally believe you can't truly appreciate the value of good frameworks and tools until you have tried to maintain an application without 'em... and I am sold.
(mind you, "Marvel" looks interesting in this regard - I'm off to look at it very soon)

The plan is to utilise Oracle as a "transaction API" - you give it large pieces of work like "remove this 'thing' from the system", and it cleans up all the dependant records, does logging, checks security, copies data to the archive tables etc etc.

A few specific points:
* "App Server vs Web Server" - it does become hair-splitting when you consider something like "mod_perl" :)

But, to nit-pick - I have seen "application servers" without web servers. Consider a Java Swing GUI that talks to an EJB container direct (no http involved).

* The J2EE world has some nice ready-made facilities like JAAS, layered request/response filters & session management. AFAIK, the PL/SQL web toolkit does not provide such niceties. Depends if you want them ready-made, or if you want to implement/ignore them yourself.

* Like Tom, I agree that the J2EE framework is a more complex set of technologies and has a significant learning curve. That's the price you pay for something that can do nearly everything :P However, I find some of my J2EE apps are just as good by the "now, today, fast" criteria as PL/SQL (or similar) web applications - when they're built right!! Sometimes, even better because my J2EE apps seem to lend themselves better to reuse... (in *my* experience).

* "Middle Tier" - 'here here' for Tom: you can do n-tier on one box or multiple. It doesn't matter.

Some things I can't stand to let go from "A Reader"
* "deployed usernames/passwords etc in XML files". haha - checked your "wdbsvr.app" file lately? Exactly the same thing.

* "worry about Ant or someother tool". So, how do you take a new version of code from the test environment & put it into production? You have to extract, copy & run it, ergo you need/use a tool. We wrote our own Unix shell scripts to do it - Ant is just a tool to help build, manage and move source code (and a thousand other things).

Everything is IMHO, YMMV. My experience with PL/SQL is in 8i, so I'm itching to see what Oracle has done with collections & opaque functions in 9i. "Objects" in 8i are a joke - even Turbo Pascal 6 did it better (circa 1991). At least 9i claims it has "polymorphism" - shame it lacks either multiple inheritence or "interfaces". Still doesn't seem to support "constructors" yet either :/

Pick the best tool for the job. PL/SQL has its place, but it seems maybe not for building every single component of large, complex web applications. J2EE has its place, but I think we all share the opinion that there are some things that are still done better by the RDBMS.

matthew

Tom Kyte
May 21, 2003 - 7:41 pm UTC

Marvel is struts on steroids.

The app servers without webservers are virtually useless in the environments I see most -- its all about http and browsers....


o the j2ee world.... yes, that is what marvel is about.

o that is the most important part -- when they are built right.

Here is my gripe. When I drive my car onto a bridge, you know what -- I have a very reasonable chance of getting over the bridge safely and off the other side. Why -- because a certified, responsible, honest ENGINEER designed, built, tested (sounds a little like the perfect software cycle doesn't it). They even come back from time to time to do maintenance and make sure the thing isn't falling apart -- BEFORE it falls apart.

While writing a book -- I came to fear the "file/save" option. Or just the fancy set of keystrokes I might hit. I swear, I hit the save button at least every paragraph. (hint to would be authors, don't go over about 90 pages in word -- trust me -- break it up way before then)



I think we agree on tons more then disagree. I've said myself "pick the best tool for the job". On a large complex web app -- it (my beloved plsql) might not be the best thing (i said as much). However for most (many at least), full blown j2ee is a tad overdone. something in between is the way to go.


(btw: static member functions in the object types ARE constructors!)
(btw2: i still don't like OO languages, too much happens "by side effect" or "by accident". I still believe if I didn't write the class hierarchy -- I won't be able to exploit it - my most reusable code has always been --- well, plsql :)


But I agree -- best tool for the job, more then one tool exists.

Well Said

Mark A. Williams, May 22, 2003 - 10:25 am UTC

Matthew,

I would like to congratulate you on making a lucid post that actually used complete words and complex sentences. Those type of feedbacks seem to be in short supply for whatever reason. While I don't agree with absolutely everything you have said (and I realise that this matters only to me), I did want to say it was nice to read a well-formed and intelligently worded feedback.

Regards,

Mark

Real good discussion

Raj, May 22, 2003 - 1:43 pm UTC


app server

mo, May 22, 2003 - 5:05 pm UTC

Matthew:

I just wanted to say that part of your problem is probably not related to PL/SQL at all. You said you have 100,000 line of code developed by 12 programmers and maintained by 6 full time people. I have developed three oracle web applications using pl/sql web toolkit with about 70,000 lines of code and I maintain it myself supporting about 50 users for now. I do the database design, development, testing and training. You get more people and you get yourself into real mess sometimes.

When you move to OO language or J2EE you will see how complex it is. Also, you better find the right people for it because many people claim to know it when in reality there are very few J2EE good programmers out there.

The risk here is that the conversion will take a lot of money and time. By the time you reach the end you may realize that PL/sql was a whole lot faster and easier. It would be too late though because you are stuck with J2EE after all that money spent.




A few more comments...

Tyler D. Muth, May 22, 2003 - 11:44 pm UTC

First off, well written Matthew. I will try to keep this brief, as Tom has been giving me a hard time for my lengthy posts...

I was not suggesting you write your whole app in PL/SQL, only the transactional APIs. By this I mean don't insert, update, or delete any records except from a procedure within a PL/SQL package. I would even go as far as effectively disabling those operations except from with your APIs (possibly using a trigger that fires before any dml and looks for a global to be set which you only do through your packages). There are several advantages to doing all DML through packages:
1. You can keep complex security closer to the data. The closer it is to the data the better. What you can't do in constraints or triggers, do in your APIs. Then all front ends will leverage the same security code.
2. When business logic changes, you change it one and ONLY one place.
3. The more code you have in packages, the less you have in your front end. As Tom said, J2EE will not be around forever, nor will Marvel. How long has PL/SQL been around? How long do think PL/SQL will be supported in the database? I can't talk about the new features in the next database release yet, but I think (read: hope) I can say that <strong><really strong>SIGNIFICANT</really strong></strong> (yes, I know tags don't work here) work went into the PL/SQL engine. Might that be yet another clue that PL/SQL will be around long after whatever front end anyone is using now?
4. I know I said it before, but there's nothing like user_dependencies to tell you what code screwed up your data. Especially in situations where data is really sensitive, such as law enforcement, financial, and health care organizations.
5. Code portability. Yes, Java gives you that too, but stop and think of how many platforms the database runs on! I am a developer of Project Marvel, and because the code is nothing more than a lot of PL/SQL (not just a procedure as was stated above) and tables, we have to port exactly 0 (zero) lines of code!

What is Marvel? Well, it's a declaritive way to build apps for those who like SQL and PL/SQL. It handles:
- Session state mgt: create an "item", reference it's value any where else in the app
- User interface: HTML templates that you can customize or create from scratch to like like any HTML UI you wish
- Authentication: Built in support for generic LDAP, database, and Portal SSO security. Allows you to write your own auth in PL/SQL as well.
- Authorization: create a security function like "select 1 1 from emp where ename = :USER" (can be much more complex if you like), then declaritively apply that to any object in your app, like a single item (textbox, radiogroup, etc), a group of items that we call a "Region", a page, or a whole application.
- Too many more features to mention (SVG Charts, pagination, report sorting, etc...)

It generates nothing but html and javascript, so no plug-ins, and you could build an entire app without writing a single line of HTML.

Here is a link to a viewlet demonstrating "Inline Error Messages" for validation:
</code> http://marvel.oracle.com/i/dp/viewlets/inlinevalid1.swf <code>
Keep in mind Marvel has matured a lot since this made, but it will give you an idea. BTW, you can see these in action by not entering a rating when tryin to post a review. Alse, textarea with spell-check is one of Marvel's 70+ built in item types (calendar controls, combobox with submit, popup list of values, etc...) which you can just use when creating an app.

Sorry Tom, I did it again :(


Replacement For Portal

Fred Shimaya, May 23, 2003 - 2:00 am UTC

Tyler,

Very interesting! Is Project Marvel (its incarnation) intended to be the replacement of Portal as Oracle's web development tool? What is the difference between the two? Will it allow more flexibility than Portal with regards to custom javascript code? With Portal, you are limited to what you can do with javascript. Finally, is the architecture pretty much the same as Portal's? One of my biggest gripes with Portal is how it has to query certain tables just to build the html, which slows down rendering. For instance, if you create a Report By Query and run it, it may take 15 seconds for the page to appear. You run the exact SQL statement in SQLPLUS, and it takes maybe 6 seconds. You realize that there is nothing in the statement that would cause the slow rendering. What is happening is that Portal queries certain tables that contain HTML tags to build the page. That query alone is what's causing the slowness. So, you build a Dynamic Page, include all the HTML tags within the SQL statement, and when you compile and run the report, it takes 7 seconds as opposed to 15 seconds. Will Marvel be just that (another Portal in disguise)? Or will it use JSP's to build the HTML as it should? Another reason why one shouldn't make an entire web app out of a database package!

Thanks

Fred

Tom Kyte
May 23, 2003 - 8:44 am UTC

they are orthogonal products.

marvel builds apps.
portal integrates apps.

they are complimentary, not interchangeable at all.

Sasa, May 23, 2003 - 2:36 am UTC

Finally someone has explained "Why AS?".
Thanks Tom for that.

Reply to Fred's Questions

Tyler D. Muth, May 23, 2003 - 8:55 am UTC

Fred, you ask a lot of really valid questions, we get these a lot. Project Marvel is NOT another incarnation of Portal, nor is it a replacement for Portal. Portal is really good at agregating content to build corporate "My Something" sites. We have MyOracle.com. It ties all of the corporate apps I use together. Portal is also very good at Single Sign On. You can literally use it to manage the authentication of all of your applications. We think it's so good at these tasks we built no real content agregation components into Marvel except pulling from web services, and we built-in support for connect to Portal's Single Sign On (or straight LDAP, depending on your needs). Portal is NOT good at building applications. You obviously know this since you have tried. Yes, you can build simple 1 or 2 page apps, but you quickly hit a wall. It's a square peg in a round hole problem, it just wasn't intended for that.

It's architecture is quite different from Portals, but it does store everything in tables and it IS a whole web app out of database packages. Let me use the AskTom home page as an example. The page is nothing more than a row in the pages table. There are around 10 regions on that page such as "Search", "Results", "Messages", "Status", "Timing", etc. which are all rows in the regions table, which has a foreign key that points to the pages table. Then you have items on that page, such as search and the go button: you guessed it, rows in an items table. Then there are the templates, 1 page template, a differnet region template for each region (all distinct queries), item templates, a report template; again all rows in different tables. I would estimate that no less than 30 queries were executed just to generate that page, Tom's queries are in addition to the ~30.

Do you think it's slow Fred? Ranged between .32 and .38 for me this morning. This is old hardware. Marvel gets a lot faster on machines with really fast processors. The average overhead per page excluding your queries, which you are free to write as slow or as fast as you like, is between .12 and .22 seconds per page. I don't consider that slow at all. The advantages over having all of your code in a bunch of files could take up a whole separtate post. There is no saving and compiling here, just save your changes (inserts, updates and deletes in meta data tables) and run the page. Period. We regularly test a baseline of our code before a new feature is introduced. If the feature slows things down, it's re-written until it doesn't or it doesn't make the cut.

We actually have Tom to thank for a lot of our speed. We work on the same floor, so my version of AskTom usually involves his white-board (yes, I know I'm lucky). Tom has written several major components of Marvel, if for no other reason than he his really good solving a problem in the quickest, simplest way. Hope that clears things up Fred.

Thanks Tom & Tyler...

Fred Shimaya, May 23, 2003 - 10:46 am UTC

Your explanations help a lot. Now I know the difference, and look forward to Project Marvel. Tyler, I didn't mean to sound sarcastic. If I did, I apologize. I just have two more questions for you:

1. Have you tried creating reports in Portal and witnessing a major difference between Dynamic Page and Report By Query, using basically the same SQL statement (except the former hard codes the HTML tags)? You'll see a difference if the result is expected to be over 100 records (we have users who like having mucho rows displayed on the same page).

2. What happens in Marvel when the query returns over 100 records? If the rendering is slow (not the retrieval), what does that indicate? Again, let's assume the users want reports that show all desired records on one page.

Again, I'm not trying to be a wiseacre. I am just curious.

Fred

2 Answers for Fred

Tyler D. Muth, May 23, 2003 - 11:54 am UTC

I enjoy a little sarcasim every now and then in case you can't tell from my own posts ;)

1. I am not Portal developer, so I'm not really able to answer this one.

2. If ther rendering WERE slow, that would be a bad thing, but it's not. There is a performance impact if you choose certain types of pagination that loop of over all rows returned, but we do have a pagination scheme that does not do this for that specific reason. The following is a link to 2 reports I wrote. This link will likely go away eventually (months from now), so my apologies in advance:
</code> http://marvel.oracle.com/pls/otn/f?p=948:1 <code>
There are 2 reports on all objects. Play with the "Num Rows" on the first one. I get about .07 seconds for 100 records and .62 for 1000. Not bad in my book. The second uses pagination, another built in feature that I simply turned on. This is a more pracitcal implementation of retruning 1000 records. Hope this helps Fred.

Hehe... Very Nice!

Fred Shimaya, May 23, 2003 - 12:07 pm UTC

Yeah! I like it... That's screaming fast! You got me convinced. A little sarcasm adds spice to life ;)

Thanks.

Fred

That was a great demo of your point. Thanks Tylor.

A reader, May 23, 2003 - 6:48 pm UTC



6.00 stars. It is marvelous

frequent reader, May 29, 2003 - 12:31 am UTC

May be not short but sweet (rephrasing Tom's expression).
Go to this site for almost all questions and sometimes spend hours just reading.
I don?t smile so much at any site as here reading Tom?s ?follow up? and ?we said?.
I envy people who work with you when you are in a good mood (not sure about opposite).

"Pick the best tool for the job" is only part of the approach. What about "pick the best
people for the job" and they will do the first part. Did you see Oracle triggers Cobol-VB-style-coded and
having 4000-5000 rows? Did you see hierarchy of objects when one would work as dandy, or twenty modules of copy-and-paste code where few
procedures is required? Did not you see developers with 8 years of experience who tried to update dba views? And what about database design?
Very few should go to production at all, because it is easier to redesign then support.
List is endless to validate the statement and prove that it is not at all ?PL/SQL vs Java? or ?need vs don?t? AS thing.

Thanks a lot for all you tremendous work, non human patience and politeness.



5 years

Wayne, September 17, 2003 - 12:35 pm UTC

Tom,

I cannot help but notice that you did not mention that 5 years ago (almost before "windows"), oracle was there.
And 5 years before that, when Unix began to make progress there was Oracle.
5 years before that in the VMS days (before they joined compaq) there was oracle.
5 years before that in the "Mainframe" days there was that little company out of San Francisco just barely starting up (Actually that was about 5 more years back in 1977) called Oracle ...

app server architecture

mo, September 21, 2003 - 12:33 pm UTC

Tom:

1. Can you tell me if this is architecture is feasible or not.

Currently we have server "A" and 8i database and we run everything using mod/plsql as stored procedures.
System admin wants to put our web app on server "B" which has 9i database. However they block web access on this server and we have to use an app server (mod/plsql) installed on server "C". can it be done and you think there is any security justification for this?

Tom Kyte
September 21, 2003 - 1:06 pm UTC

why would the sys admin put an app server on a machine that does not permit any web access?

seems sort of "self defeating", what is the purpose?


i must be missing something somewhere. it does not seem logical.


yes, mod_plsql (and apache) can run anywhere in the network, it need not be on the same machine -- but since mod_plsql doesn't really do anything seriously hard and apache is pretty efficient, there isn't really a good reason for splitting them up necessarily either.

app server

mo, September 21, 2003 - 10:31 pm UTC

Tom:

SErver "C" is the public server. All external users log into it. Server "B" is private and contains the database. IT looks like they do not want people log in directly to the web app from "B".

However, if my thinking is correct, even if users log in to server "C" you need to code hyperlinks that point to server "B" and use port 7776. Then they weould be able to see the other server anyway?

Tom Kyte
September 22, 2003 - 7:36 am UTC

if apache/mod_plsql are running on "C" and the database is on "B", then mod_plsql would use sql net from C to B

no hyperlinks to B, just a tns connect string to let C log into the database on B

Database and Oracle HTTP Server on same machine

Jens, September 22, 2003 - 4:41 am UTC

Hi Tom,

somewhere in the Oracle documentation I found the recommendation that we should use the Oracle HTTP-Server and the database on the same machine only for development purposes.

What Do you think? I think, that I could use it also for a production environment. The peerformance ist great, why 9ias?

Bye,

Jens

Tom Kyte
September 22, 2003 - 7:52 am UTC

they were probably assuming "java", not mod_plsql

app server

mo, September 22, 2003 - 10:32 am UTC

Tom:

On your second answer you mention there will be no hyperlinks to server "B". Everything will be to C and only DAD will be pointing to "B". Does not that answer your question "seems sort of "self defeating", what is the purpose?".

Server "B" will be sort of hidden to the public. Some security people may think this is good security procedure?

Tom Kyte
September 22, 2003 - 11:02 am UTC

I thought this:

System admin wants to put our web app on server "B" which has 9i database.

was saying the app server would be on "B", that would be self defeating. I read it wrong.

8i vs 9i

Denise, October 01, 2003 - 4:41 pm UTC

Tom

thanks for the clarification regarding 9i application server technology and its benefits.

we are in the process of trying to evaluate the pros and
cons as to whether we should upgrade to 8i EE or wait
to migrate to 9i in January 2004.

Our software vendor is trying to push us to upgrade
to 8iEE (we currently use 8.1.7 SE), at a cost of $16,000, while telling us we will be migrating to 9i in January.

After reading your comparison on application server technology and client/server deployments it definitely serves our interest and benefit to wait for 9i.

Can you give any more pros and cons regarding 8iEE vs 9i.

thanks


Tom Kyte
October 01, 2003 - 6:17 pm UTC

it does not seem to make "sense" to move to EE and test now -- only to do it all over again in Jan

I'd be asking the vendor what the pro's of doing this intrusive thing right now is?

8iEE vs 8iSE

Denise, October 02, 2003 - 9:02 am UTC

Tom

thanks for response.

The reasoning for getting us upgraded to 8iEE before 9i
is that if we remain with 8i(817)SE when we upgrade to 9i
it will still be the SE and not EE.

I have been pushing for the EE whether it be 8i or 9i so
that I can implement partitioning features to tables and
use Analytic Functions...which I do not have available
with SE.

We are also told it will not affect us, cost wise, when
we finally migrate to 9i...so we are pondering whether
to go ahead and invest now in the 8iEE...which will give
me a couple months of "play time" with the new features
while we wait for 9i implementation.

again..your thoughts,comments are eagerly awaited.
thanks.

Tom Kyte
October 02, 2003 - 9:50 am UTC

seems intrusive to me.

what i would be more tempted to do is get 9iEE, and on a test system -- do the january upgrade now -- to "play", "test", "learn"

Not sure that 2 months with 8iEE would buy you much, given the amount of possible effort it could take to get there (it would be like doing an upgrade right now, you would be changing the software, nothing "should" go wrong but something could)

9ias configuration

mo, January 20, 2004 - 10:35 am UTC

TOm:

How do you usually set your 9ias.

Do you have a preference for either Stateless, on the one hand, or StatelessWithPreservePackageState, on the other hand, for your PlsqlSessionStateManagement?

Thank you


Tom Kyte
January 20, 2004 - 1:55 pm UTC

stateless, only stateless.

never want anyone using resources on my machine when they are not actually using my machine.

Oracle 9iAS Portal VS Customized Portal

Senthil, June 08, 2004 - 10:34 am UTC

Tom,
Is it advisable to use "customized Oracle Portal" (Install minimum install of j2ee with http server and use the plsql toolkit &java script) for document management, workflow management etc rather than using Oracle portal?
When do you consider portal,
When do you consider customized Oracle Portal?


Tom Kyte
June 08, 2004 - 11:51 am UTC

depends on if you want to write it or buy it.

if I can find a solution that meets my needs and buy it -- I do that.

So, do you want to (no, let me rephrase -- does your COMPANY want you to) write your own document management/workflow or use a product?

Oracle Statement of Direction June 2004

Jens, July 12, 2004 - 7:40 am UTC

Oracle Statement of Direction June 2004:

> Following the successful example of the Oracle E-Business
> Suite, Oracle recommends customers to web deploy their
> existing Forms and Reports applications, develop new
> functionality in J2EE using JDeveloper and ADF and
> integrate these applications together on the application
> server, sharing common services and business logic.

Ok, that means the end of the powerful Desinger, the end of Forms and the end of Reports (Could anybody tell me, how to build powerful PDF-Reports with JDeveloper, don't tell me anything about JSP and this stuff!).

I think there are big fights intern oracle between the JDeveloper and the old Forms/Reports/Designer Product-Developers, aren't they? Because going J2EE is only a political decision, these apps aren't "better" than the old ones.

Oracle forces their customers to buy their expensive Application Server and cut their business logic out of the database (where it belongs to in my opinion) and put it on the Application Server. That bring's me to the following question: What does Oracle say officialy when I ask them, "Isn't it better to let the business rules near their objects (the data) in the database?" - When will Oracle let PL/SQL die?

Tom, it's your Independance Day: save our Oracle souls!


Tom Kyte
July 12, 2004 - 11:25 am UTC

if you stop using it, we'll stop making it.

if you don't stop using it, we won't.

it is that simple.

Why http server need Oracle_home

atul, September 07, 2004 - 4:48 am UTC

Hi,

For installing 11i Here is one pre-requsit in documents
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

iAS ORACLE_HOME This ORACLE_HOME should be installed on each node that acts as an HTTP server.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

My question is why HTTP server requires ORACLE_HOME.
HTTP server only listens request from browser and send them to form-server isn't it?

Thanks,
Atul

Tom Kyte
September 07, 2004 - 9:07 am UTC

because ORACLE_HOME is an Oracle'ism and we always install all software into a thing pointed to by an ORACLE_HOME.

An Oracle home doesn't necessary have database software or anything in it.

Ok

Kumar, December 07, 2004 - 1:07 pm UTC

Hi Tom,
What are the differences between Appln.Server and a Web server?

Tom Kyte
December 07, 2004 - 8:36 pm UTC

a web server generally is considered to just be a piece of software that uses http to "talk" and gets files/runs cgi-bins.

an application server is typically considered to be a web server with the added capabilities of a java engine, maybe a portal, reporting services, etc etc....

an app server has a web server typically.
an app server has more stuff.

Excellent, informative discussion

Chris, December 09, 2004 - 6:59 pm UTC

Thank you for providing information and insight on these very relevant topics.

Excellent, informative discussion

Chris, December 09, 2004 - 7:00 pm UTC

Thank you for providing information and insight on these very relevant topics.

9ias for J2EE apps

mo, January 24, 2005 - 4:53 pm UTC

Tom:

1. Can you use oracle 9IAS or 8IAS to deploy J2EE applications (JSP/EJB)?

I guess that is the same question as does oracle app server provide containers for servlets/jsp/ejb.

2. If yes, do you have more info on how to configure/use it. I have a "hello J2EE" JSP program and I want to call it via a URL to see how it works.

3. Is it correct to say that deploying Java stored procedures on the app server does not mean you have a J2EE application?

Thanks,


Tom Kyte
January 24, 2005 - 4:58 pm UTC

1) 9iAS (it would be 10gAS today) yes.

2) you would see the documentation (i'm most definitely not a j2ee deployment guy)

3) correct, a jave stored procedure is just a java stored procedure -- very simple, very straight forward. "j2ee" is "big time". slightly more involved.

J2EE

mo, January 24, 2005 - 6:57 pm UTC

Tom:

1. Are you saying that we can use 8IAS/9IAS to build J2EE applications. We do not need to get IBM websphere or weblogic to do that.

Are there any different modules we need to buy since we are only using MOD_PLSQL? or it all comes in one package.

Tom Kyte
January 24, 2005 - 7:25 pm UTC

1) you use 10gAS or 9iAS -- you do not need websphere or weblogic.

8iAS is so old... and did not have the the j2ee containers you need.


if you have 9iAS or 10gAS -- you have everything you need. mod_plsql comes with the database (along with apache) but that is not necessarily the application server. If you have application server, you bought it as a separate line item.

And what Oracle says...

Olga, January 26, 2005 - 12:19 pm UTC

Why do I (=Small and Midsize Business!) need an Application Server:

</code> http://www.oracle.com/technology/smb/techguide_appserver.pdf <code>





J2EE

mo, January 31, 2005 - 7:00 pm UTC

Tom:

1. Is it correct to say that J2EE architecture dictate that your business logic code should be stored in the middle tier (app server) and not the database?

2. Is it correct that J2EE apps are heavily dependent on using EJB for business logic?

3. Is it correct that An application using struts to call pl/sql code for business logic is not really a J2EE application.

Thank you



Tom Kyte
January 31, 2005 - 8:22 pm UTC

1) nope

2) nope (jsp is a j2ee thing, you don't need beans for that)

3) nope

All three are wrong.

What exactly is the differnece between 10gids and 10gas

Drumil Narayan, February 01, 2005 - 12:18 am UTC

Hi Tom,

We want to deploy, oracle 9i forms and reports on web using 10gAS application server.

During the installation of 10gIDS i found that it also installs forms and reports server, then what exactly is the difference between the forms and reports server of 10gids and that of 10gAS. I mean can we use only 10gIDS/9iDS instead of 10gAS if we want only forms and reports to run on web..

thanx in advance..drumil

A reader

Rais Sheikh, February 01, 2005 - 1:35 am UTC


app server v's html db

dave, February 01, 2005 - 4:42 am UTC

A question I cant find the answer to - sorry if this has been answered elsewhere.

As far as I can see, htmldb can do what most people want, i.e a web page interface which users selecting and modifying data (it its simplest form)

So when would I need an app server against html db?

Tom Kyte
February 01, 2005 - 8:52 am UTC



:) good question in many cases....

htmldb does have all of the attributes of an app server (there is an "app server" there, apache -- to translate urls into stored procedure calls):

<quote>
The main #1 purpose of an application server is to avoid having to deploy an
application to the desktop.
</quote>

html db does that.

dave, February 01, 2005 - 11:02 am UTC

So............

You saying app server could be redundant - its there cos people like java or something?

My app here we use, clustered app tiers and web tiers and RAC clustered databases for functionality that I *think* could be achieved with simply a RAC database and HTMLDB

We have a few thousand users - at what point would HTML db become unsuitable and we need an app server?

Tom Kyte
February 01, 2005 - 2:18 pm UTC

no, i'm saying "html db is an app server solution"




depends on your tranaction rate.

Lets say you set a target of "a page takes 1/10th of a second to generate" (something I try to more or less achive, 1/4 of a second is hugely long to me).

So, lets go for 1/4 of a second. So a CPU could do reasonably 3 requests per second.

16 cpus -- 48 pages/second.

Such 16 cpu could theoretcially deliver out about 3,000 pages per minute (not URLs, pages -- the images/etc would be static files as normal).

Is that big enough?

And -- do your java applications have the same "1/10", "1/4" second mentality? I find that they can tend to really beat the %$@# out of a database issuing some really nasty SQL (due to not actually ever learning how to write the stuff)

And they they try to "fix" it in the middle tier... "oh databases don't sort good, we do that here". "oh databases join bad, we do that here in the middle" and so on.

And then they end up needing a gazillion middle tier to sort, join and filter data.

Give me 1 good database programmer anyday :)



Hows this, asktom -- 2 cpus (hyperthreaded, looks like 4)

13,000 users per day (more really, 13,000 distinct ip's per day and firewalls/nat hides many)

currently doing about 2,000,000 page views a month, 75-100k per day during the week.

Machine is typically idleing at 80% (way bigger than i need)

Oh, and it hosts another site too....



Why Use App Server?

Jon, February 01, 2005 - 12:45 pm UTC

<quote>
You saying app server could be redundant - its there cos people like java or something?
</quote>

People don't use app server because they like Java or any language.

There are many reasons for using application server. If the application is an enterprise-level, it is a necessity to use application server for cost-effective, scaleable and HA solutions.

You can argue that HTMLDB can be deployed as a RAC to have the enterprise features. However, it is not very cost-effective because RAC licensing is much more expensive (i.e. easily over several millions) than another J2EE app server (few thousands $). And, these are just software costs. Hardware for RAC is also more than J2EE app server.



Tom Kyte
February 01, 2005 - 3:37 pm UTC

and how does the app server give you "enterprise features"?!? he asks not rhetorically at all.


you got it all wrong there. all wrong.

check out a 64 cpu, 16 node cluster, using off the shelf inexpensive hardware -- running RAC, doing 1.8 million tpm/C's (www.tpc.org)

The hardware, just about the same you use for an "enterprise app server", a 4 node intel box.


having a gazillon "app servers" doesn't make you "enterprise", just means you have a gazillon app servers to maintain, manage, deploy to.


It isn't highly available unless the database is up and running.





dave, February 01, 2005 - 1:33 pm UTC

but if you want HA, you would need to cluster the database anyway

HA

Billy, February 02, 2005 - 2:56 am UTC

Define HA and the answer could be RAC. Or it could be something else.

The majority of time HA is thrown around without due consideration of the real business needs and addressing those.

Does RAC give you HA? What about the physical db sitting on the SAN and the SAN dies? Or the RAC is accessible via a single router/gateway/switch and that goes down? Or you have the RAC wired to a single power supply/generator without a UPS?

HA is more than just RAC. And it can exclude RAC entirely. E.g. why RAC a static database for HA? There are many alternatives, and a lot of them cheaper.

Nor do I think RAC is expensive - look at the feature set you get with RAC. Look at what the same feature set will cost you from other vendors, or having that feature set developed in house... and only then decide if RAC is really expensive or not. Especially when the RAC type hardware is dirt cheap compared to high-end SMP servers (like a Superdome) and can provide superior scalability.


Tom Kyte
February 02, 2005 - 5:09 am UTC



RAC is part of HA, not the entire thing, just like a cluster of j2ee stuff is part of HA, it is not HA in itself.




Enterprise?

Billy, February 02, 2005 - 3:43 am UTC

Jon from Redwood Shores, CA said:

> People don't use app server because they like Java or any
> language.

Nor is "app server" the sole domain of Java or J2EE.

Not forgetting that app server is STILL client-server. Client-server is a software architecture. 3-tier architecture is still client-server.

And then we have the J2EE prophets are proclaiming the death of client-server... Make one wonder just how blind their Java religion and faith have made them.

> If the application is an enterprise-level, it is a
> necessity to use application server for cost-effective,
> scaleable and HA solutions.

These characteristics are desirable for all applications. Not just those that get labeled as "enterprise".

> You can argue that HTMLDB can be deployed as a RAC to have
> the enterprise features.

Yes you can. But RAC does not magically change HTMLDB into an enterprise applications.. just as throwing a bunch of Java App Servers together does not create an enterprise application.

> However, it is not very cost-effective because RAC
> licensing is much more expensive (i.e. easily over several
> millions) than another J2EE app server (few thousands $).

Untrue and a total architectural misconception.

The database needs to handle x million of transactions per day. Will throwing more JS2EE servers at it allow the database to suddenly be able to handle that many transactions a day?

The database needs to be 9 5's. Will throwing more J2EE servers at it allow the database to meet that requirement?

Of course not!

What is the core of the business? The data? Or the application?

Ask any user what is more important. The data in his/her spreadsheet, or the spreadsheet software?

Applications come.. and applications go. Data not.

Performance? Scalability? High availability? Enterprise? You need to start that at the core. At the data. At the database.

A bunch of J2EE servers does not make something "enterprise".

> And, these are just software costs. Hardware for RAC is
> also more than J2EE app server.

Untrue. You need to scale the database platform anyway when talking Enterprise - unless you care to describe just how you can make the database platform handle more transactions, more SQLs, by simply adding more J2EE servers.

For HTMLDB, the buck stops there. Scale the db server platform. The HTMLDB app server resides in the data as part of the data. It scales with the db platform.

For J2EE, the buck needs to go further. You also need app tier platforms. You also need to scale them. You need to administer them. Developers need to deal with the complexities of the layers between the app server and the database. Security issues. Dealing with the data outside the database as oppose to inside that database.

I deal with both. HTMLDB simply works. With Java App Servers... the issue list is never ending. Cursor leakage. Performance issues (after all, data needs to be shipped across the network from Oracle to the App Server). Java VM version issues. Stability. Processing pool issues (Oracle MTS is mature and works out-of-the-box).

J2EE? Old technology, painted pink, dressed up in a pretty skirt and being sold as something new. Back in the 80's we used this architure. With the exact same architectural software components. Only we called them something different. Instead of an App Server, a Universal Transaction Monitor - app server is though much better descriptive of this component's functions. Interactive Format Generator instead of web browser. TAC (Transaction Action Codes) instead of HTTP PUTs and GETs. Etc. Etc.

J2EE does nothing new. And should never replace commen sense and logic when dealing with solving business requirements, despite the urges to wear shades, looking kewl, using the latest buzzwords in technology.



Tom Kyte
February 02, 2005 - 5:10 am UTC

<quote>
Yes you can. But RAC does not magically change HTMLDB into an enterprise
applications.. just as throwing a bunch of Java App Servers together does not
create an enterprise application.
</quote>

well said!

all well said

dave, February 02, 2005 - 5:22 am UTC

my underlying question is.

Why would I want to use an app server nowadays above HTMLDB?

What can an app server do that HTMLDB can't that would force me down that route

Tom Kyte
February 02, 2005 - 5:24 am UTC

html db requires an "app server"

html db is a programming environment.

j2ee is a programming environment.

oracle forms is a programming environment.

php is a programming environment.

they all use an application server (be it a simple http server, whatever) to host themselves.

the app server is part of the underlying infrastructure.

Please Explain about 9iAS and 9iDS more..

Drumil Narayan, February 02, 2005 - 7:43 am UTC

Hi Tom,

We want to deploy, oracle 9i forms and reports on web using 10gAS application server.

During the installation of 10gIDS i found that it also installs forms and reports server, then what exactly is the difference between the forms and reports server of 10gids and that of 10gAS. I mean can we use only 10gIDS/9iDS
instead of 10gAS if we want only forms and reports to run on web..

thanx in advance..drumil



Tom Kyte
February 02, 2005 - 7:59 am UTC

one is development platform, other is deployment platform. they are separately licensed as I understand it -- but you would be best off talking to your local sales contact for accurate licensing information.

Several Reasons

Tyler D. Muth, February 02, 2005 - 8:08 am UTC

Dave,

Tyler here, member of the HTML DB team (for almost 5 years now). Obviously my opinion is a bit biassed, but I'll try to be objective.

Reasons to use Oracle Application Server:
- You need write apps that use data from different vendors databases, such SQL Server, MySQL, DB2, etc. Without transparent gateways (hope that's still what they are called), you have no options for this with HTML DB.
- You need to write apps that update data in multiple Oracle databases and you don't want to use db links due to performance considerations. HTML DB "lives" inside 1 database. Working with other Oracle databases means you either install HTML DB in all of them, pull all of the data locally using replication, or use db links which are slow.
- You have talented Java developers that don't really know SQL or PL/SQL. While we strive to make it point and click, when you want to do more advnaced things in HTML DB, the logic is written in SQL and PL/SQL.
- You need publish web services. To date, HTML DB can only subscribe to web services, not publish them. As soon as the db does this natively (hopefully soon), it will be a feature of HTML DB.
- You need to build something really, really, REALLY big. You've seen Tom's numbers. We run another machine internally that gets well over 350,000 distinct page views per day on a 2 processor box. It flies. The avg page view times NEVER go over .25 seconds. If they do, something else is going on. If you need to do something on the scale of amazon.com, I'm simply not sure how well it scale THAT high since more processors or RAC are you're only options. It's not that we know it won't scale that high, just that we haven't seen it done yet and therefore won't tell you that it can.


With that said HTML DB apps are as fast (or slow) as you make them. We give you the ability to trace and monitor performance including:
- Debug mode: 1st step if a page is slow. Shows you the timing of all individual components on a page so you can tell if it's a report or an LOV that's slow.
- trace: add &p_trace=YES to the URL and poof, there's a trace file in the user_dump_dest. TKPROF until your heart's content.
- Performance reports: We give you weighted performace reports that show you which pages are slow so you can go after the "lowest hanging fruit"

OK, back to app server has many more components than just J2EE:
- Reports. Do you want PDF or Word output? Reports is the answer. Scott Spendolini is working on a How-To now for reports and HTML DB integration. Look for it on the HTML DB section on OTN.
- Single-Sign-On (SSO): HTML DB integrates with this too, but does not do it natively. The identity mangement component is one of my favorites. It's LDAP complient, integrates with everything (including active directory) and just works. There's a How-To on SSO+HTML DB on OTN as well.
- Wireless. HTML DB does not do WAP.
- Web Cache. Need to cache content for scalibility? Want to do compression (there are other options, though completely unsupprted, search asktom for mod_gzip, you're using it right now).
- Content management. WebDav rocks. Check out the Content Management SDK on OTN.

Hope this helps,
Tyler

Tom Kyte
February 02, 2005 - 8:23 am UTC

<quote>
...
You need to write apps that update data in multiple Oracle databases and you
don't want to use db links due to performance considerations. HTML DB "lives"
inside 1 database. Working with other Oracle databases means you either install
HTML DB in all of them, pull all of the data locally using replication, or use
db links which are slow.

</quote>


that is bad advice. the alternative I think you would be suggesting would be "let a j2ee programmer write their own joins, perform the two phase commit outside the database"

Nope, dblinks are slower than "not dblink", but definitely prefered to letting joe programmer do it outside the database. dblinks should not be used when you don't need them, but they SHOULD be used when you do.



Keeping me Honest

Tyler D. Muth, February 02, 2005 - 10:04 am UTC

Tom,

I wasn't thinking of constructing a "logical" transaction across multiple databases with Java logic, but looking at my post, it sure reads that way. Note to self: Don't post before first cup of coffee.

Thanks,
Tyler

Brilliant!

VA, February 02, 2005 - 10:45 am UTC

Brilliant thread, great discussion. Thanks!

Tomcat and Oracle 9i - all in one box

Laxman Kondal, February 02, 2005 - 11:59 am UTC

Hi Tom

What are the advantage and disadvantage (performance, stability, dependability)of having few Oracle 9iR2 instance (one or more then one), and Tomcat running on same machine and O/S Redhat Linux.

Regards


Tom Kyte
February 03, 2005 - 12:52 am UTC

first, a single machine should never have more than a single instance of oracle outside of a testing environment.

second, there is no problem running a webserver/app server and database on the same machine given the proper amount of resources (i do, asktom is a database + apache on the same machine)

Webserver/App server and Database on the machine

Laxman Kondal, February 03, 2005 - 7:11 am UTC

Hi Tom

Its ok to have one Oracle instance on one machime but what if 2G RAM and 80G disk drive and still one instance. Should there be some thing with resources available and the number of instance should be on one machine.

Logically it seem ok but technically I don't know why only one instance.

Thanks for all the help you provide.



Tom Kyte
February 03, 2005 - 1:49 pm UTC

what is 2gig of ram and 80gig drive (thats my laptop :) ??

a server should have at most an instance.

J2EE

mo, February 03, 2005 - 9:04 pm UTC

Tom:

As a followup to my questions on J2EE above, I am referencing a statment from "Beginning J2EE 1.4" book: "Enterprise JavaBeans are to J2EE what Mickey Mouse is to Disney - its the flagship technology of the platform."

Sure you can can have a JSP and embed java code which gets compiled into servlet later. However I do not really understand how you can code your business functions in pl/sql in the database and then call them from a servlet or strut and call that a J2EE application? can you elaborate on what makes an application a J2EE application.



Tom Kyte
February 04, 2005 - 2:03 am UTC

and guess what, if mickey mouse, the mascot took the day off, it would still be disney.


I find it ironic that they would compare EJB's to mickey mouse, sort of funny isn't it.

J2EE is a collection of methods. It is an architecture. whether a bean calls a stored procedure or it calls sql directly -- so what? SO WHAT?

don't over analyze this, j2ee is just a programming paradigm. if it calls sql, or a plsql stored procedure that does sql, or an RPC to another java thing or a 3rd party API or fopen/fread to process a file or WHATEVER, it is just calling stuff.

Scalability

Billy, February 04, 2005 - 1:01 am UTC

Laxman Kondal from Springfield, VA said:

> Its ok to have one Oracle instance on one machime
> but what if 2G RAM and 80G disk drive and still one
> instance. Should there be some thing with resources
> available and the number of instance should be on one
> machine.

Scalability does not mean adding more instances (I take it this is what you implied?). Just as it does not mean adding more hardware.

So what does it mean? Faced this question myself and decided the best way was to show our developers how my teensy desktop (256MB RAM) running Linux and Oracle 9i, can accept a 1000+ app server connections by using MTS (Multi Thread Server aka Oracle Shared Server). Then I showed them how our big Unix servers failed to accept more than 120+ connections using Oracle Dedicated Server.

Why would you want two instances on a single platform to handle a 1000 connections, when a single instance easily can? Why two instances, when each instance has a resource footprint? Why pay for the SGA, temp space, undo/rollback spaces twice? Why have two sets of Oracle system processes (PMON, SMON, etc)?

Two instances on a single platform does not allow you to suddenly process more data. Does not suddenly double capacity. In fact, it will likely do the opposite as you now have to pay in resources (CPU, memory and diskspace), the basic costs of having another instance - thus taking resources away from the 1st instance. (of course, Superdome type architecture is different)

A single Oracle instance is very capable and is extremely scalable. How well it does it entirely depends on how *you* configure and use it.


Tom Kyte
February 04, 2005 - 2:07 am UTC

two instances on a single server only means you can do less work, accept less connections than if you had one instance....

Why onlu one instances in each box

Laxman Kondal, February 04, 2005 - 8:26 am UTC

ItÂ’s right that two instances will not speed up any thing but resources are doubled.

LetÂ’s take a case of client having two applications and both have nothing common in it - budget planning and shop-floor maintenance (paperless maintenance).

How do you put them in one instance?
Even if in one instance connections are still going to be same and same amount of work is done in much more time.

Senior DBA - what ever, have one big real big server and wants to keep both applications and two instances in one server, because it has plenty of space/resources and all in one attitude - and client/boss IS not so technically tuned in such low level details of how software works, which is totally left to the professionals – supper duper DBA.

Just think about it what would be the situation if I just say one box one instance - thatÂ’s it, why because thatÂ’s the way. If I had not gone though this site and going though Oracle concept document and certifications, sure I would be the one to say thatÂ’s the way it works.

To me there should be a technical reason rather ‘THAT’S THE WAY ORACLE RECOMEDS AND WORKS BETTER’.

Thanks.


Tom Kyte
February 04, 2005 - 11:54 am UTC

how do you put them in one instance? what do you mean by that, you have a budget schema and a maintainence schema.

there, they are "put" into one instance.

Now I have one lgwr (perfect)

I have one dbwr or a set for my disks (perfect)

I have one smon

I have one buffer cache that surprisingly will share lots of stuff (think dictionary information etc)

I have one shared pool

I have one database that I can use the resource mgr on (so budget cannot overwhelm the machine and eat all resources)

I have one instance to "tune"

I have one database to backup

I can point in time recover either application

When users use both applications (as there will be at some time) I have one user account to manage

It is the power of ONE.

two instances -- not smart.


The smart DBA, goes for one instance

Your "super DBA", I would show them to the front door and thank them for their time.



Amazon's architecture/HTMLDB

Jens, February 04, 2005 - 9:21 am UTC

Tyler said:

"You need to build something really, really, REALLY big. [...] If you need to do something on the scale of amazon.com [...]"

Does anybody know the architecture of amazon? Have they build their software on a typical "standard" J2EE-environment, what every Java magazine reader would love (database only for indexes and tables, business logic in the app server) - I dont't think so.

Tyler, there is a need of real customer success stories about big HTMLDB apps on the Oracle website.




Tom Kyte
February 05, 2005 - 1:05 am UTC

Jens,

Product management is working on this, but I will pass on your request to them on monday. You'll be happy to know one of the HTML DB developers is German so it has to be good, right? He's still a little bitter that we spent the whole week of OracleWorld trying to get him to say "California" (think Govenator here).

Tyler

J2EE

mo, February 04, 2005 - 10:21 am UTC

Tom:

1. Are you basically saying that if we are using a J2EE application server then we have a J2EE application regrdless how you code your business functions (pl/sql or java).

It seems some say that J2EE means (JSP, SErvlets, EJB, JDBC) and not pl/sql, net8 etc.

2. I have an application using MOD_PLSQL and all businesss logic is in PL/SQL in the database. Now I want to convert this to a J2EE architecture/application. What do I need to do?

Thanks,
Thanks

Tom Kyte
February 04, 2005 - 11:59 am UTC

1) you have j2ee because you coded some j2ee stuff -- that plsql or sql or whatever was involved is somewhat "not a little bit relevant at all"

j2ee is not "every thing java, all java, only java"

2) don't ask me, it would not be a good idea, it is fine as it is.

J2EE

mo, February 04, 2005 - 12:14 pm UTC

Tom:

I know it is not a good idea to convert from mod_plsql to J2EE.

I was trying to see your answer so I can explain to the customer what complications are involved and that would be no final benefit to the end user?

It seems to me that J2EE is targeted for large scale distributed applications.

Tom Kyte
February 04, 2005 - 12:18 pm UTC

sorry....

without mod_plsql, your htp/htf stuff "goes into a bit bucket", so converting to "j2ee" involves what they call "a rewrite"

"fake" J2EE

Tom, February 04, 2005 - 1:10 pm UTC

You could always call the mod_plsql procedure using java and then call htp.get_page() to return the generated html from the mod_plsql page to the java. Finally use response.write() to output it to the client and there you have it.

You can now tell the pointy haired boss that the application is J2EE whilst leaving the business logic in the database in PLSQL where it belongs!



Tom Kyte
February 04, 2005 - 2:11 pm UTC

and then you have to figure out how to parse the URL, set the owa cgi env, and do things that mod_plsql does.... but sure.


you could recode mod_plsql as a "bean" and make it j2ee all of the way, it would be "so cool" wouldn't it.

not really, it works, it scales, it gets the job done.

J2EE

mi, February 04, 2005 - 6:12 pm UTC

Tom:

1. Bottom Line. There is nothing to gain from converting a mod_plsql to J2EE application. It would be a waste of time/money. Is this correct?

2. To create a J2EE application it is better to start from scratch using it. Correct?

Tom Kyte
February 05, 2005 - 5:26 am UTC

1) in my humble opinion, yes.

just as if you had a working, finished, done, in production j2ee application, there would not be much to be gained from porting it to mod_plsql.

just as they would not be much use in taking oracle and rewriting it in java -- just because java is cool.


2) to create an application in technology X, it is generally prefered to start with technology X from the very beginning, yes.

Cost Effective of App Server Vs. Database

Jon, February 04, 2005 - 10:30 pm UTC

Billy from Cape Town (South Africa) wrote:

>And then we have the J2EE prophets are proclaiming the death of client-server...
>Make one wonder just how blind their Java religion and faith have made them.

Not sure which J2EE prophets you are hearing from.

On the opposite end, I have heard database prophets who advocate customers use J2EE application servers inside the database.

Here is one example:
Remember about 5-6 yrs ago, Oracle introduced its first J2EE inside Oracle8iEE? Oracle touted how its Servlet Container (OSE) run faster, more robust, more secure, all the benefits of the database, etc...

Within a year or less, Oracle depreciated all J2EE in its Oracle9i. Oracle swallowed its pride and licensed a J2EE application server from Orion. (It was a very good business decision because Orion was and still is very cheap, which allowed Oracle to earn amazing profit margin by selling at a higher price with a new packaging).

So, why did Oracle dump its J2EE app server inside the database?

1. Scaleability. Transactional logic or data are expensive. Just read how Oracle acquires enqueues and latches to handle even simple tasks. Having transactional and non-transactional logic (i.e. creating static/dynamic contents) inside the database is just unnecessary strain to the database. The database can become "a single-point of bottleneck".

2. High database cost. Database is MUCH more expensive than application server (here I only have to say just the software license, not even minimum hardware costs). This is probably rightly so because database is more comlexed and essential to any business to handle "transactional" logic/data. (Transactional is the key here). However, if there is no transactional need, why pay for A LOT more?



To Tyler

Jens, February 05, 2005 - 5:56 am UTC

"You'll be happy to know one of the HTML DB developers is German so it has to be good, right? "

Oh great! Perhaps you could give me his e-mail address (warsaw25@gmx.de)? - I'm working as an Oracle freelancer (not the best times here) and try to establish HTMLDB at my customers. You've developed a great product!

But I think that the positioning that Oracle does for HTMLDB goes sometimes in the wrong lane (I saw an Oracle presentation here, where it was sold like a funny mickey mouse environment for secretaries to build their own telefon database). If I could talk to somebody from the HTMLDB-team who speaks my language, I could give him my point of view about the positioning of this product.

"He's still a little bitter that we spent the whole
week of OracleWorld trying to get him to say "California" (think Govenator here). "

Hahaha, then he should let you say the word "Apfelstrudel"!






J2EE app servers vs. Oracle instances

Billy, February 07, 2005 - 1:22 am UTC

Jon from Redwood Shores, CA wrote:

> Within a year or less, Oracle depreciated all J2EE in its
> Oracle9i. Oracle swallowed its pride and licensed a J2EE
> application server from Orion.

Well Jon, I'm pretty sure that once again management refused to listen to the tehcnical experts, forced their decision through, only to discover it does not work as they fantasized it should.

Or at least, this is what my personal experience tells me, dealing with marketing and sales in the corporate world.

> So, why did Oracle dump its J2EE app server inside the
> database?

Why on earth would you want a J2EE app server inside Oracle when you have PL/SQL? Fact. Nothing that Java can do with data inside the database, it can do better than PL/SQL.

> 1. Scaleability. Transactional logic or data are
> expensive.

Untrue. Locking is not an overhead. It is an essential and integrated part of the business process. What would happen to your and my bank account without transactional logic and locking? No doubt that we will be smiling.. until the bank goes bankrupt as it never could get our bank balances right without locking.

Anyone that thinks that transactional logic and locking are nice-to-haves, are sorely mistaken.

As for expense - locking is expensive in database like Ingres. Where you need to deal with issues like lock escalation. With writers blocking readers. Etc. None of these is an issue in Oracle.

> Having transactional and non-transactional logic (i.e.
> creating static/dynamic contents) inside the database is
> just unnecessary strain to the database.

Oracle is a data processing platform. Whether that data is static or dynamic... data is data. Thus I cannot accept your statement.

Please prove that creating dynamic content places a strain on the database. Show me the design, show me the code. Debating opinion is fun, but I rather be debating facts.

Like the fact that it took milliseconds for HTMLDB to generate the dynamic content of this page you're looking at, right now.

The proof. Look at the URL above. Change the text parameter NO in the URL to YES. I.e.
</code> http://asktom.oracle.com/pls/ask/f?p=4950:8:862340566160665686::YES::F4950_P8_DISPLAYID:376767427785 <code>

This enables HTMLDB debugging. Look at the dynamic data generation times. Is that slow? Does it "strain" the database?

> The database can become "a single-point of bottleneck".

Point being? *ANY* component (software and hardware) can become a bottleneck.

That said, Oracle usually is not the bottleneck in my experience. Unless it is tasked to run poorly written code using badly implemented designs.

Simple example. Billing month-end on a production database I own was slow. Excrutiatingly slow. Oracle got blamed. So I monitored month-end. Discovered that in the 13+ hour period, the processing was processing 1.1TB of data. The actual physical database (complete db, including indexes, temp space, redo, etc) was 80GB.

Oracle was smoking. I worked out the transaction/second rate. It was unbelievable fast. But of course, any process that turns a 80GB database into a 1.1TB data process, is severely flawed. And of course, the developers blamed Oracle.. and not their poorly designed and written code.

> 2. High database cost. Database is MUCH more expensive
> than application server

Look at the licensing for commercial databases like Oracle and SQL-Server and others. Fact. You either need a per CPU license or Named User Licenses (Client Access Licenses/CAL in SQL-Server speak).

If you have a 1000 user load, you wind up paying for that either via CPU or named users licensing. You need this IRRESPECTIVE of whether or not you plan to deploy J2EE or whatever other architecture.

So the J2EE cost is ADDITIONAL costs to the database. It does not reduce the database cost. App servers do not enable the database server to run more SQLs per second or more transactions per second. App servers do not povide, never mind replace, "enterprise' database features like parallel query, partitioning and so on. You need to buy and license those feastures.

Comparing the cost of an application server with the cost of the database server is meaningless.



Tom Kyte
February 07, 2005 - 4:38 am UTC

it is almost a "religous war", one that I've almost sometimes given up on. The database as a platform is extremely powerful, for those that desire to use it.




Application Server Vs. Database

Jon, February 07, 2005 - 2:50 am UTC

<quote>
Nothing that Java can do with data inside the database, it can do better than PL/SQL.
</quote>

The key word in the above statement is "data", i.e "transactional data". For many applications, especially web-app, don't just use transactional data. They have lots have non-transactional data. So, why not use them on the application server outside of the database?

<quote>
Untrue. Locking is not an overhead. It is an essential and integrated part of
the business process. What would happen to your and my bank account without
transactional logic and locking? No doubt that we will be smiling.. until the
bank goes bankrupt as it never could get our bank balances right without
locking.
</quote>

You are missing the point. Everyone knows that transactional service is important. However, not everything should be transactional. For example, the web static contents (e.g. pages, images, JS, etc.) don't have to use transactional service. Therefore, these contents are expensive if you put them as transactional data, when they don't have to be in the first place.

<quote>
Oracle is a data processing platform. Whether that data is static or dynamic...
data is data. Thus I cannot accept your statement.
</quote>

So, are you accepting that every data is the same? Or, put it another way, are no data more important than other?

Obviously, all data are NOT the same. Some data are not as important as other data. For the important data, I put them inside the database and make sure the database have all the resources available to handle them. For the not so important data, I don't have them to take away my valuable DB resources, which should handle the important data.

<quote>
Please prove that creating dynamic content places a strain on the database. Show
me the design, show me the code. Debating opinion is fun, but I rather be
debating facts.
</quote>

This is a simple one. Does Oracle use enqueues
and latches for a simple select, execution of stored procedures, etc? The answer is YES. So, why put non-transactional data (again, static web contents, JS, CSS, images, etc) inside the database that use these resources when they don't have to?

It is like parsing. Why do people use binding variable? It is to avoid many parsing when parsing is not necessary. To paraphrase Cary Millsap: It will run faster when you parse only a few times. It will run fastest when it does not have to.


<quote>
> The database can become "a single-point of bottleneck".

Point being? *ANY* component (software and hardware) can become a bottleneck.
</quote>

The point is that the database can be a single-point of bottleneck when it is being misused by handling non-transactional data.

<quote>
Look at the licensing for commercial databases like Oracle and SQL-Server and
others. Fact. You either need a per CPU license or Named User Licenses (Client
Access Licenses/CAL in SQL-Server speak).
</quote>

Once again, you are missing the point. Database is expensive compared against application server. Please check OracleAS 10g R2 and Oracle 10g R2. Which software do you think will cost more?

<quote>
If you have a 1000 user load, you wind up paying for that either via CPU or
named users licensing. You need this IRRESPECTIVE of whether or not you plan to
deploy J2EE or whatever other architecture.
</quote>
This is the point. If you put everything inside the database (not using the app server), your database can reach the point that it can no longer handle the load. So what do you do? Buy more expensive RAC? :)

The right solution is to move some execution away from the database to application servers when they don't need transactional service.

<quote>
So the J2EE cost is ADDITIONAL costs to the database
</quote>

This is partly true. I like to think this way: Application servers (J2EE or .NET) save lot of $$$ by NOT having to buy MORE databases.

<quote>
Comparing the cost of an application server with the cost of the database server
is meaningless.
</quote>

I say not able to understand their purposes and compare their differences (including $$$) are pure ignorant.




Billy, February 08, 2005 - 1:22 am UTC

Jon from Redwood Shores, CA wrote:

> The key word in the above statement is "data", i.e 
> "transactional data".  For many applications, especially 
> web-app, don't just use transactional data.  They 
> have lots have non-transactional data.  So, why not use 
> them on the application server outside of the database?

Because data is data. "Transactional" or not.

You want 
- easy and uniform access to the data 
- ability to track usage of the data
- secure the data against unauthorised access
- manage & administrate the data
- backup the data
etc.

Doing these outside a database, is difficult. Complex. Expensive ito development.

A database handles static data as well as it handles dynamic data. Case in point - we do not put static Data Warehouse Fact Tables of billions of rows in an app server or in a o/s flat file.

> However, not everything should be transactional.  For 
> example, the web static contents (e.g. pages, images, JS, 
> etc.) don't have to use transactional service. 

The issue it not transactional. The issues are what I listed above. Data management and usage. It is many times easier in all respects, to have data in the database. Even images and style sheets and java script.

> So, are you accepting that every data is the same? 

By its very definition, data is data.

> Or, put it another way, are no data more important 
> than other? 

Of course the value of data is not uniform.

> For the important data, I put them inside the database and
> make sure the database have all the resources available to
> handle them.  For the not so important data, I don't have 
> them to take away my valuable DB resources, which should 
> handle the important data.

DB resources are cheap. A dime a dozen. What makes you think that db resources are expensive?

What is the major function of a database? It says so in the name. Database Management System. It enables you to manage data. Any data.

Oracle loves data. It thrives on data. It can doing amazing stuff with data. Data outside the database is like raw ore. You need to process and refine it before you can use. Inside the database, it is processed and ready to use.

> Does Oracle use enqueues and latches for a simple select, 
> execution of stored procedures, etc?  The answer is YES.  
> So, why put non-transactional data (again, static web 
> contents, JS, CSS, images, etc) inside the database that 
> use these resources when they don't have to?  

Your mistake is thinking that enqueues and latches and so on are expensive and overheads. And that similar mechanisms do not exist in the app server itself. It does.

Your second mistake is thinking that moving static data out of the database and into the file system, lowers the data's resource footprint. It does not.

So now you have an image in a file and not a database BLOB. You need a file handle to open the file. The operating system needs to lock that file in read-share mode (or whatever locking method you select with the fopen)

So where have you saved on resources ito enqueues & latches? You have not. Simply moved the data from the database (designed specifically to scale this extremely well) to the operating system (not designed at all for this).

Why do you think we have databases in the first place?

> The point is that the database can be a single-point of 
> bottleneck when it is being misused by handling 
> non-transactional data.

Come on! How can you misuse a database by putting into it, what it is designed to manage? DATA!!

Does a Data Warehouse contain transactional data? Hell, I do not do a *single* INSERT/UPDATE/DELETE transaction on my Data Warehouse fact tables. (data is appended via partition additions)

So using your reasoning, I'm abusing the database and should move the fact table, 0.8 billion rows & counting, into the app server tier.

Can your app server tier do this with non-transactional data?
==
SQL> select count(*) from x25_calls;

COUNT(*)
----------
813696570

Elapsed: 00:00:36.91
== 
> Once again, you are missing the point. Database is 
> expensive compared against application server.
> Please check OracleAS 10g R2 and Oracle 10g R2.  
> Which software do you think will cost more?

We're talking kind of cross purposes here. Of course the database is (usually) more expensive. But comparing the pricing is silly. An app server is not a database. Does not have any of the DBMS features of the database.

HOWEVER.. the database (speaking specifically about Oracle) has a very large set of app server features.

> This is the point.  If you put everything inside the 
> database (not using the app server), your database can 
> reach the point that it can no longer handle the 
> load.  So what do you do?  Buy more expensive RAC? :)

No that is not the point. APP SERVERS DO NOT SCALE THE DATABASE. That is the point.

If you have a 1000 user load, you need to be able to handle that 1000 user load in the database, transaction wise and SQL query wise.

You have to PAY for that 1000 user load. Be that via Named User Licenses or CPU licensing.

Adding an App Server and having it use only 50 named user accounts (or single app account) to service a 1000 users is illegal.

Adding an App Server does not take the load off the database when it comes to transaction and SQL processing.

Again, app servers do not scale the database.

So why then use the database server also as app server? Valid question. The reasons - simplicity, flexibility and performance, cost and scalability.

Simplicity.
With PL/SQL I do not deal with thin JDBC and other complexity layers that are between my code and the data in the database.

Flexibility.
PL/SQL is not a mickey mouse type macro-style scripting language ala Transact-SQL. It is a formal procedural language. And in addition to its ability to handle Oracle data extremely well, in PL/SQL I have
- pipes
- TCP sockets
- a web browser
- a HTTP/CGI interface
- multi-threading (pipelined functions)
- o/s file i/o
- an e-mailer
- job management system
etc. etc. 

Performance.
As I do not need to ship data from the database to the app server across a network via thin JDBC layers and what not, I already score performance wise. Not to mention that PL/SQL was designed for processing data. It does it extremely well. And I can compile my PL/SQL code to native machine code for an additional performance boost. 

Cost.
Less hardware. As the database platform serves as app server too, hardware costs are less. As no app server software is needed, software costs are less. Development times are faster as developers deal with fewer complexities (all they deal with is PL/SQL and data). Bugs are less as the complexities are less. Response to changes in business requirements are far more rapid.

Scalability.
Oracle scales. Hell, it scales magnificantly. You write your PL/SQL code properly, it scales with. Why do you think I get a SELECT COUNT of 0.8 billion rows returned in just over 30 seconds? On old K-class HP hardware (in case you were wondering what is under the hood). Scalability. 


Jon, the issue is not app server, good or bad. It is simply where the best place for the actual app server code is. And the majority of time, that is *INSIDE* Oracle as PL/SQL applications. 

J2EE is complex. It re-invents the wheel when it comes to the mature and robust and scalable feature set already provided by Oracle. 

Interesting Discussion

Jon, February 08, 2005 - 2:26 am UTC

"Can your app server tier do this with non-transactional data?
==
SQL> select count(*) from x25_calls;

COUNT(*)
----------
813696570

Elapsed: 00:00:36.91"

Look at your response time, more than 36 secs (more than 1/2 minutes).  Of course, application servers can do that and much faster.

One example is the search engine.  It uses many nodes of clustered application server to crawl, store, index, and search.  And, it is NOT a RDBMS.  :)

No RDBMS that enforces transactional data can crawl and search the Internet with ANY expectable response time.

Your example has ONLY hundred of millions rows.  Have you ever wonder how Google is implemented?  BTW, hundred of millions of rows are nothing.
 

Speed is..?

Billy, February 08, 2005 - 4:21 am UTC

Jon from Redwood Shores, CA wrote:

> One example is the search engine. It uses many nodes of
> clustered application server to crawl, store, index, and
> search. And, it is NOT a RDBMS. :)

Nor is it J2EE!!

Raising Google is actually giving me ammunition. This is apples versus apples. App Server vs. App Server. And clearly demonstrates the utter failure of J2EE as a technology when it comes to the real crunch. :-)

FWIW. I'm not against app servers.. I'm simply saying that Oracle database itself is also an app server. Has many advantages in being the app server. Makes a darn fine app server most times. But not always. (the only absolute statement one can make is that there are no absolute statements)

Yes there are exceptions where you will need to move the app server tier onto seperate hardware platforms due to sheer amount of processing power required and data volumes to process.

> No RDBMS that enforces transactional data can crawl and
> search the Internet with ANY expectable response time.

Database technology is a fundemental core of information systems. And sure, Google may not be using an off-the-shelve database product, but make no mistake - they do use database technology, even if self rolled.

> Your example has ONLY hundred of millions rows. Have you
> ever wonder how Google is implemented?

Index servers are an interesting concept. And it works great for Google. But that is one aspect. What makes Google hum is design. First and foremost. Design dictates the success or failure of a system.

As for implementing a search engine like Google using Oracle? Heck yes! I will really love to have a serious go at that. I trust the pay is good too? ;-)

> BTW, hundred of millions of rows are nothing.

Of course not. Simply illustrated that if Oracle can handle half a billion or so static data well, it will not have any problems dealing with a few 1000 images and style sheets and so on that you think is expensive/a problem to store in Oracle.

As for the Google example.. search engines are another beast all together. Thus dragging Google into the discussion is not really relevant ito the standard corporate "enterprise" architecture. Despite it showing the flaws in J2EE. :-)


Can OracleAS 10g run on 8.1.7 database

Michael, April 25, 2005 - 12:54 pm UTC


Tom Kyte
April 25, 2005 - 1:31 pm UTC

it can access one (jdbc drivers)

but the repository cannot reside in one

GOOGLE and Oracle

A reader, June 07, 2005 - 3:15 pm UTC

Tom,
there were some notes above on how GOOGLE is implemented. Sure search engine is a very specific "beast". Just curious - do you think it's possible to implement something similar to GOOGLE (in terms of storing, indexing and querying of comparable amount of data) with Oracle DB server? We are not talking about crawling, of course. Just data. It is always very helpful to read your comments on generic design issues. Thanks a lot!!!

Tom Kyte
June 07, 2005 - 3:58 pm UTC

I would definitely not say "you cannot", but it would take a good, intelligent design.

Can the religious war

Michael Friedman, June 08, 2005 - 2:55 am UTC

Can we all can the religious wars?

Let's face it - there are some areas where Java in a DB has real value.

For example, I need to write some code to parse MS Excel files saved as HTML. Doing it in PL/SQL would be inefficient and painful. Doing it in an application server (and calling it from a PL/SQL application) would be even worse - things like authentication become stupendously painful when you integrate from DB to Application Server instead of the other way around.

On the other hand, for low end work that is close to your data PL/SQL is the way to go - don't put a function implemented in Java in the select clause of a query unless you have absolutely no choice.

Actually, my biggest complaint is that the integration between the AS and the DB isn't better. For example, I should be able to call an EJB from a PL/SQL procedure and have it run within the same transaction and work with some kind of reasonable security model. Today that's totally impossible. For example, I put a huge amount of effort into trying to figure out a way to use OAS's CMSDK from within a PL/SQL based transactional system. I wanted to be able to do things like define views that returned CMSDK data and use triggers on relational table to modify folder structures in CMSDK. It's really not possible.

Tom Kyte
June 08, 2005 - 8:31 am UTC

I disagree, no religion involved.

This excel parsing example, it would be DRIVEN FROM the middle tier, not the other way around. Java would call PLSQL after it parsed. Not the other way around.

You do understand that EJB's and all of that other stuff is just reinventing what the database does right -- and that its transaction is precisely the stuff you say should be done in PLSQL in the first place (low end work that is close to your data).



Vijay, June 10, 2005 - 2:55 am UTC


over-glorification of mod_plsql May 21, 2003

Former Technical Writer, August 12, 2005 - 11:00 am UTC

Message to
Reviewer: Matthew from Canberra, Australia
over-glorification of mod_plsql May 21, 2003

Actually, back in the mid 1990s, I created a 719 page software manual in Microsoft Word 6.0 on a 486-66.

Mind you, it took 2 full minutes to Save, but it was the only way I could find to maintain Index, ToC and page numbers.

You cannot imagine how relieved I am not to be in that career anymore (grin!).

Tom Kyte
August 13, 2005 - 8:59 am UTC

(you should have used linked documents, I always did. One document per chapter, one master document with the chapters linked in. toc's, indexes, everthing worked - but no monster document. It would have been impossible as different people were responsible for different documents.

Guess it comes back to knowing everything you can do with a tool and exploiting it)



pitfalls in a 2 tier architecture

Sanji, August 25, 2005 - 9:21 am UTC

Tom,
What are the pitfalls of a possible 2 tier client server architecture with the client connecting to the server over WAN.
Apparently our client intends to go ahead with this methodology and i have been suggesting an application server as the middle tier. Somehow i've been unable to convince him. Could you please list out a couple of drawbacks with this kind of structure.

Rgds
Sanji

Tom Kyte
August 25, 2005 - 2:13 pm UTC

the main things don't have to do with a WAN, they have to do with maintainability. How do you roll out version "2"? How do you patch an emergency bug patch? The problem with client server was the maintainability of the entire setup.

The WAN can affect performance in a "chatty" application -- latency is a word you'll become familar with (round trip time). It can make the fast operation on the LAN take minutes (or longer) on the WAN

Need EJB info

A reader, September 05, 2005 - 8:01 am UTC

Not AS..

Tom Kyte
September 05, 2005 - 11:01 am UTC

Ok, EJB - a 'technology' not so much in favor in 2005 as it was in 2000 that stands for "Enterprise Java Beans"

Hows that.

(hmmm, fairly vague don't you think?)

A reader, September 05, 2005 - 10:20 pm UTC

Tom,

>>Ok, EJB - a 'technology' not so much in favor in 2005 as it >>was in 2000 that stands for "Enterprise Java Beans"

Can you please elaborate on what other technology is being favored now..

Thanks.

Tom Kyte
September 06, 2005 - 8:07 am UTC

technology du-jour for application development. You pick one. Too many TLAs and FLAs to pick from (three/four letter acronyms).

I favor html-db ;) very simple.

HTMLDB

cg, September 14, 2005 - 2:26 pm UTC

Tom,
Know of any articles that talk about using "rich user interfaces" with HTMLDB.

Can I get calendar UIs and tab UIs with htmldb? Or is it the "basic" html.

thanks

Tom Kyte
September 14, 2005 - 3:26 pm UTC

others have shared their utilities on htmldb.oracle.com -- the htmldb studio.

tab UI - that "comes with", it is the interface I have here, yes they have calendar "date pick tools" and calendar reports.

HTML DB with 9iR2

A reader, September 15, 2005 - 12:35 am UTC

Hi Tom,

Can I use HTML DB with 9iR2?


Tom Kyte
September 15, 2005 - 7:44 am UTC

yes

dave, September 15, 2005 - 4:56 am UTC

yes you may, download 1.6 and install it onto 9.2.0.5 at least I think

oracle 9ias

sam, October 05, 2005 - 10:26 pm UTC

Tom:

We have several web applications developed in pl/sql that use mod/plsql. Now we need to convert a clent/server powerbuilder app to a web app. We are trying to move into using a HTML development tool like dreamweaver and an app server technology for security management and separating the presentation from business logic rather than intermingle everything in PLSQL procedure.
One problem I had with pl/sql procedures is to manage the whole site in dreamweaver. You cant do it because of all the htp.p calls.

What is the closest thing to accomplish that using 9ias or 8ias. Are we stuck with J2EE which is rather complex?

We are looking at coldfusion which provides an easy development environment with tag based like html but this means we will have mixed web servers: oracle 9ias and cold fusion. what do you recommend?

Tom Kyte
October 06, 2005 - 7:38 am UTC

</code> http://htmldb.oracle.com/ <code>

check it out.

App server dropping connections

Vinnie, October 06, 2005 - 10:48 am UTC

Tom,
We have a application that has mulitple connections into our dB via a App. server. We are having a problem where sometimes we will loose all connections into the dB at the same time. Could this be a dB issue? My thoughts are no.


Tom Kyte
October 06, 2005 - 12:02 pm UTC

shutdown abort would do that.....


insufficient detail - could it be a database issue? sure, use profiles and have an idle timeout for example.

What are the "symptons" here - is the app server getting "your session was killed" or just a 3113? or what?

application server

sam, October 06, 2005 - 9:47 pm UTC

Tom:

1. Do you know of any advantages of modplsql over coldfusion or vice versa. Our environement is all pl/sql procedures using mod/plsql and now some developers wants to try new project with coldfusion. I am trying to see any studies comparing the two. Some claim CF is faster and newer technology while modplsq is 10 year old technology.

2. Developers who promote Cold Fusion claim that modplsql is like CGI programming. It does not provide the folowing features that CF does:
a. Application security. You log in from app server to database using one account?
b. session management ( you need to keep passing parameters from one page to next)
c. You can't separate business code from presentation code.
d. Maintaenance: You can't manage an oralce web site with a tool like Dreamweaver. After you convert the html from dreamweaver to pl/sql it is hard to edit the HTML screen because you have to strip all the plsql code from it. IT is harder maintenance than CF which Deamweaver supports.

How would you answer them? Is this correct?

3. Does HTML DB resolve any of the above. I know it does session managment.

Thank you,

Tom Kyte
October 07, 2005 - 8:00 am UTC

1) for me - it is simple. I know plsql, I don't know coldfusion.

Why does the *age* of a technology even have any bearing on how *useful* it is.

Relational technology is even older - does that mean it is not good anymore? Coldfusion is as old as modplsql

</code> http://learncf.tamu.edu/articles.cfm?articleid=1 <code>
... ColdFusion was first released in 1995 by the Allaire Corporation. ....


owa (the Oracle Web Agent, the precursor to modplsql) was likewise released in ......... 1995.

So, actually, truth be told, it was not modplsql until about 5 or 6 years *later* so hey, modplsql is newer than coldfusion?


Not that it even remotely matters.



The speed of a page is relative to the efficiency of the code behind the page. To say coldfusion is "faster" is not really sensible. You can make fast, slow and medium timed pages in all.

2)

a) You can log in using a public account (like ASKTOM) or you can log in using database credentials (like ASKTOM - my admin pages require authentication) or you can log in using a connection pool of "public accounts" but use your own authentication mechanisms (including Oracle SSO - single sign on) to get to the connection pool.

In short, they would be "wrong" in their claim.

b) htmldb does this all for you. In my application called asktom - I have session state managed for me, it is a fundemental key concept behind htmldb, navigation, state management - all hidden, done for you, transparent

c) hah, look at cold fusion - it is analogous to an ASP or PSP. You want to talk about mixing presentation and business logic?!?!?!?!?! wow.


But that aside, any competent programmer would build an API (data logic), they would wrap a GUI around that (HTMLDB)

The result - a site like asktom here. I wrote the data API (create a question, create a review, followup a review, etc - the business logic). A guy named Joel Kallman wrote the GUI using HTMLDB. He did the pretty face to the boring logic.

By the way - this same logic was the logic of asktom version 1.0 - the version that did not use htmldb because htmldb did not yet exist in any shape or form. The *same* APIs that drove version 1 are used for version 2. Talk about separation of logic from presentation - it is all about how the developer decides to implement.

You can mix presentation+data together in any and every language.
You can separate presentation from data in any and every language.

We used to call it modular coding, but that isn't cool sounding anymore (goes back to the age thing I guess - old technology is perceived to be not good technology??).


d) with htmldb you would not really be using dreamweaver.



My answer to them is try the thing out, don't criticize it until you understand it, have used it. Then come up with things that are "true", not this list which isn't


3) all of the above.

app server

Sam, October 10, 2005 - 10:08 pm UTC

Tom:

1. I assume that “Relational Design” is more of a theory rather than a technology. Technology usually is built on theory. Can you imagine if we are still running oracle 6.0 or windows 3.1. These are called old technologies.

Is not saying speed of a page linked to code behind it more like saying a race car is as good as the driver. Sometimes you have better/faster race cars engines than others though.

2. On the issue of separating code from presentation, I donÂ’t know how you can handle all situations. Most apps are built around INSERT/UPDATE/DELETE/SELECT data.

a. For insert form, you can have one pl/sql procedure for insert form and one for the actual plsq/sql code.
b. For update, delete and select forms, the html has to include a cursor for the data and the pl/sql variables to set the html elements to. I donÂ’t think you can separate the html from pl/sql on this form? Do you have a sample how you do that?

3. I am not sure what you mean by using SSO or authentication mechanisms for security. Basically, let us say I have 10 group of users. Each user has access to different set of HTML links. Can I set something at the mod_plsql to define user groups/links access. Or do you implement this by creating 10 DADs? This would not be a good solution as each group will have a different URL to log on.

Thank you,



Tom Kyte
October 11, 2005 - 6:36 am UTC

1) relational design is not a theory, it is a "how to", a spec.

2) and they should not be, is something good because "most" do it that way?

use stored procedures that accept inputs and return outputs, separation.

3) you only need one url, user authenticates and application sets rolls appropriately (secure application roles, for example).



Relational Design

VA, October 11, 2005 - 9:45 am UTC

I would agree with the previous poster. Your analogy using "Relational Design" is not really appropriate. Relational Design is not a "technology" like a version of a software is. Heck, "boolean logic" is even older than "Relational Design" but thats neither here nor there.

Thanks

Tyranny of the requirement

Jim, October 11, 2005 - 12:25 pm UTC

I think the underlying (unstated) requirement is that the developers want to learn Cold Fusion because it looks cool on the resume. Like most technology questions the problem is political not technological or scientific.

Since Tom didn't give them they answer they wanted to hear, new "requirements" will come up, new FUD (fear, uncertainty, and doubt) will be planted with the management. One can always craft the requirements and move the goal posts to achieve the "answer" they desire. I wonder if there is a strong corrolation between that behavior and projects failing. Naw, couldn't be.

Some Clarification..and a little help..

Juan Esteban Alzate, November 15, 2005 - 10:48 am UTC

it's a little question.. we have an Application made in NetBeans 4.0 so it uses J2EE 2.0, and we need to deploy it in an Oracle9iAS(9.0.2.1), that server doesn't support the J2EE 2.0 applications... so we have to move to another that supports it... and i'm a little short of information of which Application Server should i use, so maybe you could give me some advice.. or some guide to documentation aboput choosing an appropiate Application server...
Thanks..

Tom Kyte
November 15, 2005 - 11:46 am UTC

It doesn't support j2ee?? why do you say that?


</code> http://docs.oracle.com/docs/cd/A97329_03/web.htm <code>

..Correction...

Juan Esteban Alzate, November 16, 2005 - 8:25 am UTC

in the last post i made a mistake.. the version of the Oracle 9iAS (9.0.2.1), supports j2ee, but the 1.3 version.. if i understand the certifications that are in the Oracle documentation, and in the Sun pages, only the OAS Release 2 (10.1.3) supports j2ee version 1.4.. and thats the problem, becuase we work in j2ee er. 1.4 and the server in which we have to deploy the application is the one that doesn't support it... if in that server are some applications developed in JDeveloper, those can be deploy in a newer version of OAS? so all the applications can be in the same sever??

Tom Kyte
November 16, 2005 - 5:34 pm UTC

not entirely following everything but....

should you not be working to get onto supported software that has the features you need? (eg: even the 9.0.2.1 was *old*, now you are talking really old)

STARTS MIDDLE TIER & IFRATSTRUCTURE COMPONENTS

Dawar Naqvi, November 16, 2005 - 5:34 pm UTC

Hello Tom,

I have 10g Release 2 (10.1.2) running on my Linux box.
Infrastructure and middle tier (Business Intelligence & Forms) installed on same box.

we have power failuer and machine went down.
Now I rebooted the machine.
But I need to start infrastructure and middle-tier components.
what are the steps I need to make Application server up?

Please note: Prior to power failure we were running application based on Oracle Forms & Reports.

Here are the steps I have tried:

OUT PUT OF LSNRCTL STRAT
**************************

oracle@appserver:~/infra/bin> lsnrctl start

LSNRCTL for Linux: Version 10.1.0.4.2 - Production on 16-NOV-2005 14:43:07

Copyright (c) 1991, 2004, Oracle. All rights reserved.

Starting /opt/oracle/biforms/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.1.0.4.2 - Production
Log messages written to /opt/oracle/biforms/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=appserver.hr.ny.org)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.1.0.4.2 - Production
Start Date 16-NOV-2005 14:43:07
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /opt/oracle/biforms/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=appserver.hr.ny.org)(PORT=1521)))
The listener supports no services
The command completed successfully
oracle@appserver:~/infra/bin> sqlplus

SQL*Plus: Release 10.1.0.4.2 - Production on Wed Nov 16 14:43:27 2005

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Enter user-name: sys as sysdba
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified

************************************************************************************
FROM INFRASTRUCTURE HOME
oracle@appserver:~/infra/bin> emctl start dbconsole
TZ set to US/Pacific
OC4J Configuration issue. /opt/oracle/biforms/oc4j/j2ee/OC4J_DBConsole not found.

************************************************************************************
FROM MIDDLE TIER HOME:

oracle@appserver:~/biforms/bin> emctl start dbconsole
TZ set to US/Pacific
OC4J Configuration issue. /opt/oracle/biforms/oc4j/j2ee/OC4J_DBConsole not found.
oracle@appserver:~/biforms/bin>

cheers,
Dawar


Tom Kyte
November 16, 2005 - 6:25 pm UTC

please utilize support for something like this...

Dave, November 16, 2005 - 6:58 pm UTC

srart the database
opmnctl startall
emctl start iasconsole
dcmctl start

mod_plsql

A reader, November 23, 2005 - 11:39 am UTC

Hi Tom

Since you are running this site using Apache and MOD_PLSQL I have a small question.

When there are 100 users connecting to this site do you have 100 database sessions?

I have been told that one of disadvantage of mod_plsql is you need a dedicated session per web session. Is it TRUE?

Tom Kyte
November 23, 2005 - 7:39 pm UTC

they got that one very much wrong.

we need a connection per page being generated at a given point in time. If there are 100 users connecting to this site *at the same exact second, same exact point in time*, I would need 100 mod_plsql instances with their connection to the database (just like whomever would need 100 instances of THEIR appliation with 100 connections grabbed from the pool).

on asktom, I do 2 million plus transaction per month, for about 115,000 people. My maximum concurrency (number of sessions, physical connections to the database) is about 20-30 maximum.

there is no such thing as a "web session" with mod_plsql, it is a stateless environment (true, you could make it stateful, but I have a word for that - "not smart"). You only need as many mod_plsqls with their connections as you have SIMULTANEOUS presses of the button by end users.

pls

A reader, November 24, 2005 - 11:02 am UTC

Hi

Is there anyway to get rid of pls in the modplsql URL?

asktom.oracle.com/pls/ask

get the pls between site name and your DAD :-?


Tom Kyte
November 24, 2005 - 5:07 pm UTC

you can make the pls be whatever you like, it is just a virtual path, the convention is pls.

be careful with pls

A reader, November 24, 2005 - 6:38 pm UTC

Dont mess around with pls, there are html files with pls hardcoded....

Tom Kyte
November 25, 2005 - 9:31 am UTC

for your application - it doesn't really matter does it.

aaplication server

Suresh, December 24, 2005 - 4:50 am UTC

Iwould like to know from you Tom that whille developing application in form 10g, do the hardware for the application server and database server needs to be different? Can the same hardware perform the function of application server and database server simeltaneously?

Tom Kyte
December 24, 2005 - 9:08 am UTC

the can in fact be the same, they can run on the same machine, they can run on different machines.

you pick

How can I make it secure?

Dawar Naqvi, March 15, 2006 - 7:22 pm UTC

Tom,

We are running one third party application on our Oracle DB 10.1.0.4.0.
It is 24 * 7 application.

Some time user account become lock due to invalid attempt password.
Help desk user contact us and we unlock the account.
But some time its happen off hours, 3.00 am in the morning.
We are not available to solve this problem.
For this purpose (on ur idea)

I have created a Oracle Form.
This is a simple FORM.
This FORM unlock the user account.
Functionality of the user_unlock FORM is as follows:

Its allows user to unlock account.
This FORM base on all_users table.
when user run this form.

Either user need to search the name by entering wild card or
just enter the name in the text field.

I have created a button.
when user clicks on the button its unlock the user account.

For this I have wrote a procedure in my database.
I put code to execute above procedure in when_button_pressed trigger.

I transferred this form onto Oracle Apps Server.
Its working fine.
Now we can go to this FORM via URL.
Do not need any Oracle Tool or Knowledge.

For this process make little secure.

I have created a user ABC with create session privileges.
I have granted above procedure to the new user.
I add one database logon FORM in this process as below:

Now our non-oracle help desk user will browse the URL.
It will bring database logon FORM.
This form has only logon screen.
all username/password/strings values are already there.
They need to click on logon button will bring user_unlock FORM.

Helpdesk user can unlock the account.

Here are my worries:

What is to prevent someone from unlocking the privileged accounts that have
well known default passwords that are now shipped as locked?
The search facility makes it possible for a hacker to l
earn all the usernames on the database with a wildcard search.


How can I make it secure?

Regards,
Dawar

Tom Kyte
March 16, 2006 - 7:52 am UTC

you lock accounts by policy.

If you don't like your policy (3am problem), change policy.

Else, you have a policy and must live with it.


searching for usernames to unlock seems to defeat the entire purpose here. Seems that

a) user gets their account locked.
b) user calls help desk and STRONGLY identifies themselves (searching would be SILLY here, you need to be 100% sure of who is on the other end of the phone)
c) help desk (which must be 24x7) takes that identity and unlocks that identity (searching would defeat the purpose)


as to your worries - that would be YOUR CODES RESPONSIBILITY. Perhaps you need to verify the account you are unlocking is an application account of yours (eg: look it up in a table)

Session state in database

Rasin, March 16, 2006 - 9:23 am UTC

First of all, good thread.
Tom at the beginning of this thread you mentioned that you are storing the session state in database, could you explain what table structure you are using and how the session state is stored and when it will be retrieved.

Thanks


Tom Kyte
March 16, 2006 - 2:31 pm UTC

htmldb.oracle.com

it does it all for me.

Recommendation of books

A reader, March 21, 2006 - 8:25 am UTC

Hello,

as always excellent thread.

Can you suggest for me books on application server concepts, please?

I already have a few, and they're good, but they miss something fundamental I seek.

They teach me how to do, but what I seek is why should I need what is to be done and when, like your books.
I am a developer and have database administration experience.
Best of luck.

Thanks in advance.


Tom Kyte
March 22, 2006 - 2:11 pm UTC

sorry, I don't have any recommendations in that area - just not aware of any myself

app server

mo, March 27, 2006 - 12:11 pm UTC

Tom:

if we upgrade an existing 8i database using mod_plsql application to 10g, do we need to buy the 10g IAS or not?

2. Is that free or included in the database and does it include the apache http web server?

Thank you,



Tom Kyte
March 27, 2006 - 3:15 pm UTC

1) the database comes with apache and mod_plsq on the companion CD. If all you need is that, then you have it ...

2) yes.

app server

mo, March 28, 2006 - 2:45 pm UTC

Tom:

So you are saying we do not to purchase the Oracle 10g Application server (standard 1 Edition), however when I checked with oracle sales person he said that it was bundled with the database so users can use it with HTML DB tool . If we have a mod_Plsql application we have to buy the 10 standard 1 application server and use that. Is he correct or trying to make a sale?

2. Would the web toolkit functions all be bundled too in the database?

thank you,

Tom Kyte
March 28, 2006 - 8:11 pm UTC

Apache and mod_plsql come with the database on the companion CD and you can use them - not just for htmldb.

the htp/htf stuff is in the database, yes.


heck, in 10gr2 you have the dbms_epg stuff burned right into the database (mod plsql in the engine itself - with a webserver)

app server

mo, March 29, 2006 - 12:07 am UTC

Tom:

1. So we do NOT need to buy the 10g application server to run our mod_plsql applications. Is there anything where the 10g application server can be useful for our environment or it will be a waste of money for our environment?

Tom Kyte
March 29, 2006 - 7:08 am UTC

I don't know your environment so I could hardly speculate whether one of the 1,000's of things the application provides would be useful to you or not.

app server

mo, March 29, 2006 - 10:04 am UTC

Tom:

our environment is simple.

One IBM unix server for 8i oracle database. All web content is generated by procedures and packages in the database. They are called using mod_plsql. I am not sure what more info you need?

How and when do you see an application server being useful? It seems to me only when you have a J2EE application.

Tom Kyte
March 29, 2006 - 11:14 am UTC

do you need single sign on.
could you use data visualization tools.
would wireless access be something of interest.
do you need a portal.

and so on and so on and so on - The application server comes with lots of stuff.

Not sure what you don't get about me not getting your environment. I don't know you, I don't know what you need. I don't know what you want.

but you do.






Can Oracle9i/10g call Tomcat to execute OS and Java class

Laxman Kondal, April 15, 2006 - 9:50 pm UTC

Hi Tom,

In all cases I had so far seen application server calling Oracle for store procedures to perform database activity or Oracle calling OS comman line task.

Now we got different situation where Oracle needs to call application server to execute certain Java and OS based tasks whenever new data received from remote Oracle database.

Is there any way this can be accomplished by Oracle database to call application (tomcat) without compiling large amount of Java class in Oracle which will be manageability issue to maintain two sources. ItÂ’s exactly reverse of what normally done.


Thanks and regards.

Tom Kyte
April 16, 2006 - 7:28 am UTC

Oracle needs to call an application server - which in turn might run something in any language (java/os based task - not relevant to the problem statement - the problem statement is "Oracle reaches out to application server").

You can use a tool as simple as UTL_HTTP to run a URL. I wouldn't suggest doing this however in real life since it will be as reliable as an end user clicking a link on a page - and the link decides not to respond (but did it actually do the work - or not, hmm, not sure).

You definitely have java stored procedures as well - which can do many things (well, whatever you code them to do).

You have external procedures written in C as well.

Oracle reaches out to application server

Laxman Kondal, April 16, 2006 - 10:49 am UTC

Hi Tom,

Thanks for your reply.

“Oracle reaches out to application server” is right what we are looking.

Did I understand correctly that Oracle need to call C procedure which in turn calls Java to execute what was to be done by application server.

Thanks and regards.


Tom Kyte
April 16, 2006 - 5:50 pm UTC

You can use utl_http
You can use a java stored procedure
You can use C

those are among the CHOICES, I don't see how "C" became the only one?

app server

mo, June 09, 2006 - 4:30 pm UTC

Tom:

1. Would you call using mod_plsql in web apps a 2 tier or 3 tier web architecture?

2. Would you say usng MOD_PLSQL is similar to CGI? My understanding is that CGI is slow and not secure and every request has to compile/run while pl/sql code can be cached.

3. Does mod_plsql or 8IAS/0IAS contain the Apache 2.0 HTTP web server and can that be configured regularly using unix tools/text editors?

4. I conclude the biggest advantage of placing code separate from database (like CF or J2EE) is scalabilty or Load Balancing. For high traffic sites you can place 10 app servers and route incoming traffic while in mod_plsql you can not do that because code is inside the database. Correct?

Thank you


Tom Kyte
June 09, 2006 - 5:54 pm UTC

1) three, you have data, logic and presentation.

You only need one machine and one process to do three tier. You do NOT need to have three machines and three things running in three places. It is a logical separation.

2) no, not any more than jsp or asp are like cgi in any case. If someone says mod_plsql is like cgi, then answer back "just like a jsp or asp or php is, I agree"

3) mod_plsql is an apache module that needs apache to run. apache comes with the database. You can also use the dbms_epg (embedded plsql gateway, mod_plsql in the database itself) and skip apache all together in 10gr2

4) and if these things are DATABASE applications - so? I agree, you can write monstorously bad java and spread it all over the place.

app server

mo, June 16, 2006 - 1:17 pm UTC

Tom:

As a followup:

1. Are you considering code as separate from database even though they it resides inside database?

2. I did not quite understand your asnwer in #4. I know that Java is complex compared to pl/sql but let us say someting like Cold Fusion. Would CF as an app server have an advantage over mod_plsql in Load Balancing since code is separate? Can you do load balancing using mod_plsql.

3. How would you summarize the advantages of something like CF or JSP/Struts or servlets over mod_plsql and mod_plsql advantages over the them? Would the site traffic be the determinant factor in what to use or other ?

4. Is it true to say that people who claim that app servers like CF which provides security, session management and connectivity to Database, are all provided by the oracle server. In essence oracle DBMS provides database server and application server functionality.

5. Is it true that if code resides in database, the application performance will be much better and you minimize netwrok traffic considerably?


Tom Kyte
June 16, 2006 - 7:18 pm UTC

1) code is code, who really cares where it runs. The database is just an execution environment.

2) only because you might need 50 CF app servers to do the work of 1 database :)

3) I wouldn't.

4) CF provides security?? how so. anyway, the database is my operating system - yes.

5) you can write

a) really good code that runs fast
b) really horrible code that runs slow

anywhere, so no, it would not be universally true.

app server

mo, June 16, 2006 - 11:16 pm UTC

Tom:

1. By CF security I meant creating user accounts/groups at the app server and letting it handle the authorization for each menu link instead of coding it in the application.

This site claims it has a lot of features and customers. I was surprised as I thought .NET really killed the CF market.

</code> http://www.forta.com/cf/ <code>

2. Why you do not like to discuss the advantages of each architecture?



mod_plsql

sam, July 07, 2006 - 4:40 pm UTC

Tom:

1. Can you create a pl/sql page that uses mod_plsql to build a dynamic web page of all files residing on a unix directory where a user can click it and open it?

2. IS there a way to secure access to each file on the web server the same way apache uses basic authentication to secure each file. But here using an oracle user/passwd table or mod_plsql?

Tom Kyte
July 08, 2006 - 8:41 pm UTC

1) if you knew the names of the files, sure.

</code> http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:439619916584 <code>

2) see #1, yes - you would use bfiles and wpg_docload.

dbms_epg setup

Reader, July 11, 2006 - 8:33 am UTC

Tom, can you please share some information about how to setup Application Express using dbms_epg? Some links to the documentation would be very useful... (i can't find info about this)

Tom Kyte
July 11, 2006 - 7:58 pm UTC

get XE (express edition).... it is all preconfigured, all set up... otn.oracle.com/xe

tim hall has written about this as well:

</code> http://www.oracle-base.com/articles/10g/dbms_epg_10gR2.php <code>



Apex and dbms_epg

Reader, July 11, 2006 - 11:37 pm UTC

Thanks for you reply Tom.

Actually i came over this on otn:

"Sorry. Application Express using the embedded PL/SQL gateway/XDB in 10gR2 Enterprise Edition is not a supported configuration (Apex using EPG/XDB in Oracle 10g XE is our first supported configuration). So, please use Apache/mod_plsql for 10gR2 Enterprise Edition instead."

</code> http://forums.oracle.com/forums/thread.jspa?messageID=1353990�� <code>

So as of now you can't replace stand alone Apache and get supported configuration with 10GR2 (not XE).

Tom Kyte
July 12, 2006 - 3:52 pm UTC

but it says there "10.2.0.3 it will be a supported configuration"??

dbms_epg

Reader, July 13, 2006 - 10:56 pm UTC

Well,

considering that 10.2.0.3 doesn't exists right now... you know :)

app server

sam, July 29, 2006 - 1:04 pm UTC

Tom:

1. Oracle rlease in 9IAS something called Oracle Web Cache. This sits between the browser and the apache http server. Can this be used with MOD_PLSQL applications? Can it be used for dynamic pages too? If yes, How does it know that data did not changed in database if the page is cached?

2. Some programmers claim that when you have code in middle tier, it gets cached in memory and is faster to run than when it is in database? Is this CORRECT? Does not also get cached in the database server and cache is cache regardless of location?

3. There is also ORacle Database cache for data but this seems to not work for mod_plsql and only for java based apps. Correct?

Tom Kyte
July 29, 2006 - 4:31 pm UTC

1) you "program" the web cache via standard directives (you set up expirations and such in the tagged html output

2)
I'm a progammer.

I claim that if we started fly farms (you know, to grow flies - those little winged insect) we could defeat global warming since the flapping of all of those tiny little wings would set up a nice gentle breeze.

Makes as much as as saying code in the middle tier is somehow "cached" and this makes it faster to run.

3) eh? There is a database buffer cache, it is an equal opportunity cacher of data. It cares not a bit about the language you use.


I'm not sure where these misconceptions come from.



Oracle 10g AS on RH Linux AS 2.1

MJANI, October 08, 2006 - 2:53 pm UTC

Hi TOM,
Hope you fine , and sure that your are doing greate things !
I have installed Oracle 10gAs on Windows AS couple of time and didnt face any problem , but recentlly i have to install it on Linux AS 2.1 , After sucessfull complition of installtion , I gave the OPMNCTL STARTALL ,but it failed and gives No Error for it. I also recheck for the installation , but it seem perfect and no-error occur during the installation .
Note: I have installed the Oracle AS Middle-tier only.

Can you please suggest where should i look to resolve it?

Thanks

Tom Kyte
October 08, 2006 - 4:35 pm UTC

please utilize support for installation/configuration issues - I do not install using every single platform, every single product, every single OS release (that is an old OS release there...)

application server equals code

Billy, October 09, 2006 - 8:35 am UTC

Tom said:
> I'm not sure where these misconceptions come from.

Because it is easy to simply believe that to question? I find it very frustrating talking architecture to the J2EE folk as they simply believe that their architecture is the be-all and end-all and everything else is inferior.

Questioning this architecture is simply not acceptable - thou shalt not question.

The emporer is without clothes and very few admit it. How can the whole J2EE industry ("religion") be wrong!?

Take this for example (asked by Sam):
"Some programmers claim that when you have code in middle tier, it gets cached in memory and is faster to run than when it is in database? Is this CORRECT?"

Sam, I have a stored proc that needs to map VPN traffic to a customer (we do a semi-realtime analysis of 11+ TB of VPN traffic per month). It is called for every single VPN analysis packet inserted into the cluster (RAC) database.

A look at the shared pool tells me that this proc's SQL statement (it does a lookup) has been called (executed) 3,331,928,033 times. The uptime of this instance (a node in a RAC) is 806 hours and 36 minutes.

BTW, the entire system is written in PL/SQL, with the exception of a single Perl module that collects UDP data.

These days I wrote *all* my Oracle related stuff in SQL and PL/SQL. 99.9% of it. The remaining 0.1% is Java and Unix shell scripting when dealing with interfacing with the o/s command line.

The Oracle architecture is EXTREMELY capable. IMO - if your code touches Oracle data and you have not written it in PL/SQL, you need to ask yourself why and have a darn good reason why it's not in PL/SQL.

Arindam Mukherjee, October 12, 2006 - 1:40 am UTC

Respected Mr. Tom,

Today I am going to ask you two (2) silly questions as I am quite green on it.

Q1> Are the application server and middleware same? If ‘No’, please explain what the difference is.

Q2> On reading Oracle website, I could not understand “Oracle Fusion Middleware” and it’s objective – why I should use it. If possible could you explain this or refer to any web site where this has been written elaborately.


Tom Kyte
October 12, 2006 - 8:14 am UTC

q1) typically middleware includes an application server. middleware is typically an application of sorts that does something. An application server is typically needed to implement middleware.

similar to the way a database is needed to implement a financial application.

q2) have you read this:

</code> http://www.oracle.com/technology/products/middleware/index.html <code>

Benefit of IAS standard edition and JDeveloper

A reader, November 06, 2006 - 10:00 am UTC

Hi Tom, please,

1. I don't know if you coult tellme the benefits of using ias with JDeveloper instead of Tomcat (out than having license for ADF).

2. Does JDeveloper Adf is really enough good to justify a licenes of 100U$ runtime or to buy IAS, when you can use Jdeevloper without adf and get a free runtime.

Thank you.


Tom Kyte
November 06, 2006 - 10:23 am UTC

not really an app server guy myself. Ask me database stuff.

A reader, November 06, 2006 - 10:48 am UTC

Thanks Tom

configure Apache oracle 9iAS to run jsp

gayatri, November 23, 2006 - 3:42 am UTC

I felt this as a right place to post my question. Pl let me know the configuraton details to host jsp. I am already hosting Plsql Server Pages (PSPs). under Apache/htdocs/demo folder I am able to get html files but not jsp. It says 'Page cannot be found'.

Tom Kyte
November 24, 2006 - 6:19 pm UTC

that would be included in....

the apache documentation? But, does apache itself serve "jsp's" - don't you need a java engine to do that - so it would really be "how to configure the application server which is much larger than apache which is a simple web server"

And frankly, I don't configure application server myself, sort of a 'database' guy. Please utilize support for installation and configuration.

security issue

SZB, February 08, 2007 - 1:12 pm UTC

our security guide states we must put the iAS server and DB server on seperate hosts for the security. it does not state what could be the issue(s) if the two on the same machine.

is it the case?
Tom Kyte
February 08, 2007 - 1:37 pm UTC

it must be the case for you by definition, it is YOUR security guide?

do not understand

SZB, February 08, 2007 - 3:15 pm UTC

do not understand. the company doc does not state what could be problem if the iAS and DB on the same host. what was the reason for seeking your comment.
Tom Kyte
February 08, 2007 - 4:26 pm UTC

you would need to, ahem, ask the authors of said document what they were thinking when they wrote it.


SZB, February 08, 2007 - 8:18 pm UTC

from the documnet:
"The XXXX recommends that any DBMS be installed on a host system dedicated to its support. By separating the DBMS server from iAS server, access to that platform can be more finely controlled, resulting in reduced exposure to vulnerabilities in the DBMS software."

What were the vulnerabilities to the DBMS software?
Tom Kyte
February 08, 2007 - 9:15 pm UTC

what is the XXXX

and why would you not ask the PEOPLE THAT WROTE THIS?????????????????

SZB, February 08, 2007 - 9:24 pm UTC

Those people are not accessible. otherwise i would not ask you. please comment that if you can. do not have to scream. i thought you were different.
Tom Kyte
February 09, 2007 - 8:05 am UTC

I cannot tell you why they feel this is better.

I did not write that document.

I do not do this myself.

some people do.
some people don't.

I do not view it as necessary.

So, I cannot make up their arguments for doing this.


This has NOTHING to do with "being different". Why would you want me to make stuff up?

Comments on this thread

Stew Ashton, February 09, 2007 - 5:44 am UTC

I have just read this whole thread and can't resist trying to clarify some things while going soft on the "religious" aspects.

An application contains presentation code, business logic and data. Application architecture says "keep these parts logically separate"; this is equally valid using J2EE, .NET or other technologies. The parts don't have to be on separate machines.

Now, Security architects say "separate those parts physically and put firewalls between them." These folks don't "trust" any product, OS or database, nor do they trust the DBAs or SAs who configure them. You will never "prove" that your database server is fully secure. You might suggest that they pay at least as much attention to database security as to network security, which means learning something about the database. Sometimes mistrust is bred from ignorance.

Presentation + business logic + data = my application. An App Server is a program that "serves" my application, in two ways:
1) it provides services to my app, such as connection pooling.
2) it "serves" my app to the user, as a waiter serves food in a restaurant. The food is cooked, eaten and gone, but the waiter is always there. The App Server calls my app, which runs "in" it then disappears while the App Server remains.

This means that the Web Server, as such, is not an App Server, since my code doesn't run "in" it. In my shop, we have both Apache and Websphere on the Presentation server, and another Websphere on the "Business" server.

Three more points and I'm finished:
1) the presentation code can be dynamically loaded to and run on the desktop (.NET, Swing, eclipse, ActiveX, etc.). It should never connect directly to the database; if it does, we're back to "bad" client-server with no connection pooling, broken connections and the like.
2) the only way to scale is to be stateless. In J2EE, EJBs should always be stateless session beans.
3) Oracle is an App Server. If we don't use it, if we put all the data manipulation logic and security into a J2EE middle tier, we have effectively "lost" a tier from our Application architecture and from our Security architecture.

The last app I wrote was in Swing: Java on the desktop, J2EE in the middle tier, SQL and Oracle. Response time was so quick that everyone said "you must be using a cache". I said "yes, I am using a persistent cache in the data tier."
The only thing I'm missing is an "Ask Tom inside" logo :)

SZB, February 09, 2007 - 8:58 am UTC

tom,
'This has NOTHING to do with "being different". Why would you want me to make stuff up?'

OK, i take back of the "being different".
I did not want you make anything up. just wanted your comment if you could, and nothing more than that..

Stew Ashton from France,
thank you for the comment.

OiAS 10G

Art, June 11, 2007 - 12:31 pm UTC

I am attempting to deploy .war files using Oracle Enterprise Manager 10g, however all .war files show a status of "Not Loaded" once they have 'successfully been deployed'.

When I try to deploy them in the command line, I get an ADMN-906002 error. Any idea what the cause is for either of these?

Client/Server vs. n-tier

Nishith Pandey, November 27, 2007 - 12:26 am UTC

Hi Tom,
Our company has around 30 sites with each one having its own Oracle database server and file server (repository for executables of Forms6i/Reports6i). All the sites have the same applications running, i.e., the same set of programs are replicated to each site. At present we are running the applications in client/server mode (Forms6i/Reports6i runtime is installed on each client machine). We are also using some third party modules developed in VB/VC++.

Now we are looking for the Centralized Solution, i.e., We want to have a Single Database Server available to all the sites (all the sites are already linked with Network Leased lines).

Now we want to know the impact of running centralized file server (located at Corporate Office site) accessible from all the sites (through same client/server mode).

Will this solution work for us or we should move to 3-tier mode? Please suggest us the best feasible solution which can be implemented as early as possible. Thanks in advance!
Tom Kyte
November 27, 2007 - 3:30 pm UTC

well, don't you think it sort of depends on how good of a "network leased line" you have

doesn't it.


Please think about this question for a minute and ask yourself how anyone would be able to say "sure, it <will|will not> work"


What I mean is.....

Nishith Pandey, November 29, 2007 - 12:23 am UTC

Hi Tom,

What I mean to ask in the question above is: if a good intranet connectivity is available among sites, what would be the better approach, Client/Server or N-Tier?

What actually would we gain by using application server in this context? Does the Data travelling is reduced from Database Server through to the Client Node in 3-tier AS approach? Does this 3-tier approach will reduce the Burden on Leased Lines? Does we gain more network resources available in 3-tier?

Tom, What I think is that in client/server mode, the data is travelled from Database Server to Client Machine, but using Application Server, the Data from Database Server will travel upto Application Server and NOT to the Cleint machine (on browser etc.), hence reducing Network Load.

Please clarify as your input makes a valuable role in our decision-making.

test

A reader, December 03, 2007 - 11:29 am UTC

test

waiting ur response.......

A reader, December 04, 2007 - 5:48 am UTC

Hi Tom,

We are waiting for your valuable response regarding query above..
Tom Kyte
December 03, 2007 - 7:51 am UTC

given your inputs, you have received all available outputs.

eg: I already said "insufficient data"

You cannot/should not/better not - give someone "hey, we have some leased lines and a client server forms - should we record in 3 tier" and expect them to be able to give you an answer.

There are SO many variables involved here - way too many to get any sort of reasonable answer from that.

Is client server viable? yes
Is recoding everything viable? yes
Is virtually ANY technical solution viable? yes

but you need to consider a lot more stuff when making your decision for your situation.

good clarifiacation

parag gholse, September 15, 2009 - 4:53 am UTC

i am beginner in It world. good clarigication.

Redirect URL

rizwan, October 14, 2011 - 8:07 am UTC

We have installed Oracle webcache (10.1.2) and Oracle IS (10.2.0) on a server .. Client requirement is that when they type a URL like www.rizwan.com it should be converted to www.rizkhan.com/riz_kh .. This URL should be converted on the server where we have installed webcache and IS .. How do i do that in webcache or IS ?


Oracle HTTP server

A reader, July 17, 2012 - 4:14 pm UTC

Tom:

Does Oracle 11g database enteprise edition software include the oracle HTTP server ?

I aasume i don't need to buy the oracle application server or oracle fusion middlwere just to use the oracle HTTP server for migrating some mod_plsql web applications?
Tom Kyte
July 17, 2012 - 4:41 pm UTC

SE and EE have it, yes.

HTTP server

A reader, July 17, 2012 - 5:08 pm UTC

Tom:

If you have ONE physical machine with TWO Linux Virtual machines) one for web server and one for database), can you install each product to a different VM or they both have to be installed to the same VM (from installation technical standpoint and licensing).

Thanks,
Tom Kyte
July 18, 2012 - 9:26 am UTC

Sam,

please contact your Oracle sales team for licensing details, I'm not a license expert.

(but basically, you are licensed for the physical box if you are running something like VMWARE)

Alexander, August 14, 2012 - 9:02 am UTC

Tom, do you consider the database software to be middleware as far as how it is categorized or classified?
Tom Kyte
August 17, 2012 - 2:14 pm UTC

it can be middleware, but most people would not consider it as such.


web server

A reader, September 26, 2012 - 12:09 pm UTC

Tom:

Is it possible to install and configure an oracle HTTP server on one RHEL Virtual machine from the database software CDs and after that install the 11g database on another RHEL virtual machine?

or you had to have a database server installed and running first before you can install the oracle HTTP server.

HTTP server

A reader, November 05, 2012 - 9:56 am UTC

Tom:

<<SE and EE have it, yes. >>

When you install EE, I do not see any option to install the oracle HTTP server product.

If i need to only install the HTTP server on one virtual machine how can i do that?

thanks,


Tom Kyte
November 05, 2012 - 10:05 am UTC

sam, support = configuration/installation questions.

thanks.

Brian, May 07, 2013 - 4:55 am UTC

Back in 2002 (the date of the first post), I also had the same question: why a middle tier?

If you're huge as in ebay huge things are different. Even still I would try making the middle tiers run Oracle mod_plsql (or Apex Listener) and have a remote database link to a central datastore. Faster I bet than JDBC.

Since 2002, I've developed both mod_plsql apps and a Cold Fusion middle tier app.

The CF app could have been built as a modplsql app and the mod_plsql app could have built in CF.

The mod plsql app is more efficient, faster, as secure and less expensive (CF is now $6k).

More efficient: mod/psql moves an html string out of the database to apache. CF moves data out of the database, into CF, assembles the bits and pieces and then pushes the html string to apache.

Faster: Oracle is designed to for speed, CF only slows it down. Asking Oracle to sprinkle in a bit of html with data is trivial.

I once believed they hype of middle tier security--no longer. Security is only as good as the weakest team member. It is just as easy (if not easier) to write bad code in a Middle Tier languages as in plsql. Sql injection, bind variables, cross site scripting, server side permissions--it has to be done regardless. And a firewall is a firewall, how many times do you need to block the same port? Each server is target and a liability, the more servers the greater the probably of security mishap.

Writing good sql which uses bind variables in plsql is so much easier, cleaner and done with less thought--many programmers are writing injection protected in plsql have no idea (sad I know).

Next I believed the hype of separating presentation and logic layers. It's all about the same and comes down to style.

In my opinion, there is a better place for the presentation layer than the middle tier and database tier. Move it to the browser cache with a good JavaScript framework. I no longer need to write any html whatsoever. The framework creates a perfect rich internet application without writing any html. The database creates JSON strings for form, grids, layouts menus, etc.

It is funny how relevant this question from 2002 is today. I think many have made the mistake of going down the middle tier road without just cause. Next time your waiting for the browser to render the page, just think what it would be like if everyone used Oracle :)


Tom Kyte
May 07, 2013 - 2:55 pm UTC

brightened my day up ;)

loan offer

henry, April 06, 2015 - 7:29 am UTC

Hello,

Dear Loan Seekers i am Mr Carlos Hunter from United State of America (USA) i have been searching for a loan for more than 2years and all lenders i have get in touch with have rip me off more than $3,300.00, i thought there is no way i can get a loan online not on till the day a friend of mine called James Butler direct me to a legit and genuine loan lender called HENRY LOANS COMPANY who lend me a loan of $75,000.00, am a happy man today and i promise my self that i will keep posting online about the good thing that HENRY LOANS COMPANY has done in my life and the life of my family if you need a loan contact them today (henryloanscompany@yahoo.com) may the good lord bless HENRY LOANS COMPANY and his company i pray God give them the spirit to continue with their generosity, thank you very much for taking your time to ready my story

OFFER LOANS

A reader, April 06, 2015 - 7:34 am UTC

Hello,

Are you looking for a business loan,personal loan,home loan,auto
loan,student loan,debt consolidation loan,unsecured loan,venture
capital etc... Or Were you refused a loan by a bank or any financial
institution for one or more reason. You are in the right place for
your loan solutions! I am a private lender,I grant out loans to
companies and individuals at a low and affordable interest rate of
3% Interest. Contact us via email: bnunoloans@yahoo.com

LOAN APPLICATION FORM.

Your Full Name:
Address:
Country:
State:
Loan Amount:
Sex:
Loan Duration:
Phone Number:
Fax:
Monthly Income:
Specific date you need the loan :

NOTE:This are needed before we can proceed with
the transaction of the loan okay.

Regards
Mr BNUNO

God greatness on how i got my loan in real times / online at last.

Kesby Karen, January 19, 2017 - 2:09 pm UTC

How my search of $450000 dollars became real.
Wow its been years since this happen to me but for the sake of good memories i will just go ahead and say what i want to say. I was just browsing through the internet and i saw a couple of comments made by a United state woman called Deborah and other people about Wema S Sundars and how she helped them solve their financial problems by granting them loans to be financially free from debts and to pay there bills. All i could i couldn't not believe it, i mean i felt happy to know she still does her good work for different people around the world by granting them loans to get there bills and debts cleared with just her 3% loan interest rate. There is no reliable loan lender as real as Wema loans. This is just a short note of my testimony, The full story about the reliability of this loan firm i am talking about is on other website that accept long detailed testimony. Do you want to be sure that you are not involved with a fake loan lender online, Kindly send your emails to /// mrswemaloans@rocketmail.com . Also i will be using my identity card to post this testimony to let you all know that i am serious about all i have said. All out there that need a real loan lender that will not rip you off your hard earned money, Contact Mrs Wema and get your loan. This loan firm have the aids of FBI to help them out do so many investigations.

Simeon, March 22, 2018 - 3:07 pm UTC