This cartridge on the other hand is capable of handling:
Therefore, the way in which we resolve a URL is a little different. The general form of a URL is:
http://YourHost/DCDName/owa/RequestThis is true for this cartridge as well as the OWA cartridge. Using OWA however would fix the string 'owa' to be a constant and 'Request' to be the name of a stored procedure. With this cartridge
So, onto how we resolve URLS.
Attempt to describe 'Request' as a stored procedure if ( describe fails AND using Client Authentication ) then Attempt to describe DCD_userName.Request as a stored procedure end if If both describes FAILED then Look in the table DCD_userName.IMAGE for a row with a primary key = 'Request' if No Such Row Exists then translate 'Request' using the virtual-physical mappings found in the svXXXX.cfg file. if No such file Exists then if ( file ends in .gz AND file without .gz exists ) return compressed version of file else return FAILURE (404 - URL Not found) end if; else return OWASSI processed file end if; else return that ROW from DCD_userName.Image end if else execute that procedure and return the results end ifIn short, http://youHost/DCDName/owa/request will first try to find a stored procedure 'Request' or DCDName.Request, then it will look in the DCDName.Image table for a row that matches 'Request' and lastly it will try the OS file system.
So this begs the question, what if I KNOW that what I want is a row from the IMAGE table. Can I skip over those two describes? The answer is yes.
select * from DCD_userName.IMAGE where name = 'Request' if ( no_data_found ) then return 404 - No Such URL else if ( service type = 'owaigz' ) compress and return data else return data end if; end ifAs you can see, if you KNOW you are returning an image, you can avoid all of the overhead of trying to find a stored procedure and then looking in the file system.
This is also useful if you have a stored procedure named "filename.pdf" (a stored procedure named pdf in a package called filename), an IMAGE in the IMAGE table named filename.pdf, and a file in the OS named filename.pdf. You can get the one you want by using owai[gz] instead of owa.
Now this begs the question, what if what I want is a Database Server Side Include? Can I get it without going through the long algorithm for resolving names? Yes...
translate 'Request' using the virtual-physical mappings found in the svXXXX.cfg file. if No such file Exists then if ( file ends in .gz and file without .gz extension exists ) compress and return that file else return FAILURE (404 - URL Not found) end if else return OWASSI processed file end if;So what is
For those that feel the need for speed..... Use owai for images, use owassi for database Server Side Includes. You'll save a couple hundredth's of a second. Supply an owaigz link for blobs in your database that people can download over a slow line. It will chew up CPU time on your server but can significantly reduce the time it takes to download the file for your user.