XML|b¤à′2|?|h?h|?à3¥?¨t2?ao??ˉà′£¤é±′°Q
3ˉ??¨}
oK-n
°ê¥??O¥_°ó±M?ê°ToT2z?ì§U±D ccliang@mail.ntcb.edu.tw
|b¤à′2|?|h?h|?à3¥?¨t2?¤¤?A??ˉà°Y?D§?????-ó¨t2???§Q1B§@?P§_?C??2???¨M?|??°oêμ?¤@¨?¥D-nμw?é?ê·?ao¨?¥?2v?A±q¤¤§?¥X2~àV¨?¥[¥H±?°£?AμM|ó|b¤@-ó2~?1?1?e??§?|¨¥t¤@-óμw?é?ê·?ao2~àV?C
§Q¥?Web Server¤WaoXML¤?¥ó¨ó′£¨?Web client?ê°T?d???A¥i|3??áקKWeb Server¤£?_|a±qDatabase Server?a¨ú??|P?ê??ao±?ap?A1????é¨t2???ˉà′£¤é±N|3??μ???ˉq?C¥HWeb Server¤§XML¤?¥ó¨ó′£¨?Web client?ê°T?d??¥2?·§JaAao°Y?D|3¤G?G¤@?°?ê???w¤¤?????ê??2§°ê?é?A|p|ó¥?§Y§ó·sWeb Server¤W¤§XML¤?¥ó¥H?O?ò§Y?é?ê?ê°T?d???F¤G?°|p|ó?ú?úWeb client?òμ1?wao?d??±?¥ó¨ó?a¨úXML¤?¥ó¤¤o?¨??ó?d??±?¥ó¤§XML¤?ˉà¥H′£¨?°êoA?d???÷¨??C
1??ó¤W-z°Y?D?A¥?¤?¥H?uXML¤?¥󤧧Y?é?ê°êoA?d??¤èak?v¨ó?O?ò§Y?é?ê?ê°T?d??¤?′£¨?°êoA?d???÷¨??A3ì?á¨?±N?ó¤èakà3¥?|bˉZˉ??òaí?d??ao1ê§@¤W?C±q??ˉà¤àaRμ2aG??¥ü?A¥XMLH¤?¥óa?±μ′£¨?Web client?ê°T?d??¥i|3??áYμuWeb client¤§|^à3?é??¤?′??′Web Server?BDatabase Server¤§-t?ü?A1?¨t2????é??ˉà′£¤é|3?ú????ˉq?C ??á?|r?G¤à′2|?|h?h|?à3¥?¨t2??B¨t2???ˉà?BXML?BXML DOM?BXPATH?C
1
Applying XML to Promote Efficiency of Distributed N-tier Application System
Chiu-Liang Chen
Department of Information Management, National Taipei College of Business
ccliang@mail.ntcb.edu.tw
Abstract
Efficiency performance is a key issue in the Distributed n-tier application system. The conventional way of solving efficiency problem is monitoring the chief hardware and thereby spotting and removing the bottleneck. However, in such practice, another bottleneck tends to appear following the removing of one bottleneck.
If we provide information for the web client by XML documents in the web server, the web server won’t need to repeat querying the same data from the database server. Thus, the efficiency will be significantly promoted. When applying XML documents in the web server so as to provide information for the web client, one will unavoidably face two problems: (1)How can one update the XML documents in the web server immediately after the data in the database server vary so as to guarantee the function of real-time information query? (2)How can one make the web server successfully read the XML elements according to the query conditions prescribed?
In order to solve the above two problems, this study proposes an approach of “Dynamic real-time query for XML documents”. Empirically this approach functions well in efficiency real-time information and dynamic query. This approach has been Empirically operated for the curriculum schedule search in the academic system at National Taipei College of Business. The result of efficiency analysis indicates that providing information for the web client by XML documents can significantly shorten the response time and lessen the load for web server as well as database server and thus effectively promote the whole system efficiency.
Keywords?Qdistributed n-tier application system?Bsystem efficiency?BXML?BXML DOM?BXPATH
2
SQL-Server-Performance.com|bo?ˉ?¤W?òμoaí¤§§T3N¤?¥ó[3-7]?C
1. ¤à′2|?|h?h|?à3¥?¨t2?ao??ˉà°Y?D ¥?¤?±N′NXML?]eXtensible Markup
Language?^§T3N¤§à3¥?′£¥X?uXML¤?¥󤧧Y
?é?ê°êoA?d???v¤èak?A3o-ó¤èak¥i|P?é′??′¥??óo????ì§T¤§§?3tμo?i¤?????à3¥?ao
Web Server¤?SQL Serverao-t?ü¨?áYμuWeb ¤éáí|¨???A¤à′2|?|h?h|?à3¥?¨t2??]Distributed
client?d??¤§|^à3?é???Aà3¥?·§?à¥D-n¨ó|?n-tier application system?^¤w|¨?°·s¤@¥Nà3¥?¨t
Justin Gunther[8]?A|y°w1?Gunther?ò′£aoà3¥?2?ao?D·??[oc?C|b¤à′2|?|h?h|?à3¥?¨t2?¤¤?A
??ˉà°Y?D¤?o???|w¥t§?????-ó¨t2???§Q1B§@¤èak?A§ú-ì°μ¤F¨a?I§?μ??G
(1). §Q¥??y?y?1¤?-±¨ó§ó·sWeb Server¤Wao?P§_?A¤]¤@a??O¨t2??}μoaì?ò??¤áao°Y?D?C
XML¤?¥ó?A¥H′£¨?§Y?é?ê?ê°T?d???C Web client?BWeb Server¤?Database
?]Document Object Model?^Server?Ooc|¨¤à′2|?|h?h|?à3¥?¨t2?ao¥D-n(2). ¨?¥?XML DOM
μ{|?3]-p¤?-±¨ó′£¨?XML¤?¥óao°êoA?d3?¤??C¨?¥?aì?Web client]?^3z1L?y?y?1
???C ?]Browser?^¨ó?D¨DWeb ServeraoaA°è¨?3z1L
Web Server¨ó|s¨ú?áoY?ê???w?C¥H·L3nao?}μo
2. XMLao????§T3N¤????3?D·?à?1ò?°¨ò?A¨t2?1B§@¤è|?|p1?1?A¨ì§??O?G
1.HTTP Request2. Connection¤?XML?O¥?W3C?]World Wide Web
SQL CommandConsortium?^¥D?é?i|?????§T3Naoμo?i?AXMLIIS?PHTML|P??·?|SGML??]Standard BrowserSQL Server(ASP+COM/MTS)Generalized Markup Language?A?^HTMLμ?-?|b
4.HTTP Response¤?¥ó?ê???i2{?AXML?h?Oμ?-?|b¤?¥ó?ê???w3.Result set
?q?CXML¤?¥ó|3?ò?ר}|n??|??]well-formed?^
1?1·L3n?}μoà?1ò¤Uao¤à′2|?|h?h¨t2??[oc
3W?d?A|A¥[¤WDTD?]Document Type Definition?^
¤?XML Schemaao???ò?]validating?^?÷¨??A
(1). ¨?¥?aì3z1L?y?y?1¨ó?y?yasp?]Active
¨?±oXML¤?¥ó¨?3??ú?Tao¤?¥óμ2oc?A§Q?ó?ê
Server Pages?^o?-??C
??¥?′??A?GXML§T3N¤]′?1Mà3¥??ó1q¤l°ó°è
(2). IIS?]Internet Information Server?^-t3d????
????à3¥?¨t2?ao?}μo?C¥??e¤w|¨?°???3?D·?¤§
aspμ{|??A|b????1Lμ{¥2-n?é·|?PSQL
§T3N|paí1?F?||b?f?3?¥?q¤§ˉó?קT3N|paí
Server3s?u¨?¤U1F?ê???w?d???ü¥O?C
2[1,2]?C
(3). SQL Server±N?d??μ2aG??|^μ1Web Server
¤Waoaspμ{|??C aí 1 ¤w|¨?°W3C???3?D·?aoXML§T3N (4). IIS±N????μ2aG?]3q±`HTML?°??XML§T3N ???ú
DHTML?^¤U??|ü?y?y?1?C XML 1.0?]Second ¥i?X?i?D¥ü?y¨¥¤§3W???w±q1?1ao¨t2??[oc¥i¥H?Y¥X·í|h¤H|P?éEdition?^ ?q?? 3s?u¨ìWeb Server?é?A±N·|a?±μ¤???±μ|a¥[DOM Level 1 XMLaoμ{|?3]-p¤?-±(±N-?Web Server¤?Database Serverao-t?ü?A3yXML¤?¥óμ??°?ea?μ2oc) |¨¨t2???ˉà°Y?D?C Namespaces in ¥??ó?O?òXML¤?ˉà|Woù°w1?¨t2???ˉà°Y?D?A±`¨£ao??¨M¤è|??°XML ao°?¤@?ê §Q¥???ˉàoêμ?¤u¨?oêμ?CPU?BRAM?BHard DiskAssociating Style ¥?¥H?w?qXML¤?¥óao?i¤?Network Interface Cardμ¥?e??§?|¨??ˉà2~Sheets with XML 2{¤è|? àV¤§¥D-nμw?é?ê·?ao¨?¥?2v?A±q¤¤§?¥X??ˉà2~documents àV¨?¥[¥H±?°£?A|ó±?°£¤è|?|h°?-?|b|p|ó¥H?A
XPATH Version ¥??ó′y-zXML¤?¥óao¤?
·íaoμ{|?§T¥??B?d??§T¥?¤?¥??T?ê???wà?1ò3]
1.0 ˉà???|
?w¨ó′??′¤W-4z?μμw?é?ê·?ao-t?ü?A|p
XSLT Version 1.0 ¥??óXML¤?¥óμ2ocao?à
3
¤@?B?é?×
?O¤@-ó?ú??ao¨ò¤l?C|b¤@ˉ?±?ap¤U?A°ó?~¥??y¤@?q?é???]¨C¤???¨C?u?^¤~§ó·s¤@|??A?oàH?é′?
|33Q?d??ao¥iˉà?A?G°ó?~¥??y¤o?e2§°êàW2v±NXHTML 1.0 ¥HHTML 4.0-ק??°2?|X?·§C?ó?d??àW2v?A-Y¥H1?1ao?ò|?¨ó?i|?°ó?~XML 1.0?yak3W?d|ó±o
¥??y?d???A±N?é-Web ServerP¤£?_|a±qCanonical XML ¥??ó1?XML¤?¥ó¤§?T?è
Database Server?a¨ú??|P°ó?~¥??y¥Ho?¨?¨óVersion 1.0 μ2oc?i|??s?Xao?yak
MathML ?°?y|bo?-?¤Waí1F?????ê|?¤£|PWeb clientao?d???C
§Q¥?XML¤?????§T3N¥i¥H|3??áקK¤W¤o?e§ó?°?e??|ó3]-pao
-zWeb Server¤£?_|a±qDatabase Server?a¨úXMLà3¥?
??|P?ê??ao±?ap?A¨?¥D-n-ì2z?°?G±N?ê???w¤¤XML Schema ¥??óXML¤?¥óμ2ocao?w¤@¨?2§°êàW2v??§Cao?ê°T?A¨ì?ê???yμ2oc?à′??q¤????ò
|¨Web Server¤W1?à3μ2oc¤§XML¤?¥ó?A¨?¥?
|1XML¤?¥ó′£¨?Web clientao?d???Y¨D?C
aí 2 ?||b?f?3?¥?qaoXML§T3N
|b¤W-zà3¥?-ì2z¤¤?A¥??óWeb Server|b
XML§T3N?]ˉó?×?^ ???ú 3B2zWeb client¤§?d???D¨D?é?A?è?Y±q¥?|aoYXLink?]XML Linking ¥??ó3sμ2¤@¨t|C????¤?aoXML¤?¥ó?à′??????ê°Tμ1Web client?A??
-ì¥y?PDatabase Server3s?u?d??¨??a¨ú?d??Language?^ ¥ó¤o?eao?ê·?
μ2aGao¤è|?§óa?±μ§?3t?F1?Database ServerXPoint?]XML Pointer ¥??ó3sμ2XML¤?¥ó¥?¨-|ó¨¥?A¨ó|?Web Server¤§aA°è?D¨D¤]±N¤j′TLanguage?^ ??¨?¥L¤?¥ó
XSL?]eXtensible ?°??|?μ{|??y¨¥?A¥??ó′?¤??A?Gˉà|P?é′£¤éWeb Server¤?Database
Serverao??ˉà?C Stylesheet Language?^ ′y-zXML¤?¥óao?i2{¤è
|?
SAX2?]Simple API XMLaoμ{|?3]-p¤?-±2. ¤èak
for XML version 2?^ (±NXML¤?¥óμ??°¤?|r
°w1??e-zà3¥?-ì2z?AGunther?ò±?¨ú¤§?yao?ê??)
1ê§@¤èak|p1?2?A1ê§@à?1ò?°·L3nao?}μoà?
1ò?A|bDatabase Server¤?Web Server¤W?ò¨?¤G?BXML|b′£¤é¨t2???ˉàaoà3¥?
¥?ao3n?é¤?¤?¥ó|3?G
l Database Server?GWindows NT Server 4.0?B¥?3?¤?±?-zXML|b′£¤é¤à′2|?|h?h|?
SQL Server 7.0?C à3¥?¨t2???ˉàaoà3¥?-ì2z?BJustin Gunther[8]
l Web Server?GWindows NT Server 4.0?BIIS ?ò′£¤§à3¥?¤èak?A3ì?á°w1?Gunther¤§¤èak′£
4.0?BASP2.0?BADO 2.6?BMSXML 3.0?C ¥X¨a-óà3¥?¤Waoˉê?I?C
1?2?ò¥üao¥|-ó¨B?J?A¨ì§??°?G
(1). Web client¥H?y?y?1?y?yaspo?-??C 1. -ì2z
(2). aspμ{|?¥HXML DOMa?¥ó¤à§O?ü¤JWeb
Server¤Wàx|s°ó?~¥??y?ê°T¤§XML¤?¥ó|b¤à′2|?|h?h|?à3¥?¨t2?Web ¤¤?A
¤??w?q¤?¥ó?i¥ü¤è|?¤§XSL¤?¥ó?AμM?á?úServer|b3B2zWeb clientaoaA°è?D¨D?é?A|P?é
?úXSL¤?¥ó?w?q?A§Q¥?XML DOMa?¥ó¤]¥2?·|VDatabase Server′£¥X3s?u¤??ê???w
¤§transformNode¤èak±NXML¤?¥ó?à′?|¨?d???D¨D?A??|11F¨ìWeb client|s¨ú?ê???wao
HTML??|?ao?ê???C ?Y¨D?]|p1?1??^C|b1ê?úà3¥?¤¤?A§ú-ì¥i¥Hμo
Web client?C 2{¤@¨??ê???w¤¤?ê??2§°êàW2v?·§C?ó?d??àW(3). ±N?à′?μ2aG?é¥X|ü
(4). ¥?SQL Server¤W?w?q|nao|?°ê¤?¤u§@2vao±?ap?A¨?±oWeb Server¤£?_|a±qDatabase
?]job?^?w?é?I¥s1w|sμ{§?¨ó§ó·sWeb Server?a¨ú??|P?ê??¥Ho?¨?¨ó|?¤£|PWeb
Server¤W¤§XML¤?¥ó?C clientao?d???Y¨D?C
XML§T3N
???ú
Justin Gunter[8]?ò-z¤§°ó?~¥??y?d??§Y
4
1.HTTP RequestIISXML¤?¥óASP3.HTTPResponseXSL4. ?w?é§ó·s¤?¥óWeb 2.?ú?úXSL?à′?ServerXML¤?¥ó?°HTML¤§XML??|?ao?ê??¤?¥óSQL ServerBrowser¤§3?¥÷?ê°T?AWeb client3z1LWeb Server?ò|s¨úao¥?à3¥u?OXML¤?¥ó¤§3?¥÷?ê°T?A§YXML¤?¥ó¥?à3¨?3?°êoA?d???÷¨??C
1?4?°Gunther[8]¥?¨óàx|s°ó?~¥??y¤o?e¤§XML¤?¥óμ2oc?F1?5?h?°?w?qXML¤?¥ó?i2{¤è|?aoXSL¤?¥ó?A±q1?5¤§?w?q¤o?e¤?1?2?ò-zao1ê§@¤è|?¥i¥H?Y¥X?A¢?unther?O¥H?à¥X??¥÷XML¤?¥óao¤è|?¨ó′£¨?°ó?~¥??y?d???A?G¤£¨?3?°êoA?d???÷¨??C
]> 1? 4 àx|s°ó?~¥??y¤§XML¤?¥óμ2oc
?]¥HDTDaí¥ü?^
xmlns:xsl=\ 1? 2 Guntherao1ê§@¤èak 3. °Y?D±′°Q Guntherao1ê§@¤è|?|b1ê?úà3¥?¤W|3¨a-óˉê?I?G¤@?°¤£ˉà?O?ò§Y?é?ê?ê°T?d???F¤G?°¤£¨?3?°êoA?d??ao?÷¨??A¤à§O°Q?×|p?á?C l §Y?é?êao?ê°T?d?? -o¥y±q1?3¨ó?YJustin Gunther[8]¤§¤?¥ó§ó·s¤è|??ò¥iˉà|s|bao°Y?D?C t1 t2 t3 t4t5t t6 t7 1?3 XML¤?¥ó¤??ê???w1?à3?ê??2£¥í 2§°êao?é?I 1?3?°?Y¤@ˉS?w?é??°??qt¤o?A?ê???w?????ê??2§°ê¤?XML¤?¥ó§ó·s?òμo¥íao?é?I?A¨?¤¤a?¤??b?1¥NaíXML¤?¥󤧧ó·s?é?I?]|pt1?Bt3?Bt4?Bt6?Bt?F1ê¤??b?1¥Naí?ê???w^?7?ê??¤§2§°ê?é?I?]|pt2?Bt?A?h?ò|3¥iˉàμo¥í^?5 1? 5 ?w?qXML¤?¥ó?i2{¤è|?aoXSL¤o?e ao°Y?D|3?G (1). Web client|b?Y¨??é??°??q¤o?ò?a¨úao?ê °T¨??D?ê???w¤¤2§°ê?ᤧ§Y?é?ê°T?A|p1?¤T?BXML¤?¥󤧧Y?é?ê°êoA?d??¤èak 3¤¤ao?]t2, t3?^¤??]t5, t6?^3o¨a-ó?é??°??q?A ?ò¥H¤£ˉà?O?ò§Y?é?ê?ê°T?d???C ±y¥HXML¤?¥ó′£¨?Web client°μ§Y?é?ê (2). |b?ê???w?ê??¨?¥?2£¥í2§°êao±?ap¤U-? °êoA?d???A|b1ê§@¤W¥2?Y|ò?{ao°Y?D|3¤G?G ??§ó·sXML¤?¥ó?]|pt4¤?t7??^A1?Web (1). Database Server¤W?????ê??|32§°ê?é?A|p Server¤?Database Server2£¥í¤@¨??B¥~ao |ó¥?§Y§ó·sWeb Server¤W1?à3¤§XML¤?-t?ü?C ¥ó¥H?O?ò?ê°T?d??ao§Y?é?ê?C l XML¤?¥óao°êoA?d???÷¨? ¥?|p¤j3?¥÷aoà3¥?±?ap?GWeb client3z(2). |p|ó?ú?úWeb client?òμ1?w¤§?d??±?¥ó?a1LWeb Server?ò|s¨úao?è?ODatabase Server 5 XML在分散式多层次应用系统的效能提升探讨
精选图文
热门排序
推荐文章