Skip to content


Subversion checkout URL

You can clone with
Download ZIP
100644 107 lines (71 sloc) 7.75 KB
9fcdc55 @kaven276 add documetations
1 <link type="text/css" rel="stylesheet" href="doc.css" />
2 <style>
3 div.path{display:inline-block;font-size:smaller;}
4 </style>
6f417bc @kaven276 add psp.web logo for docs
6 <span class="psp_logo">*PSP*.*WEB*<span>
7 ****************************************
9 <div id="title"> Introduction to PSP.WEB </div>
9fcdc55 @kaven276 add documetations
11 What's PSP.WEB
12 ===============
96b6049 @kaven276 add PSP.WEB name after PAGE of Stored Procedure
14 PSP.WEB is the short term of "PL/SQL Stored Procedure for WEB" or "PL/SQL SERVER PAGES for WEB" or "PAGE of Stored Procedure for WEB".
9fcdc55 @kaven276 add documetations
16 PSP.WEB use PL/SQL programing language to do web development, It's a language of DB stored procedure that is different from most of the other web developing languages and platforms such as J2EE .Net, PHP, RUBY. with PSP.WEB platform, PL/SQL can use PSP.WEB APIs to gain http request info, do nature data processing, and print page to http response. It's the most proper way to develop database(oracle) based web applications.
18 <div id="graph">
19 <button>browser<br/>user agent</button> ---
20 <div class="path">http protocol<br/>well keep-alive<br/>high concurrency</div> ---
21 <button> NodeJS<br/>http gateway</button> ---
22 <div class="path"> pool of TCP connection by UTL\_TCP
23 <br/> established from ORACLE to nodeJS
24 <br/>line-by-line request and raw response </div> ---
25 <button>ORACLE<br/>DATABASE<br/>engine&dispatcher</button> @
26 <div class="path">run as background job processes
27 <br/>restart after much work or long time by K\_PMON
28 <br/>switch to target dbu's right
29 <br/>locate the PL/SQL procedure and run</div>
30 </div>
33 Why invent PSP.WEB
34 ===============
36 PL/SQL has natural advantages, using PL/SQL for developing web site/application is seductive. But naturally, PL/SQL have no touch with http protocol, If we provide a http listener (such as nodeJS based) that can communicate with oracle PL/SQL, we can invert a whole new stored-procedure based web platform that is the most integrated platform taking both application layer and database layer together. That is just the way PSP.WEB do. Now PL/SQL leverage it's power to web development in it's most. All the sections below will tell you the unique features of PSP.WEB that other web-dev techs do not reach.
38 ## avoid database connection related work
40 Since all code are stored procedure that run in DB, there is **no sql driver or database client driver need**, and so, there is no any connection configuration work that other web platform need to do. PSP.WEB will launch a set of background worker job for http processing, they are just pool of servers, PSP.WEB will alway select the first free worker process, minimize the process switch work. This is really a kind of **natural connection pool with zero configuration**.
42 ## internal network cost is minimized
44 PL/SQL run within DB, they are run directly on database server processes (exactly say on background job processes), there is no traditional DB client-server cross process communication. PL/SQL just use QUERY or DML ** to manipulate data in-process **.
46 PSP.WEB use NodeJS as http listener, NodeJS is act as the http gateway for PL/SQL, NodeJS gateway will parse the http request, transform it to a easy to read format and send them to one of the free PSP.WEB worker job process using TCP, PL/SQL will output the response through NodeJS gateway to the final client like browsers. The communication between http listener NodeJS gateway and PSP.WEB worker job processes is simple and low cost, since they communicate with **minimal of roundtrips**, commonly, there is one tcp/id package for request and there is one or several tcp/ip packages for response, And there is just raw binary data stream for response from PL/SQL, there is **no data serialization and parsing** at the two ends as all of the sql driver will do.
48 ## PL/SQL is the best way to process data with embed sql.
50 Use %rowtype to declare variables is much better than xDBC, EMBED-x and OR-Mapping since all other none-store-procedure based application server will declare data structures according to database tables and it' so redundant and need to carefully map the two different data types, use PL/SQL there is **minimal of data structure declaration**.
52 SQL-binding is so good, you have no change to submit string-spelled sql text, all sql is parsed in PL/SQL already, all sql use bound parameter already, no sql-infection attack possible, no repeating sql parsing possible.
54 ## online upgrade is supported
56 PL/SQL has auto dependency management, if a object that a PL/SQL unit referred is changed, ORACLE will recompile the PL/SQL unit automatically, so you can **bug-fix or upgrade your code online** without breaking your service. Notice that most of the application server platform do not support on-line update or safe on-line update.
58 ## Has very handy IDE for both PL/SQL coding and data manipulation
4204fc0 @kaven276 modify docs
60 There is a full featured PL/SQL IDE called [** PL/SQL developer **] [PL/SQL Developer], It's as good as the most used IDE such as Eclipse ..., but with data manipulation integrated.
9fcdc55 @kaven276 add documetations
62 Traditionally, you use different developing tool and IDEs for application language and database, such as use Eclipse and SQL deveoper both. Now you need only one IDE - "PL/SQL developer".
64 ## In-DB result cache with low design/coding cost
66 ORACLE support result-cache, but PSP.WEB provide **row level versioned result_cache**, often used data can be result cached such as user profile, terminal properties. None stored procedure will do hard to provide data cache and it's too complex.
69 Compare to Oracle's PSP
70 =================
4204fc0 @kaven276 modify docs
72 Someone will tell me that ORACLE has PL/SQL SERVER PAGES support by [mod_plsql] [mod_plsql] within Apache since 8i. Now I tell you ORACLE's PSP is so limited, and it is unchanged for many years and almost frozen. Below I list some of it's limits.
9fcdc55 @kaven276 add documetations
74 * Installation of Companion CD for 10G and Web Tier for 11G is tedious, actually only a bit of part is for PSP, but you are force to install all of them.
75 * Configuration Apache is a burden, most of configuration is not not related to PSP, but you must do it.
76 * Configuration one dad for one database user or application, can not reuse connection for different DADs
77 * The HTP and HTF API is not natural and hard to use
78 * Can not provide exactly every http request header info
79 * Can not provide http request body info
80 * Front-end web server can not support well for keep-alive requests
81 * Do not support streaming of http response
82 * Every http request will form a dynamic spelled anonymous sql, cause oracle to low hit-rate of shared-pool
83 * html form parameter must be have corresponding procedure parameter with the same name, it's so rigid, fragile, and can not span across PL/SQL call stack.
85 PSP.WEB removed the limited burdened with ORACLE's PSP, PSP.WEB has simple installation and configuration, support almost full http protocol support with easily used API and framework, it's no longer a sugar toy as PSP
88 Other Docs and references
89 ============
32da98c @kaven276 add logo at docs footer
91 * [License](license.html)
92 * [deployment](deployment.html) : How to install, configure and manage the PSP.WEB server.
9fcdc55 @kaven276 add documetations
93 * [coding_guide](coding_guide.html) : It's just begin to write.
32da98c @kaven276 add logo at docs footer
94 * [history](history/history.html) : a brief description of ancestral versions PSP.WEB that's just extension of ORACLE's PSP.
9fcdc55 @kaven276 add documetations
95 * run demo with http://your_server/demo/index_b.frame
4204fc0 @kaven276 modify docs
96 * [PL/SQL Developer][PL/SQL Developer] "Allround Automations"'s site.
709b6e4 @kaven276 add for comparison only for links to oracle doc
97 * [Developing PL/SQL Web Applications]( ORACLE's PSP introduction (for comparison only)
98 * [Oracle® HTTP Server mod_plsql User's Guide][mod_plsql] ORACLE's PSP introduction (for comparison only)
99 * [Competitive products for Oracle]( (for comparison only)
9fcdc55 @kaven276 add documetations
32da98c @kaven276 add logo at docs footer
102 **********************************************
103 <span class="psp_logo footer">*PSP*.*WEB*<span>
4204fc0 @kaven276 modify docs
105 [PL/SQL Developer]: "Allround Automations's site"
106 [mod_plsql]:
Something went wrong with that request. Please try again.