web browser
play

Web - PDF document

Web browser HTTP server DBMS html, gif, CGI CGI html, gif, CGI html, gif, Programs jpeg,


  1. ������������������ ������������ Web browser ����������������� HTTP server DBMS html, gif, CGI CGI html, gif, CGI html, gif, Programs jpeg, ... files Programs programs jpeg, ... files jpeg, ... files DB ������������������ ����������������������������������������� ������ ���������� ����������� ����������� ��������� ��������� -DYD &*, ��OD\HUV +773 %URZVHU ([WHUQDO 6HUYOHW &*, 6HUYHU�$3, ([WHQVLRQV $SSOLFDWLRQV �������������� �

  2. ������������������ ������ ���� ��������� ����������� ����� ������������������ ���� �������� ����������� ◆ Netscape Navigator ◆ Microsoft Internet Explorer ◆ … �������������� �

  3. ����������� ◆ Netscape Enterprise Server ◆ Microsoft Internet Information Server ◆ NCSA ◆ Apache ◆ AOL ◆ ... ������� ◆ ODBC ◆ JDBC ◆ TCP Socket ◆ Proprietary protocols (e.g. Oracle SQL*Net) �������������� �

  4. ������������������������ ������������������������������ ��� ������� ����������� ����������� ���� �������� ���� �������� ��������������� 1$0( (�0$,/ 5220 ��� Paolo Atzeni atzeni@dia.uniroma3.it 213 ... Gianni Mecca mecca@dia.uniroma3.it 212 ... ... ... ... ... ������������ �������� ProfList Name Name ToProf E-Mail Room �������������� �

  5. ��������������� ������������������������������ ���� () { ���� ProfName[20]; $ ��������������� (DeptDB); $ ������� ProfCursor ���������� ������ Name ���� ProfTable; $ ���� ProfCursor; $ ����� ProfCursor ����� :ProfName; printf("<HTML> ...<BODY ...’); printf("<UL>"); ����� (sqlcode==0) { printf(" <LI><A HREF=/cgi-bin/ProfPage?Name=%s> %s </A>", ProfName,ProfName); $ ����� ProfCursor INTO :ProfName; } $ ������������ ProfCursor; printf("</UL> ... </BODY></HTML>"); $ ���������������� (DeptDB); } ��������������� �������������������������� ���� ( ��� argc, * ���� argv[ ]) { ���� Name[20], Email[20], Room[20]; $ ��������������� (DeptDB); �������� ProfCursor ���������� ������ * ���� ProfTable ����� Name = argv[1] $ ���� ProfCursor $ ����� ProfCursor ���� :Name, :Email, :Room; printf(" <HTML> ...<BODY … ’); printf(" <B> %s </B> ",Name); printf(" <BR>E-mail: <I> %s </I> ",Email); printf(" <BR>Room: %s ",Room); $ ����� ������ ProfCursor; printf(" ... </BODY></HTML> "); $ ���������������� (DeptDB); } �������������� �

  6. ������������ ◆ ����������� ◆ ����������� ◆ ����������� ◆ ����������� ����������� ◆ Changing platform imposes to re-compile source code ◆ Changing DBMS imposes to update DBMS accesses and to re-compile source code ◆ Interpreted languages (e.g. Perl, TCL, etc.) and standard DBMS connectors (e.g. ODBC) partially solve the problem �������������� �

  7. ����������� ◆ Each access needs: – to load a program in main memory – to open a new connection with DBMS – to execute a (bunch of) query – to close the connection ◆ then – the DBMS is overloaded – the O.S. is overloaded ����������� ◆ Presentation is encoded into source code ◆ Hypertext structure is encoded into source code ◆ Data access is encoded into source code �������������� �

  8. ������������������������ ��������������� ��� ������� ����������� ��� ����������� ���� �������� ���� �������� ���������������� ������������� ◆ It is possible to establish direct and continuous connections between the DBMS and the HTTP Server ◆ It is possible to maintain connections throughout Web applications as well as across invocations of Web applications ◆ Since the database connections are continuous, applications don’t experience the overhead of a connect and subsequent disconnect from the database ◆ Use specific languages for CGI programs �������������� �

  9. ������������������������ ��������������� ◆ Advantages – Applications are built "within" the HTTP server by means of specific APIs – Persistent applications ◆ Disadvantages – Portability ������������������������ ������������ ��� ������� ����������� ��� ���������� ������������� ���� �������� ���� �������� �������������� �

  10. ������������������������ ������������ ◆ Each client request activates the execution of a ThinCGI ◆ ThinCGIs generate a session Id and communicate the request to the CGIPartner ◆ CGIPartner is a demon, with a pool of open connections to the DBMS ◆ CGIPartner queries the database, format query’s results, and give them back to a ThinCGI, which ends the process sending the results to the clients ������������������������ ������������ ◆ Main Advantages – (Each) CGIPartner offers a pool of open DBMS connections – (Each) CGIPartner can manage multiple requests – ThinCGIs are “thin” applications: their execution doesn’t overload the O.S. – Session Id can be used to manage connections with the client ◆ Disadvantages – ODBC is a bottleneck ! – This approach is effective when the DBMS connection is through DBMS vendors API �������������� ��

  11. ������������������������ ������������ ��� ������� ����������� ��� ������� ���� ���� �������� ������������ ◆ protocol and platform-independent server side components ◆ do not require creation of a new process for each request ◆ allows for three tier applications �������������� ��

  12. ����������������������� ������� ���������� ��� ������� ������� ��������� ����������� ���� ���������� ���� �������� ����������������������� ������� ���������� ◆ Products: – Java Applets – Netscape Plug-Ins – Microsoft ActiveX – Netscape JavaScript �������������� ��

  13. ����������������������� ������� ���������� ◆ Advantages – allow to manage data entry – easy to use – flexible ◆ Disadvantages – software updates – overload clients ��������������������������� ����������� ������������� ��� ������ ������� ����������� ���� ���������� ���� �������� �������������� ��

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend