Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 107 lines (71 sloc) 7.938 kb
9fcdc55 @kaven276 add documetations
authored
1 <link type="text/css" rel="stylesheet" href="doc.css" />
2 <style>
3 div.path{display:inline-block;font-size:smaller;}
4 </style>
5
6f417bc @kaven276 add psp.web logo for docs
authored
6 <span class="psp_logo">*PSP*.*WEB*<span>
7 ****************************************
8
9 <div id="title"> Introduction to PSP.WEB </div>
9fcdc55 @kaven276 add documetations
authored
10
11 What's PSP.WEB
12 ===============
13
96b6049 @kaven276 add PSP.WEB name after PAGE of Stored Procedure
authored
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
authored
15
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.
17
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>
31
32
33 Why invent PSP.WEB
34 ===============
35
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.
37
38 ## avoid database connection related work
39
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**.
41
42 ## internal network cost is minimized
43
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 **.
45
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.
47
48 ## PL/SQL is the best way to process data with embed sql.
49
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**.
51
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.
53
54 ## online upgrade is supported
55
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.
57
58 ## Has very handy IDE for both PL/SQL coding and data manipulation
59
4204fc0 @kaven276 modify docs
authored
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
authored
61
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".
63
64 ## In-DB result cache with low design/coding cost
65
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.
67
68
69 Compare to Oracle's PSP
70 =================
71
4204fc0 @kaven276 modify docs
authored
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
authored
73
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.
84
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
86
87
88 Other Docs and references
89 ============
90
32da98c @kaven276 add logo at docs footer
authored
91 * [License](license.html)
92 * [deployment](deployment.html) : How to install, configure and manage the PSP.WEB server.
9fcdc55 @kaven276 add documetations
authored
93 * [coding_guide](coding_guide.html) : It's just begin to write.
32da98c @kaven276 add logo at docs footer
authored
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
authored
95 * run demo with http://your_server/demo/index_b.frame
4204fc0 @kaven276 modify docs
authored
96 * [PL/SQL Developer][PL/SQL Developer] "Allround Automations"'s site.
709b6e4 @kaven276 add for comparison only for links to oracle doc
authored
97 * [Developing PL/SQL Web Applications](http://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_web.htm#g1026380) 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](http://www.orafaq.com/tools/competitive) (for comparison only)
9fcdc55 @kaven276 add documetations
authored
100
32da98c @kaven276 add logo at docs footer
authored
101
102 **********************************************
103 <span class="psp_logo footer">*PSP*.*WEB*<span>
104
4204fc0 @kaven276 modify docs
authored
105 [PL/SQL Developer]: http://www.allroundautomations.com/ "Allround Automations's site"
106 [mod_plsql]: http://docs.oracle.com/cd/B19306_01/server.102/b14337/toc.htm
Something went wrong with that request. Please try again.