/web-http-socket-server-task-manager-docker

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. The web servers receive the command and the parameter(s) for running a task through terminal command.

Primary LanguageJava

Multi-threaded WebServers tasks executor using WebHttpServer and WebServerSocket

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

Full article

Different Type of Web Serves Using HttpServer and ServerSocket

WebServers

  • 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].