koush / AndroidAsync

Asynchronous socket, http(s) (client+server) and websocket library for android. Based on nio, not threads.
Other
7.51k stars 1.56k forks source link

How to do server support Multi-Threading and High concurrency #676

Closed CCint3 closed 5 months ago

CCint3 commented 4 years ago
AsyncHttpServer server = new AsyncHttpServer();

server.get("/", new HttpServerRequestCallback() {
    @Override
    public void onRequest(AsyncHttpServerRequest request, AsyncHttpServerResponse response) {
        Thread.currentThread().getId();
        response.send("Hello!!!");
    }
});
server.listen(5000);

The above code is single threaded. How to support multi-threading and high concurrency?

niconiconi1234 commented 1 year ago

same question

Luffys6 commented 8 months ago

same question

scola commented 5 months ago

same question, is there anyone who already has a solution ?

CCint3 commented 5 months ago

can use jetty or netty instead.