6. Architecture
What we want !!!
Tomcat
internet
Apache
httpd
server
mod_jk
load balancer
Tomcat
Tomcat
static
resources
antislashn.org
Tomcat and Apache httpd - Introduction
dynamic
resources
2 / 37
7. The evolution of the web
●
1989 – the birth of the web
●
●
●
Tim Berners-Lee
distributed information system for CERN physicists and
engineers
1990 – the first web page
●
was about the WWW project
–
●
World Wide Web
no screen-shot of the original page
antislashn.org
Tomcat and Apache httpd - Introduction
3 / 37
8. The evolution of the web
●
source : http://evolutionofweb.appspot.com/
antislashn.org
Tomcat and Apache httpd - Introduction
4 / 37
9. Web server
●
Primary function : to deliver web pages to clients
●
●
HTTP : communication protocol between client and server
Commons features
●
Virtual hosting to serve many sites using one IP address
●
Server-side scripting to generate dynamic web pages
–
●
CGI, Fast CGI, SSI, …
Bandwidth throttling
antislashn.org
Tomcat and Apache httpd - Introduction
5 / 37
10. Web server
●
Market share
Product
Vendor
May 2013
Percent
Apache httpd
Apache
359 441 468
53.42 %
IIS
Microsoft
112 303 412
16.69 %
nginx
NGINX Inc.
104 411 087
15.52 %
GWS
Google
23 029 260
3.42 %
source : Wikipedia
antislashn.org
Tomcat and Apache httpd - Introduction
6 / 37
11. HTTP
●
Hypertext Transfert Protocol
●
request – response protocol
–
–
the client submits an HTTP request to the server
the server send an HTTP response
●
HTTP/1.0 : original version
●
HTTP/1.1 : from January 1997
–
●
RFC 2068 and 2616
HTTP/2.0 : 2014 ???
–
based on SPDY (SPeeDY)
●
antislashn.org
http://www.chromium.org/spdy/spdy-whitepaper
Tomcat and Apache httpd - Introduction
7 / 37
12. HTTP
●
Stateless protocol
●
the server does not retain information about each user
●
web applications implement server side session
–
●
cookies, hidden variables or query string parameters
Default port : 80
●
HTTPS : 443
antislashn.org
Tomcat and Apache httpd - Introduction
8 / 37
14. HTTP
●
Request methods
●
GET : requests a resource
●
HEAD : like GET request but without the response body
●
POST : requests that the server accept the entity enclose
in the request
–
might be a form
●
PUT : requests that the enclose entity be store
●
DELETE : deletes the resource
antislashn.org
Tomcat and Apache httpd - Introduction
10 / 37
15. HTTP
●
HTTP methods (continuation)
●
TRACE : echoes back the received request
–
●
●
OPTIONS : returns the HTTP methods that the server
supports
CONNECT : uses a proxy like a communication tunnel
–
●
for debug
for SSL
PATCH : uses to apply partial modification to a resource
antislashn.org
Tomcat and Apache httpd - Introduction
11 / 37
16. HTTP
●
●
GET and POST are the most widely used by web
applications
RESTful web service uses
●
GET
●
POST
●
PUT
●
PATCH
●
DELETE
antislashn.org
Tomcat and Apache httpd - Introduction
12 / 37
17. HTTP
●
HTTP response status codes
●
1xx : informational
●
2xx : success
–
●
3xx : redirection
–
–
●
301 Moved permanently
304 Not Modified
4xx : client error
–
●
200 OK
404 Not Found
5xx : server error
–
antislashn.org
500 Internal Server Error
Tomcat and Apache httpd - Introduction
13 / 37
18. HTTP
●
HTTP authentications
●
BASIC access authentication
–
the username and password are combined into a string
●
–
●
username:password
this string is then encoded using Base64
DIGEST access authentication
–
–
antislashn.org
uses MD cryptographic hashing
the password is not used directly
Tomcat and Apache httpd - Introduction
14 / 37
19. Java evolution
●
Language issued from a Sun project
●
●
named “Stealth” and supervised by Patrick Naugthon
●
●
1990
James Gosling and Mike Sheridan arrived in 1994
1996 : first JDK publication
–
JDK : Java Development Kit
●
2009 : Oracle bought Sun
●
2010 : James Gosling quits Oracle
antislashn.org
Tomcat and Apache httpd - Introduction
15 / 37
20. Java evolution
●
JDK 1.0 – 1996 (23 of January) : 201 classes et 8 packages
●
JDK 1.1 – 1997 (19 of February) : 503 classes et 23 packages
●
J2SE 1.2 – 1998 (9 of December) : 1 520 classes et 59 packages
●
J2SE 1.3 – 2000 (8 of May) : 1 840 classes et 76 packages
●
J2SE 1.4 – 2002 (6 of February) : 2 990 classes et 135 packages
●
J2SE 5.0 – 2004 (30 of September) : 3 280 classes et 166 packages
●
Java SE 6 – 2006 (11 of December) : 3780 classes et 202 packages
●
Java SE 7 – 2011 (7 of July) : 4 024 classes et 209 packages
●
Java SE 8 – 2014
●
Java SE 9 - 2016
antislashn.org
Tomcat and Apache httpd - Introduction
16 / 37
21. Java acronyms
●
JRE : Java Runtime Environment
●
JDK : Java Development Kit
●
JVM : Java Virtual Machine
●
Java SE : Java Standard Edition
●
●
Java ME : Java Micro Edition
●
●
earlier J2SE
earlier J2ME
Java EE : Enterprise Edition
●
antislashn.org
earlier J2EE
Tomcat and Apache httpd - Introduction
17 / 37
22. Java acronyms
●
JSR : Java Specification Request
●
●
JCP : Java Community Process
●
●
consortium which manage the Java evolutions
EJB : Enterprise Java Bean
●
●
users can ask new features in the Java platforms
JavaBean component handles by a Java EE server
POJO : Plain Old Java Object
●
a very simple Java component
antislashn.org
Tomcat and Apache httpd - Introduction
18 / 37
23. Java platforms
●
Java SE
●
standalone applications
●
executed when launching the JVM
–
●
Java EE
●
●
java tool
the application is handled in a server
Java ME
●
embedded applications
●
executed in a particular JVM : the KVM
antislashn.org
Tomcat and Apache httpd - Introduction
19 / 37