rpc

What is difference between grpc and websocket? Which one is more suitable for bidirectional streaming connection?

懵懂的女人 提交于 2020-11-30 02:20:53
问题 I want to develop a client-server application in a bi-directional streaming manner. what is more suitable technology for this, grpc or websocket? 回答1: gRPC is not really the relevant part for comparison, it's that gRPC uses HTTP/2 which can certainly be compared to WebSockets. https://www.infoq.com/articles/websocket-and-http2-coexist This article outlines them quite well. Essentially, HTTP/2 is Client/Server with Server Push on the background, so you can make your request and simply stay on

RPC style request with MQTT

我只是一个虾纸丫 提交于 2020-08-23 09:46:27
问题 what is the best way to implement RPC style communication (synchronous request/response) with MQTT? Or would it even make sense to put another interface (e.g. REST api) into use? Thanks in advance! 回答1: MQTT is a PUB/SUB system and doesn't lend itself well to RPC. While you could possibly shoehorn something on top of MQTT to simulate the synchronicity required, you are probably better off looking for a system which provides real RPC semantics. That said, depending on your application, you can

Communication between microservices - request data

妖精的绣舞 提交于 2020-08-22 09:36:26
问题 I am dealing with communication between microservices. For example ( fictive example, just for the illustration ): Microservice A - Store Users (getUser, etc.) Microservice B - Store Orders (createOrder, etc.) Now if I want to add new Order from the Client app, I need to know user address. So the request would be like this: Client -> Microservice B (createOrder for userId 5) -> Microservice A (getUser with id 5) The microservice B will create order with details (address) from the User

Corda view consumed states in terminal

青春壹個敷衍的年華 提交于 2020-07-19 01:59:51
问题 is there an easy way to view the consumed states in the terminal with the CordaRPCOps interface? It seems that vaultQuery returns unconsumed states by default and I can't figure out how to use vaultQueryBy or anything with the criteria. I know that there should be consumed states because I can see them with H2 回答1: Hi you could always write a short API to expose the states: there is a sample for /asset in corda existing samples: here is a code snippet api for your scenario: @GET @Path("asset"

Corda view consumed states in terminal

给你一囗甜甜゛ 提交于 2020-07-19 01:59:27
问题 is there an easy way to view the consumed states in the terminal with the CordaRPCOps interface? It seems that vaultQuery returns unconsumed states by default and I can't figure out how to use vaultQueryBy or anything with the criteria. I know that there should be consumed states because I can see them with H2 回答1: Hi you could always write a short API to expose the states: there is a sample for /asset in corda existing samples: here is a code snippet api for your scenario: @GET @Path("asset"

Out-of-process COM server without a proxy/stub DLL?

只愿长相守 提交于 2020-07-07 05:50:18
问题 I am learning how to implement an out-of-process COM server and came across this Code Project article, Building a LOCAL COM Server and Client: A Step by Step Example. I can build it, and it runs fine, but where is the proxy/stub DLL? All I can see is the IDL file from which the proxy/stub code is generated during the build. But how is the DLL built, and where is it? 回答1: The short answer is that all the interfaces are marked "oleautomation", so oleaut32.dll performs the marshaling, since COM

Do we still need a connection pool for microservices talking HTTP2?

拈花ヽ惹草 提交于 2020-07-03 04:33:21
问题 As HTTP2 supports multiplexing, do we need still a pool of connections for microservice communication? If yes, what are the benefits of having such a pool? Example: Service A => Service B Both the above services have only one instance available. Multiple connections may help overcome OS buffer size limitation for each Connection(Socket)? What else? 回答1: Yes, you still need connection pool in a client contacting a microservice. First, in general it's the server that controls the amount of