Skip to content

Commit

Permalink
Multithread Websockets to increass throughput (hyperledger#231)
Browse files Browse the repository at this point in the history
Vertx by default orders all calls to executeBlocking in an ordered
fashion.  As a side effect all requests are single threaded, even across
multiple clients. Because JSON-RPC has request identifiers it is not
needed to thread responses as they can be answered out of order.  This
also allows multiple threads to handle requests, increasing throughput.

Signed-off-by: Danno Ferrin <[email protected]>
Signed-off-by: edwardmack <[email protected]>
  • Loading branch information
shemnon authored and edwardmack committed Feb 4, 2020
1 parent 1034aa0 commit 957ee40
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public void handle(
future.complete(new JsonRpcErrorResponse(request.getId(), JsonRpcError.INTERNAL_ERROR));
}
},
false,
result -> {
if (result.succeeded()) {
replyToClient(id, Json.encodeToBuffer(result.result()));
Expand Down

0 comments on commit 957ee40

Please sign in to comment.