This project aims to create two kinds of multi-threaded web servers (with thread-pooling) for executing simple tasks.
There are three tasks implemented and the user can add more (see details below).
The web servers receive the command and the parameter(s) for running a task through terminal command curl
.
P.S. There is another project where I used ServerSocker in GitHub: localhost-chat-socket
Different Type of Web Serves Using HttpServer and ServerSocket
-
WebServerHttp is developed using HttpServer [javadoc].
-
WebServerSocket is developed using ServerSocket [javadoc].
Both web servers use ExecutorService [javadoc] that executes each submitted task in the pooled thread, more specifically, Executors.newCachedThreadPool()
which is an unbounded thread pool with automatic thread reclamation [javadoc].