Number of gRPC clients versus number of connections
App Development2 posts442 views1 likesLast activity Jun 2023
MR
Mr_MannorothOP
Jun 2023When creating gRPC connections from the Java client to the participant node, should we be using one single client and use this client for all API calls, or should we be creating multiple clients and share them across API calls to the participant node?
YA
YazanDianieh
Jun 2023I’ve posted a similar question many weeks ago. I’m still interested in getting an answer. Any one please?
I have a Java integration app (spring boot) that monitors various contracts on the ledger API using Java bindings. Within the app I have multiple Java service classes, with each Java service class monitoring a specific set of contracts. Should each Java service class establish/get/create its own connection to the ledger (via DamlLedgerClient), and therefore potentially have multiple open connections to the leger at any one time by multiple Java classes within the same app, or should there be on…