Enterprise Computing


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Enterprise Computing

  1. 1. CS-422 Enterprise Computing Preview
  2. 2. Client Server Strategies <ul><li>CGI (Common Gateway Interface) </li></ul><ul><li>Active Server Pages </li></ul><ul><ul><li>Personal Home Pages (PHP) </li></ul></ul><ul><ul><li>MS Active Server Pages (ASP) </li></ul></ul><ul><ul><li>Cold Fusion </li></ul></ul><ul><li>Java Servlets and JSP </li></ul><ul><li>Enterprise Java Beans </li></ul>
  3. 3. CGI <ul><li>Program run by web server in response to client request </li></ul><ul><li>perl, C, C++, VB, Java, python, tcl </li></ul><ul><li>handles submitted HTML forms data and dynamically creates a web page in real time and returns it to the requesting client </li></ul><ul><li>Old Technology; pre- HTTP, rooted in gopher </li></ul><ul><li>reliable </li></ul><ul><li>resource hog </li></ul>
  4. 4. CGI (more) <ul><li>Very useful used in conjunction with Java based clients for things like: </li></ul><ul><ul><li>Report Generation (WebFocus) </li></ul></ul><ul><ul><li>Data retrieval (files and RDBMS) </li></ul></ul><ul><ul><li>Persistent object storage (files) </li></ul></ul><ul><li>Could almost be replaced by server side Java </li></ul><ul><li>Hard to maintain program state </li></ul><ul><ul><li>must rely on programming tricks </li></ul></ul><ul><ul><ul><li>cookies, hidden variables </li></ul></ul></ul>
  5. 5. CGI (more) Browser Web Server CGI Program DB Static Web page with forms tags <form action=/CGI-BIN/AAA.PL>
  6. 6. CGI (more) <ul><li>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. </li></ul><ul><li>For frequently run CGIs there may be many copies in the machine at the same time </li></ul><ul><li>… resource hog (web servers that run a lot of CGIs will use all of the memory you can afford) </li></ul>
  7. 7. CGI (more) Browser Web Server CGI Program DB CGI Program CGI Program Browser Browser
  8. 8. Active Server Page Technologies <ul><li>HTML pages that appear to be database aware </li></ul><ul><li>HTML with an embedded scripting language and either CGI or proprietary server support are used to make forms objects appear to be database aware </li></ul><ul><li>Main contenders: </li></ul><ul><ul><li>PHP (Open Source) </li></ul></ul><ul><ul><li>Microsoft Active Server Pages (OEM Product) </li></ul></ul><ul><ul><li>Cold Fusion (OEM Product) </li></ul></ul><ul><ul><li>Java Server Pages (Open licensing from Sun) </li></ul></ul>
  9. 9. PHP (Personal Home Pages) <ul><li>Core Technologies </li></ul><ul><ul><li>HTML </li></ul></ul><ul><ul><li>PHP Script </li></ul></ul><ul><ul><li>JavaScript </li></ul></ul><ul><li>Platforms </li></ul><ul><ul><li>Primarily LINUX, Apache </li></ul></ul><ul><ul><li>Windows </li></ul></ul><ul><ul><li>UNIX </li></ul></ul><ul><li>Databases </li></ul><ul><ul><li>Primarily used with MySQL (Open Source) </li></ul></ul><ul><ul><li>Oracle, DB2 (MyODBC Open Source Database Driver)) </li></ul></ul>
  10. 10. PHP (More) <ul><li>How it works </li></ul><ul><ul><li>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) </li></ul></ul><ul><ul><li>the CGI retrieves the requested file, parses it looking for PHP tags </li></ul></ul><ul><ul><li>PHP tags are resolved and the tag is replaces by that resolution </li></ul></ul><ul><li>Benefits </li></ul><ul><ul><li>Cheap, Open Source </li></ul></ul><ul><ul><li>Easy to learn </li></ul></ul><ul><ul><ul><li>special HTML-like tags </li></ul></ul></ul><ul><ul><ul><li>very reminiscent of C </li></ul></ul></ul><ul><ul><li>many Open Source, domain specific add ons available </li></ul></ul><ul><li>Problems </li></ul><ul><ul><li>Support is typical of Open Source (but quality is high) </li></ul></ul>
  11. 11. PHP (typical) Architecture MySQL DB HTML JavaScript Apache Web Server PHP CGI
  12. 12. Microsoft Active Server Pages <ul><li>Core technologies </li></ul><ul><ul><li>MS Internet Information Server </li></ul></ul><ul><ul><li>MS Internet Explorer (IE4.0) </li></ul></ul><ul><ul><li>VBScript </li></ul></ul><ul><ul><li>Java </li></ul></ul><ul><ul><li>ActiveX </li></ul></ul><ul><ul><li>SQL Server & Access </li></ul></ul><ul><ul><li>DCOM </li></ul></ul>
  13. 13. Microsoft Active Server Pages <ul><li>Works only on Windows (NT Server and W2000 Server) </li></ul>
  14. 14. Microsoft ASP Architecture Data Base, (Access SQLServer) VBScript HTML JavaScript VBScript IIS Java ActiveX IE 4.0
  15. 15. Microsoft ASP <ul><li>How it works </li></ul><ul><ul><li>IIS retrieves the requested file, parses it looking for Jscript/VBScript and resolves the script by replacing it with the resolution (values/text) </li></ul></ul><ul><li>Benefits </li></ul><ul><ul><li>A 100% MS solution, important for many corporate IS shops </li></ul></ul><ul><ul><li>Easy to learn </li></ul></ul><ul><ul><ul><li>based on VB </li></ul></ul></ul><ul><ul><ul><li>skills are readily available from the large number of VB programmers </li></ul></ul></ul><ul><ul><li>easy accessibility to Windows API and DLLs </li></ul></ul><ul><li>Problems </li></ul><ul><ul><li>Security has always been a problem due to MS frequent OS and product release cycle </li></ul></ul>
  16. 16. Cold Fusion <ul><li>Core Technologies </li></ul><ul><ul><li>Proprietary, tag based, embedded scripting language </li></ul></ul><ul><ul><li>Javascript, Java </li></ul></ul><ul><li>Platforms </li></ul><ul><ul><li>NT, LINUX, Solaris </li></ul></ul><ul><ul><li>Apache, Netscape/iPlanet, IIS </li></ul></ul><ul><li>Databases </li></ul><ul><ul><li>Access, MS SQL Server (NT W/2000 Only) </li></ul></ul><ul><ul><li>Sybase, Oracle, DB2 </li></ul></ul><ul><ul><li>MySQL (requires MYODBC driver) </li></ul></ul>
  17. 17. Cold Fusion Architecture Database HTML JavaScript Web Server ColdFusion Server ODBC JDBC Native Java
  18. 18. Cold Fusion <ul><li>How it works </li></ul><ul><ul><li>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 </li></ul></ul><ul><li>Benefits </li></ul><ul><ul><li>Multi-platform </li></ul></ul><ul><ul><li>Easy to learn </li></ul></ul><ul><ul><ul><li>tag based (looks like HTML, gives web community comfort that its just some additional tags) </li></ul></ul></ul><ul><ul><li>much support available via the web, wide following in the web community </li></ul></ul><ul><li>Problems </li></ul><ul><ul><li>OEM pricing (current price of $5K/server) </li></ul></ul>
  19. 19. Java Servlets <ul><li>Core Technologies </li></ul><ul><ul><li>Java </li></ul></ul><ul><ul><li>HTML, Javascript </li></ul></ul><ul><li>Platforms </li></ul><ul><ul><li>NT, LINUX, Solaris </li></ul></ul><ul><ul><li>Apache/Tomcat, Netscape/iPlanet, JRun </li></ul></ul><ul><li>Databases </li></ul><ul><ul><li>all JDBC enabled (DB2, Oracle, Sybase, Informix) </li></ul></ul>
  20. 20. Java Servlet Architecture HTML JavaScript Web Server with servlet engine & JRE Database Servlet Cache
  21. 21. Java Servlets <ul><li>How it works </li></ul><ul><ul><li>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 </li></ul></ul><ul><li>Benefits </li></ul><ul><ul><li>Cross platform as long as compliant servlet engine is availabe </li></ul></ul><ul><ul><li>Easy to learn for Java/C++ programmers </li></ul></ul><ul><ul><li>much support available via the web </li></ul></ul><ul><ul><li>faster than interpretive technologies (like PHP, ASP, CF) </li></ul></ul><ul><li>Problems </li></ul><ul><ul><li>still hard to find skills </li></ul></ul><ul><ul><li>still considered to be “bleeding edge” by many IS shops </li></ul></ul>
  22. 22. Java Server Pages <ul><li>Core Technologies </li></ul><ul><ul><li>Java </li></ul></ul><ul><ul><li>HTML, Javascript </li></ul></ul><ul><li>Platforms </li></ul><ul><ul><li>NT, LINUX, Solaris </li></ul></ul><ul><ul><li>Apache/Tomcat, Netscape/iPlanet, JRun </li></ul></ul><ul><li>Databases </li></ul><ul><ul><li>all JDBC enabled (DB2, Oracle, Sybase, Informix) </li></ul></ul>
  23. 23. JSP Architecture HTML JavaScript Web Server with JSP engine & JRE Database Servlet Cache
  24. 24. What is a JSP <ul><li>Combination of HTML, Javascript, and a set of Java tags (5) </li></ul><ul><ul><li>Java tags allow java code and calls to Javabeans to be embedded in line </li></ul></ul><ul><ul><li>Java tags also allow control of the Java runtime environment </li></ul></ul>
  25. 25. Java Server Pages <ul><li>How it works </li></ul><ul><ul><li>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 </li></ul></ul><ul><li>Benefits </li></ul><ul><ul><li>Cross platform as long as compliant engine is availabe </li></ul></ul><ul><ul><li>Allows Integrated Product Team development </li></ul></ul><ul><ul><li>faster than interpretive technologies (like PHP, ASP, CF) </li></ul></ul><ul><li>Problems </li></ul><ul><ul><li>still hard to find skills </li></ul></ul><ul><ul><li>still considered to be “very bleeding edge” by many IS shops </li></ul></ul>
  26. 26. Deployment Strategies
  27. 27. 2-Tier Client Server <ul><li>Java based Client; application or applet </li></ul><ul><li>JDBC </li></ul><ul><li>Database </li></ul>
  28. 28. 2-Tier Client-Server - application JDBC Enabled Database Java Client Application using JDBC APIs This application architecture is simple but won’t scale to very many users TCP/IP
  29. 29. 2-Tier Client-Server - applet Webserver JDBC Enabled DB Unix or Windows Browser JVM HTML Webserver and DB must be on same IP address applet
  30. 30. 2-Tier Problems <ul><li>Client has to do everything </li></ul><ul><li>DBs aren’t meant to handle large numbers of transient connections (connections are often more expensive than the db transaction being done) </li></ul><ul><li>Good only for infrequently used apps </li></ul>
  31. 31. 3-Tier Client-Server <ul><li>Java based Client; application or applet </li></ul><ul><li>Server/middleware </li></ul><ul><li>Database </li></ul>
  32. 32. 3-Tier Client Server Client Client Client Server DB Sockets JavaIDL JavaRMI JDBC Native
  33. 33. 3-Tier Advantages <ul><li>Server can manage database connections efficiently </li></ul><ul><li>Client can focus on business logic </li></ul><ul><li>Server can preformat data for client </li></ul><ul><li>Running server on high performance hardware can improve client perceived performance </li></ul>
  34. 34. JavaIDL <ul><li>In Java we cannot separate a class’s definition from its implementation as we can in C++ </li></ul><ul><ul><li>Header files </li></ul></ul><ul><ul><li>Implementation files </li></ul></ul><ul><li>CORBA allows the separation of definition and implementation </li></ul>
  35. 35. JavaIDL <ul><li>CORBA uses IDL for defining interfaces, language specific IDL compilers are available </li></ul><ul><ul><li>create target language skeletons and stubs to be used by developers for building CORBA clients and servers </li></ul></ul><ul><ul><li>CORBA objects talk to each other via interfaces </li></ul></ul>
  36. 36. CORBA Object Communications Object A Object B Interface Interface IIOP
  37. 37. Conceptually ... Client Client Client Server Server Server ORB
  38. 38. What happens... <ul><li>Server objects register their methods with the orb naming service </li></ul><ul><li>Client binds to the orb naming server for a server object method </li></ul><ul><li>Naming service returns location of server object and disconnects </li></ul><ul><li>Client connects to server at returned location </li></ul>
  39. 39. Really though... Client Client Client Server Server Server ORB Services Registration 1 2 3
  40. 40. This is very simplified <ul><li>Very… </li></ul>
  41. 41. Other ORB services... <ul><li>Depending on vendor implementation: </li></ul><ul><ul><li>automatic failover for servers </li></ul></ul><ul><ul><li>load balancing </li></ul></ul><ul><ul><li>real time, online database </li></ul></ul>
  42. 42. Orb Info <ul><li>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 </li></ul><ul><li>Borland bought Visigenics </li></ul><ul><li>Borland’s and Visigenics vision is a CORBA based world </li></ul><ul><li>Why didn’t Microsoft buy Visigenics? </li></ul>
  43. 43. Why MS didn’t buyVisigenics <ul><li>Wrong vision… </li></ul><ul><li>MS Vision is DCOM not CORBA </li></ul>
  44. 44. CORBA +’s & -’s <ul><li>Very robust and scalable </li></ul><ul><li>Language independent </li></ul><ul><li>Multi-platform </li></ul><ul><li>very steep learning curve </li></ul><ul><li>specification addresses functionality not a standardized API </li></ul><ul><ul><li>every ORB programs differently </li></ul></ul>
  45. 45. Remote Method Invocation <ul><li>Similar to C++ RPCs </li></ul><ul><li>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 </li></ul><ul><li>eliminates much CORBA overhead </li></ul><ul><li>comes with JDK (unlike CORBA) </li></ul>
  46. 46. RMI <ul><li>RMI classes let you generate stubs and skeleton layers like JavaIDL </li></ul><ul><li>Remote reference Layer translates stub and skeletion calls to native transport calls on the host architecture and carries out remote reference protocols </li></ul>
  47. 47. RMI Model Transport Client Server Stubs Skeletons Remote Reference Remote Reference
  48. 48. RMI <ul><li>Currently RMI uses its own “on the wire” protocol that is based on the Java serialization API </li></ul><ul><li>IIOP over RMI is a currently an option for CORBA compatibility </li></ul>
  49. 49. Enterprise Java Beans <ul><li>Java, server side component technology </li></ul><ul><li>Application Server Based Technology (IBM Websphere, BEA Weblogic, Silverstream, Macromedia JRun </li></ul><ul><li>Draws heavily on RMI, CORBA </li></ul>
  50. 50. EJB Architecture Browser Application Server EJB Container Transactions Security EJB Server Database
  51. 51. Transaction Management <ul><li>EJBs are transactional by nature </li></ul><ul><ul><li>can be non-transactional but defined for distributed transactions </li></ul></ul><ul><ul><li>two-phase commit protocol </li></ul></ul><ul><ul><li>uses Java Transaction Service (JTS) </li></ul></ul><ul><ul><ul><li>Java binding for CORBA Object Transaction Service (OTS) </li></ul></ul></ul><ul><ul><ul><li>spans multiple transactions across multiple database on multiple platforms </li></ul></ul></ul><ul><ul><ul><li>insures interoperability with other EJB servers </li></ul></ul></ul>
  52. 52. Persistance <ul><li>EJBs provide a simple programming model for managing object persistance </li></ul><ul><ul><li>beans can manage their own persistance </li></ul></ul><ul><ul><li>persistance can be managed by the EJB container </li></ul></ul><ul><ul><li>big improvement over active server page technologies </li></ul></ul>
  53. 53. Security <ul><li>Java policy based security </li></ul><ul><ul><li>J2EE </li></ul></ul><ul><ul><li>built into JDK since ver 1.1 </li></ul></ul>
  54. 54. EJB Server <ul><li>Provides services for the EJB container </li></ul><ul><li>provides distributed transaction management </li></ul>
  55. 55. EJB Container <ul><li>EJB Life cycle management (creation to destruction) </li></ul><ul><li>implicit transaction control </li></ul><ul><li>persistance management </li></ul><ul><li>transparent distribution services </li></ul><ul><li>security services </li></ul><ul><li>isolates the developer from platform dependent APIs </li></ul>
  56. 56. Standards based approach <ul><li>Based on industry standards (TCP/IP, IIOP, DCOM…) </li></ul><ul><li>the model applies to both small scale and large scale applications </li></ul><ul><li>transparent access to backend databases (direct JDBC/JSQL access is allowed) </li></ul>
  57. 57. Benefits <ul><li>Highly scaleable </li></ul><ul><ul><li>load balancing </li></ul></ul><ul><ul><li>automatic failover </li></ul></ul><ul><ul><li>managed persistance </li></ul></ul><ul><ul><li>high transaction rates </li></ul></ul><ul><ul><li>portability </li></ul></ul>
  58. 58. Problems <ul><li>High capital and software investment </li></ul><ul><li>Steep learning curve </li></ul><ul><li>Considered “bleeding edge”and therefore high risk by most IS shops. </li></ul>