1 / 58

CS-422 Enterprise Computing Preview

CS-422 Enterprise Computing Preview. Client Server Strategies. CGI (Common Gateway Interface) Active Server Pages Personal Home Pages (PHP) MS Active Server Pages (ASP) Cold Fusion Java Servlets and JSP Enterprise Java Beans. CGI. Program run by web server in response to client request

swann
Télécharger la présentation

CS-422 Enterprise Computing Preview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS-422Enterprise ComputingPreview

  2. Client Server Strategies • CGI (Common Gateway Interface) • Active Server Pages • Personal Home Pages (PHP) • MS Active Server Pages (ASP) • Cold Fusion • Java Servlets and JSP • Enterprise Java Beans

  3. CGI • Program run by web server in response to client request • perl, C, C++, VB, Java, python, tcl • handles submitted HTML forms data and dynamically creates a web page in real time and returns it to the requesting client • Old Technology; pre- HTTP, rooted in gopher • reliable • resource hog

  4. CGI (more) • Very useful used in conjunction with Java based clients for things like: • Report Generation (WebFocus) • Data retrieval (files and RDBMS) • Persistent object storage (files) • Could almost be replaced by server side Java • Hard to maintain program state • must rely on programming tricks • cookies, hidden variables

  5. CGI (more) Static Web page with forms tags <form action=/CGI-BIN/AAA.PL> Browser Web Server CGI Program DB

  6. CGI (more) • If another user requests a CGI while the CGI is already running; the web server spawns a child process and runs another instance of the CGI there. • For frequently run CGIs there may be many copies in the machine at the same time • …resourcehog (web servers that run a lot of CGIs will use all of the memory you can afford)

  7. CGI (more) Browser Browser Browser Web Server DB CGI Program CGI Program CGI Program

  8. Active Server Page Technologies • HTML pages that appear to be database aware • HTML with an embedded scripting language and either CGI or proprietary server support are used to make forms objects appear to be database aware • Main contenders: • PHP (Open Source) • Microsoft Active Server Pages (OEM Product) • Cold Fusion (OEM Product) • Java Server Pages (Open licensing from Sun)

  9. PHP (Personal Home Pages) • Core Technologies • HTML • PHP Script • JavaScript • Platforms • Primarily LINUX, Apache • Windows • UNIX • Databases • Primarily used with MySQL (Open Source) • Oracle, DB2 (MyODBC Open Source Database Driver))

  10. PHP (More) • How it works • PHP processor usually installs as a CGI that is invoked in response to a request for a .php file (on Windows NT can run as a service) • the CGI retrieves the requested file, parses it looking for PHP tags • PHP tags are resolved and the tag is replaces by that resolution • Benefits • Cheap, Open Source • Easy to learn • special HTML-like tags • very reminiscent of C • many Open Source, domain specific add ons available • Problems • Support is typical of Open Source (but quality is high)

  11. PHP (typical) Architecture HTML Apache Web Server JavaScript MySQL DB PHP CGI

  12. Microsoft Active Server Pages • Core technologies • MS Internet Information Server • MS Internet Explorer (IE4.0) • VBScript • Java • ActiveX • SQL Server & Access • DCOM

  13. Microsoft Active Server Pages • Works only on Windows (NT Server and W2000 Server)

  14. Microsoft ASP Architecture HTML IIS JavaScript VBScript VBScript Java ActiveX IE 4.0 Data Base, (Access SQLServer)

  15. Microsoft ASP • How it works • IIS retrieves the requested file, parses it looking for Jscript/VBScript and resolves the script by replacing it with the resolution (values/text) • Benefits • A 100% MS solution, important for many corporate IS shops • Easy to learn • based on VB • skills are readily available from the large number of VB programmers • easy accessibility to Windows API and DLLs • Problems • Security has always been a problem due to MS frequent OS and product release cycle

  16. Cold Fusion • Core Technologies • Proprietary, tag based, embedded scripting language • Javascript, Java • Platforms • NT, LINUX, Solaris • Apache, Netscape/iPlanet, IIS • Databases • Access, MS SQL Server (NT W/2000 Only) • Sybase, Oracle, DB2 • MySQL (requires MYODBC driver)

  17. Cold Fusion Architecture HTML Web Server JavaScript Java ODBC JDBC Native ColdFusion Server Database

  18. Cold Fusion • How it works • Web server receives request for .cfm file and passes the request to the CF server. CF Server parses the file returning all non- CF tags to the requesting browser and resolving the CF tags into their resolved text/values • Benefits • Multi-platform • Easy to learn • tag based (looks like HTML, gives web community comfort that its just some additional tags) • much support available via the web, wide following in the web community • Problems • OEM pricing (current price of $5K/server)

  19. Java Servlets • Core Technologies • Java • HTML, Javascript • Platforms • NT, LINUX, Solaris • Apache/Tomcat, Netscape/iPlanet, JRun • Databases • all JDBC enabled (DB2, Oracle, Sybase, Informix)

  20. Java Servlet Architecture HTML Web Server with servlet engine & JRE Servlet Cache JavaScript Database

  21. Java Servlets • How it works • Web server receives request for servlet (name is mapped to a class file by Java web server) . Servlet is loaded into cache and run in the JRE. HTML produced by servlet is returned to browser • Benefits • Cross platform as long as compliant servlet engine is availabe • Easy to learn for Java/C++ programmers • much support available via the web • faster than interpretive technologies (like PHP, ASP, CF) • Problems • still hard to find skills • still considered to be “bleeding edge” by many IS shops

  22. Java Server Pages • Core Technologies • Java • HTML, Javascript • Platforms • NT, LINUX, Solaris • Apache/Tomcat, Netscape/iPlanet, JRun • Databases • all JDBC enabled (DB2, Oracle, Sybase, Informix)

  23. JSP Architecture HTML Web Server with JSP engine & JRE Servlet Cache JavaScript Database

  24. What is a JSP • Combination of HTML, Javascript, and a set of Java tags (5) • Java tags allow java code and calls to Javabeans to be embedded in line • Java tags also allow control of the Java runtime environment

  25. Java Server Pages • How it works • Web server receives request for .jsp. JSP engine converts the page to source code for a Java Servlet, source is compiled by javac and class is moved to cache for deployment • Benefits • Cross platform as long as compliant engine is availabe • Allows Integrated Product Team development • faster than interpretive technologies (like PHP, ASP, CF) • Problems • still hard to find skills • still considered to be “very bleeding edge” by many IS shops

  26. Deployment Strategies

  27. 2-Tier Client Server • Java based Client; application or applet • JDBC • Database

  28. 2-Tier Client-Server - application Java Client Application using JDBC APIs JDBC Enabled Database TCP/IP This application architecture is simple but won’t scale to very many users

  29. 2-Tier Client-Server - applet Browser Unix or Windows HTML Webserver applet JDBC Enabled DB JVM Webserver and DB must be on same IP address

  30. 2-Tier Problems • Client has to do everything • DBs aren’t meant to handle large numbers of transient connections (connections are often more expensive than the db transaction being done) • Good only for infrequently used apps

  31. 3-Tier Client-Server • Java based Client; application or applet • Server/middleware • Database

  32. 3-Tier Client Server Sockets JavaIDL JavaRMI JDBC Native Client Client Server DB Client

  33. 3-Tier Advantages • Server can manage database connections efficiently • Client can focus on business logic • Server can preformat data for client • Running server on high performance hardware can improve client perceived performance

  34. JavaIDL • In Java we cannot separate a class’s definition from its implementation as we can in C++ • Header files • Implementation files • CORBA allows the separation of definition and implementation

  35. JavaIDL • CORBA uses IDL for defining interfaces, language specific IDL compilers are available • create target language skeletons and stubs to be used by developers for building CORBA clients and servers • CORBA objects talk to each other via interfaces

  36. CORBA Object Communications IIOP Object B Object A Interface Interface

  37. Conceptually ... Client Server Client Server ORB Client Server

  38. What happens... • Server objects register their methods with the orb naming service • Client binds to the orb naming server for a server object method • Naming service returns location of server object and disconnects • Client connects to server at returned location

  39. Really though... Registration ORB 1 Client Server Services 2 Client Server 3 Client Server

  40. This is very simplified • Very…

  41. Other ORB services... • Depending on vendor implementation: • automatic failover for servers • load balancing • real time, online database

  42. Orb Info • The Visigenics VisiBroker Orb is built into Netscape Communicator 4.0 to aviod having to download 100+ Corba class files; Netscape browser is ready to be a CORBA client • Borland bought Visigenics • Borland’s and Visigenics vision is a CORBA based world • Why didn’t Microsoft buy Visigenics?

  43. Why MS didn’t buyVisigenics • Wrong vision… • MS Vision is DCOM not CORBA

  44. CORBA +’s & -’s • Very robust and scalable • Language independent • Multi-platform • very steep learning curve • specification addresses functionality not a standardized API • every ORB programs differently

  45. Remote Method Invocation • Similar to C++ RPCs • Instead of creating and instantiating an object on your machine create it on another machine and communicate with it as if it were a local object • eliminates much CORBA overhead • comes with JDK (unlike CORBA)

  46. RMI • RMI classes let you generate stubs and skeleton layers like JavaIDL • Remote reference Layer translates stub and skeletion calls to native transport calls on the host architecture and carries out remote reference protocols

  47. RMI Model Client Server Stubs Skeletons Remote Remote Reference Reference Transport

  48. RMI • Currently RMI uses its own “on the wire” protocol that is based on the Java serialization API • IIOP over RMI is a currently an option for CORBA compatibility

  49. Enterprise Java Beans • Java, server side component technology • Application Server Based Technology (IBM Websphere, BEA Weblogic, Silverstream, Macromedia JRun • Draws heavily on RMI, CORBA

  50. EJB Architecture Application Server EJB Container Browser Database EJB Server Transactions Security

More Related