are a mechanism that enables the separation and extension of application-specific components from such web servers. void main() throws Exception{ var server = new ServerSocket(8080); for (;;) { var soc = server.accept(); Thread.ofVirtual().start(() -> { try (soc; var isr = new InputStreamReader(soc.getInputStream()); var bur = new BufferedReader(isr); var w = new PrintWriter(soc.getOutputStream())) { // Parse header var line = bur.readLine(); if (line == null) return; // exit thread IO.println("Connect from %s for %s".formatted(soc.getInetAddress(), line)); while (!bur.readLine().isEmpty()) {} // Process routing by URL var url = line.split(" ")[1]; var message = switch(url) { case "/hello" -> "Hello!!!"; case "/date" -> LocalDate.now(); default -> "It works!"; }; // Output header w.println(""" HTTP/1.1 200 OK content-type: text/html """); w.println(); // Output content w.println(""" <html><head><title>Hello</title></head> <body><h1>Hello</h1>%s</body></html> """.formatted(message)); } catch (IOException ex) { throw new UncheckedIOException(ex); } }); } }
Handling • Web Application Processing • Sessions • Authentication / Authorization • Resource Management • Server Management • Network Management • Execution Management • Configurations • Monitoring • Development Management • Build • Deployments • Tests Required processes for web development var server = new ServerSocket(8080); for (;;) { var ip = socket.remoteAddress;
Handling • Web Application Processing • Sessions • Authentication / Authorization • Resource Management • Server Management • Network Management • Execution Management • Configurations • Monitoring • Development Management • Build • Deployments • Tests Required processes for web development //Ideally, enable to configure the port number. var server = new ServerSocket(8080);
make the part easier to write • Three types of frameworks • Declarative Form • Imperative Form • Component-based Form var message = switch(url) { case "/hello" -> "Hello!!!"; case "/date" -> LocalDate.now(); default -> "It works!"; };
processing assembling • Implemented solely on the server side engineer including UI • Distinctive for each • JSF • ZK • Vaadin • Companys are sustained by a paid component.
a servlet container • Due to the computer's low performance, multiple applications were run on one server process (with main RAM of 128MB or such). • Frameworks that started from Struts are wrappers of servlets • Process just only HTTP. Servlet mechanisms are used for Auth or Session • Development and Operation are troublesome • Require deployment • Require Tomcat installed
side: Multi-server adoption due to performance plateau in threading • Demand-side: Increased traffic from 4G and Smartphones • Running a single web application across multiple servers for scale-out • Servlet Container Incompatible • App server installation and deployment is just makes development complicated • Embedded Server in Spring Boot • Full Stack Frameworks
many Hypervisor-based VM is wasteful • Emergence of containers that only virtualize OS resources like process IDs • Enables flexible operation of server processes. • Separate servers by function to allocate more server resources to high-load functions • Microservices • Startup speed is an issue for JVM , Servlets and Spring DI. • Quarkus and Micronaut solves by independent of servlets and compile-time DI • Resilience, flexibility during failures is also important. • Operations assuming failure will occur
each request handler is isolated into a single process • Serverless • Cloud-native CGI • Not only the JVM startup time but also JIT optimization timing matters • Handling a single request, the process terminates before JIT compilation. • Native compilation with GraalVM • Standardized in Project Leyden (JEP 483 in Java 24, JEP 515 in Java 25)
of deploying numerous applications to a single application server didn't work well in the cloud. • The Java EE 7 release in 2013 wasn't truly cloud-ready. • and development on Java EE 8 continued stagnating. • Advanced features of Java EE application servers replaced by Kubernetes • The strengths of Java EE are eroding.
lack of progress on Java EE 8 led to the launch of the Java EE Guardians in 2016. • Transferred to Eclipse Foundation in 2017 with the release of Java EE 8. • Because the name “Java” can no longer be used, the name changed into Jakarta EE
especially its microservices support - were uncertain, strong demand existed, leading to the formulation of MicroProfile in 2016 by members also participating in the Java EE Guardians initiative. • Focuses on monitoring and fault tolerance • Based on Jakarta EE Core Profile • Servlet independent
programming context helps make them easier to manage. • Knowing the evolusion history makes the function's meaning clearer. • Understand the components needed for an application from the framework’s features