Chapter 4: Core Web Technologies
Contents - Chapter 1 o Exchanging information over the Internet ÞHTTP, HTML ÞURI, URI ÞWeb server, web browser o Web services for supporting remote clients ÞApplets ÞCommon Gateway Interface (CGI) ÞServlets o Application servers ÞMiddleware for Web applications ÞJ2EE o Web technologies for application integration ÞMiddleware extensions ÞFirewalls and tunneling
Before and after the web o Early protocols, applications ÞTelnet: to log in to a remote machine ÞSMTP: Simple Mail Transfer Protocol ÞFTP: File Transfer Protocol ÞArchie: FTP to create a distributed file system ÞGopher: GUI for publishing and accessing text files over the Internet o Web technologies ÞWeb server ÞWeb browser ÞHTTP: HyperText Transfer Protocol ÞHTML: HyperText Markup Language ÞURI: Uniform Resource Identifier ÞURL: Uniform Resource Locator
Proxy o Acts as a server and client o Caching o Block undesired sites o Log usage o Bypass blocks o Scan outgoing traffic HTTP client wide area network (Internet) HTTP proxy HTTP server HTTP gateway firewall HTTP tunnel
Gateway o Acts as an intermediary for a server o Keeps machines anonymous o Controls access to the network o Performs load-balancing, authentication, decryption HTTP client wide area network (Internet) HTTP proxy HTTP server HTTP gateway firewall HTTP tunnel
Firewall o Blocks unauthorized access, permits authorized communications o permit / deny / encrypt / decrypt / proxy all computer traffic between different security domains HTTP client wide area network (Internet) HTTP proxy HTTP server HTTP gateway firewall HTTP tunnel
Tunnel o Acts as a blind relay between two connections o Encapsulate protocols within HTTP or SSH (Secure Shell) to get through what the firewall would prevent HTTP client wide area network (Internet) HTTP proxy HTTP server HTTP gateway firewall HTTP tunnel
Secure Socket Layer (SSL) o Normally HTTP traffic is not encrypted, it can be “sniffed” o SSL uses public key encryption o HTTPS: HyperText Transfer Protocol over Secure sockets layer o HTTP “cookies” are used to store data on the client machine HTTPS client Secure Sockets Layer (SSL) HTTPS server TCP/IP network layer application layer
client server (resource manager) middleware wide area network (Internet) HTTP client HTTP server Copyright Springer Verlag Berlin Heidelberg 2004 A 3-tier architecture on the web o “Let’s put an ATM” in every home” o Business-to-consumer (B2C) interaction o The web browser is a universal client
middleware Web server client browser java virtual machine applet wide area network (Internet) firewall server (resource manager) Copyright Springer Verlag Berlin Heidelberg 2004 Applets o HTTP is a document exchange protocol, it’s static o Applets are downloadable programs o The server sends the appropriate program each time o The web browser becomes a universal client o Code must be small for rapid transfer
middleware Web server browser wide area network (Internet) firewall HTTP GET request client CGI program server (resource manager) Copyright Springer Verlag Berlin Heidelberg 2004 Common Gateway Interface o The CGI program is on the server and it has a URL o When the URL is accessed, the CGI program is executed and its output is saved as an HTML document o This saved document is returned to the web browser which then displays it o It is possible to pass parameters to CGI programs
middleware browser wide area network (Internet) firewall HTTP GET request client Web server Java server process Java thread server (resource manager) Copyright Springer Verlag Berlin Heidelberg 2004 Servlets o Similar to CGI, but “lightweight” o Run as Java threads o Saves the cost of context switching o Memory efficient o Can be stateless
connection to resource mgmt layer presentation layer resource management layer application logic layer client application server Web server wide area network (Internet) firewall HTTP browser other protocols other servers ( , SOAP,..) Copyright Springer Verlag Berlin Heidelberg 2004 Application servers o It’s a middleware platform that provides support for Web access o Covers both the application logic and the presentation layer o Prepares, dynamically generates, manages document
support for communication and presentation Servlets JavaServer Pages (JSP) Enterprise Java Beans (EJB) Java DataBase Connectivity (JDBC) Java Naming and Directory Interface (JNDI) support for the application integration Java 2 Connector Architecture (J2CA) Java Message Service (JMS) Java transaction API (JTA) Java API for XML Processing (JAXP) JavaMail Java Authentication and Authorization Service (JAAS) support for access to resource managers Copyright Springer Verlag Berlin Heidelberg 2004 J2EE – main components
Enterprise Java Beans (EJB) o Implement the application logic o Deliver application specific functionality o Three types of beans ÞSession beans: handle session with a client (stateful/stateless) ÞEntity beans: persistent beans stored in a database ÞMessage-driven beans: can create asynchronous interaction with clients o EJB container provides the environment in which the beans are run ÞWeb server ÞWeb browser ÞHTTP: HyperText Transfer Protocol ÞHTML: HyperText Markup Language ÞURI: Uniform Resource Identifier ÞURL: Uniform Resource Locator
application logic layer presentation layer services (load balancing, pooling, caching, transaction, persistence,…) administration (management and security) application server EJB JDBC EJB JNDI J2CA resource adapter other adapters DBMS applications enterprise system 1 enterprise system 2 enterprise system n EJB container JMS Copyright Springer Verlag Berlin Heidelberg 2004
Web server server servers for other connections (e.g., WAP) presentation layer ServletsJSPs multidevice content delivery personalization logic connection to resource mgmt layer resource management layer application logic layer services (load balancing, pooling, caching,…) XML support Web services support administration (management and security) application server client Copyright Springer Verlag Berlin Heidelberg 2004
Clients supported by an application server o Web browsers requesting HTML pages with or without applets Use HTTP or HTTPS. o Applications similar to those in conventional middleware o Devices such as cell phones or PDAs Wireless application protocol (WAP), wireless markup language (WML) o programs Simple mail transport protocol (SMTP) o Web services clients Simple Object Access Protocol (SOAP)
client server (resource manager) middleware client server (resource manager) middleware wide area network (Internet) Copyright Springer Verlag Berlin Heidelberg 2004 Possible ways to connect
client server (resource manager) middleware client server (resource manager) middleware wide area network (Internet) remote-middleware protocol WAN communication protocol remote-middleware protocol WAN communication protocol Copyright Springer Verlag Berlin Heidelberg 2004 Direct integration of middleware platforms
client wide area network (Internet) Web server client Web server firewall HTTP tunnel server (resource manager) server (resource manager) middleware remote-middleware protocol WAN communication protocol middleware remote-middleware protocol WAN communication protocol Copyright Springer Verlag Berlin Heidelberg 2004
Using integrated platforms o Firewalls and tunneling ÞTunneling: protocols which would be blocked by the firewall are hidden under protocols that are accepted by the firewall ÞMostly done through HTTP or SSH (Secure Shell) ÞResults in a cumbersome architecture o EDIFACT (Electronic Data Interchange for Administration, Commerce, and Transport) ÞProvides standard templates for messages and contents of messages ÞContains fields such as: Interchange header (ID, password, date/time) Message header (type of message) User data segments (the payload) Message Trailer (end message, check for completeness) Interchange trailer (end interchange, check for completeness)
Summary o Decades of accumulated knowledge on multi-tier architectures o Use the same technology over the Internet o The client can be on ÞA Local Area Network (LAN) ÞOver the Internet ÞArchitectural implications and design constraints from using the Web are important