Web Server And Application Servers

Transcription

Web Server AndApplication ServersSunnie ChungAdapted from Lecture ofDaniel L. Silver, Ph.D.

OutlineThe Apache HTTP server Java application servers The need for more powerful middleware J2EE A comparision of the leading applicationservers on the market

Evolution on the plicatonsInteractivity CGI ServersDynamic web pagesPublishing HTTP ServersStatic web pagesTime or MaturityApp.Servers

The Apache HTTP Server What is unique about the development of Apache?See www.apache.org– What other software system shares this characteristic? First created in 1995 by Rob McCool, NCSASurvey says: 63% of the HTTP server marketAvailable for Unix, Linux, Windows (NT, 98)Homework: Where did it get its name?

The Apache HTTP Server Architecture:– Modular in nature– Promotes slim and simple configurations– Modules can be compiled and loaded as needed such as» Core - core apache features – required!» mod access, mod auth - administration of host and user groupaccess» mod action, mod cgi - Action on requested CGI script files» mod asis - “as is” delivery of certain file types (e.g. *.txt)» mod-alias - Access to directories not in the apache root» mod usretrack -User tracking via cookies

Apache HTML dex.htmlHTTPadminBrowserInternetApacheHTTP Serverhttp/https./store15/index.html

Apache CGI pacheHTTP Servermod.CGI./store15/cgi-bin/Hello.cgiUnixOp. sys.

Java Application Servers Application servers were created originally to fieldmultiple simultaneous CGI requests, the divideand conquer approachJava servlets were introduced by Sun as a methodof providing the benefits of server-side processingwhile taking advantage of many great Javacharacteristics:–––––Developers new the langaugeSimple to understandThere were lost of objects and methods already writtenCode was portable to many different servers (JVM)Faster than CGIs

Tomcat Java Servlet FirstServletClientTomcatadminBrowserInternetHTTP ServerTomcatJava App.ServerJava BeanFirstServlet.class

Tomcat JSP dex.jspE-Comm DBBrowserInternetHTTP ServerTomcatJava App.ServerClass DB./store15/index.jspStore categoryor product dataJava BeanPointer to internal .class filefor index.jsp

The E-Business ArchitecturePartners, SuppliersSupCMEmployeesERPPMKMMiddlewareA new era ustomers, DistributorsStakeholders

Constructing the E-BusinessArchitecture A New Era of Cross-Functional IntegratedApplications–––––CRM Customer Relationship ManagementERP Enterprise Resource PlanningSupCM Supply Chain ManagementSellCM Selling Chain ManagementPM Procurement (Operational Resource)Management– KM Knowledge Management (DW/Analytics)– Middleware Integration Applications

The Need for More PowerfulMiddleware More efficient use of server resourcesFlexibility - ever changing products, technology,business processMulti-channel interfaces has forced separation of:– Customer (web) interface aspect– Enterprise (application) interface aspects End-to-end transaction integrity requiredSecurity – a primary concernIntegration – ability to integrate with other andoften older computer systems

Java has Risen to the Challenge Why Java?––––Object-orientedPlatform independentNetwork awareMulti-threaded (easy to develop applicationsthat do two or more things at a time)– Relatively fast learning curve– Faster development times

J2EE In 1999, Sun Microsystems announced acomprehesive Java based middlewarearchitecture and technolgy called Java 2Enterprise Edition or J2EE:– Full server side Java standard developmentplatform– Solid backend for many wireless applications– Solid infrastructure with many commonly usedcomponents (Java Beans think objects)

J2EE J2EE provides:– EJB – Enterprse Java Beans, handle criticaltasks of E-commerce such as transactions andDB access– JSPs – Java Server Pages, brings flexibility touser interfaces– Java Servlets provide link between userinterface and backend enterprise applications– JDBC – Java Database Connectivity, standardinterface for access to relational DB

Java Enterprise Edition (Java EE)Application Servers Java EE is an open standard for building web-basedenterprise applicationsContainers provide several features so that applicationdevelopers won’t have to write everything fromscratchJava EE provides the consumer with several choicesbetween platform and vendorOpen source application servers are gaining a lot ofmomentum due to low cost of entry and improvingquality

Typical Scenario Create a web application that is secure, reliable andcan serve large quantities of data to thousands ofconcurrent users.Problem:– It needs to be in production within 6 months. One Solution:– Hire lots of programmers to implement security,scalability, database features Difficult to find skillsetHigh cost to build and maintain applicationCould be error prone

Key Observations - Java EE Key observation made by application server vendors– Most web applications require similar features such asdatabase access, security, scalability, etc.– Provide these features that are fully tested in a container tobe leveraged by application developers» Similar to Java and C libraries– Allows application programmers to focus on business logicinstead of writing all features from scratch

Services Provide by Java EE Web ServicesRMI for distributed applicationsLoad balancing / clusteringDatabase integrationSystem managementMessage-oriented middlewareSecurityDynamic redeploymentand many others .

Java EE ContainersSource: ay.html

Vendors Commercial– IBM WebSphere Application Server– BEA WebLogic– Oracle OC4J Open Source––––JBoss Application ServerApache GeronimoSun GlassfishApache Tomcat (only a web container)

Alternatives Spring / Hibernate solution– New EJB specification is very similar to Hibernate– Spring and Hibernate are not based on specifications– Not as mature as Java EE Microsoft .Net– Similar functionality– Forced into one platform and one vendor– One of the key features of web services is theinteroperability of .Net and Java EE.

Advantages and Disadvantages Advantages– Many, many features provided to the application developer– Shorter development cycle– Low cost of entry, especially when using open sourceapplication servers Disadvantages– Less flexibility on architecture– Troubleshooting can be very difficult, especially if youuncover a bug in the vendor’s code– Sometimes your application doesn’t require all the featuresavailable - this could hinder performance» Being addressed by open source community

Additional InformationJava EE 5 Tutorial ex.html Apache Tomcat (only a servlet engine) http://tomcat.apache.org/ JBoss Application Server http://www.jboss.org/ Apache Geronimo http://geronimo.apache.org/

Common Characteristics ofApplication Servers Connectivity to various applications and DBs onvarious operating environments and hardwareProvides an integrated IDE for all aspectsSupport for reusable distributed components(CORBA, COM, EJB)Performance management (load balancing,caching, monitoring)Robust and reliable software – redundancy,backup/recoveryUser-friendly administrative, diagnostic toolsStrong security framework

3-Tier Architectural of ModernWeb ServersERPClient 1BrowserClient 2HTTPTCP/IPInternetBrowserServer BServer AHTTPServerApp.ServerDatabaseServerURL index.html prog2.classprog1.cgiBankServer

The Major ApplicationServer ProvidersBEA – WebLogic (7.0) - 24% of market IBM – WebSphere (4.0) – 33% Oracle – Oracle(Ias (1.0) – 12% SUN – Sun ONE (was iPlanet) – 8% Macromedia – ColdFusion (MX)

Comparison of MajorApplication Servers Refer to class handoutBEA - WebLogic (7.0)–––––––The most widely used server on the marketVery scalableBridges cap between SUN Java J2EE and MS COMRobust features, great security frameworkSupport for wireless mobile clients (J2ME)Maintenance and support is managableNumber 1 with many commercial users

Comparison of MajorApplication Servers IBM – WebSphere (4.0)– Java technology based – full J2EE support– Sophisticated integration capabilities to COM andCORBA systems– Scales well– Fits well with DB2 and other IBM E-Business products– Support for wireless mobile clients (J2ME)– Requires greater care and feeding– Excellent for large companies

Comparison of MajorApplication Servers Oracle – Oracle(Ias (1.0)– Claim to be the worlds leading wireless mobileapplication server– J2EE and XML programming model thatradically simplifies development, installationand management– Well situated for wireless web apps– Good choice for medium to large companies

Comparison of MajorApplication Servers SUN – Sun ONE (was iPlanet)––––Excellent scaling and robustnessAutomatic failover capabilitiesIntegrate XML parser to facilitate B2B appsVersion 6.5 promises new developer tools andresources– SUN has been the Java leader on the Web– Always worth considering

Comparison of MajorApplication Servers Macromedia – ColdFusion (MX)– An easy-to-use web development environment» Kawa (discontinued)» Macromedia Flash MX» Dreamweaver MX––––Uses its own powerful server-side scripting languageHas moved to the Java architectureAlso will support .NET and J2EEGreat for small to medium sized companies

The E-Business ArchitecturePartners, ustomers, DistributorsStakeholders

Java EE is an open standard for building web-based enterprise applications Containers provide several features so that application developers won’t have to write everything from scratch Java EE provides the consumer with several choices between platform and ve