Commit Graph

39 Commits

Author SHA1 Message Date
Asim Aslam
c445aed6b1 Cleanup and speedup network convergence along with direct messaging for connect and solicit 2019-12-07 19:54:29 +00:00
Asim Aslam
080363e8c4
The mega cruft proxy PR (#974)
* the mega cruft proxy PR

* Rename broker id

* add protocol=grpc

* fix compilation breaks

* Add the tunnel broker to the network

* fix broker id

* continue to be backwards compatible in the protocol
2019-11-25 16:31:43 +00:00
Asim Aslam
9f481542f3
Fix a codec race by locking the buffers. Include a buffer pool for perf. (#941)
* Fix a codec race by locking the buffers. Include a buffer pool for perf.

* Read Lock on buffer Read
2019-11-13 11:05:53 +00:00
Asim Aslam
6daf4fda72 Full support for grpc server side 2019-08-26 12:33:59 +01:00
Asim Aslam
991142cd57 No need to set request in the buffer 2019-08-16 14:42:45 +01:00
Asim Aslam
ef04331b86 multiplexing cruft 2019-08-15 20:08:49 +01:00
Asim Aslam
0bf54c122f move transport back 2019-07-09 18:41:26 +01:00
Asim Aslam
d2d6841f02 Move transport to network/transport 2019-07-07 10:37:34 +01:00
Asim Aslam
c03d935ffd fallback for 0.14.0 and older 2019-02-01 15:57:34 +00:00
Asim Aslam
8090f9968d Update headers to remove X- prefix 2019-01-24 10:11:02 +00:00
Asim Aslam
9bd32645be Account for old target 2019-01-18 10:43:41 +00:00
Asim Aslam
f41be53ff8 Add ability to process legacy requests 2019-01-18 10:23:36 +00:00
Asim Aslam
2cd2258731 For the legacy 2019-01-18 10:12:57 +00:00
Asim Aslam
784a89b488 Allow bytes.Frame to be set to sent just bytes 2019-01-16 15:27:57 +00:00
Asim Aslam
c1d0237370 Add client response 2019-01-14 21:30:43 +00:00
Asim Aslam
36788487a7 set headers as appropriate 2019-01-11 13:44:47 +00:00
Asim Aslam
9adebfcf1e rename method to endpoint 2019-01-10 21:25:31 +00:00
Asim Aslam
d004c9624b Add router modifications 2019-01-09 16:20:57 +00:00
Asim Aslam
7a1f735825 remove server codec 2019-01-09 09:02:30 +00:00
Asim Aslam
4cb41721f1 further codec changes 2019-01-08 15:38:25 +00:00
Asim Aslam
c9963cb870 rename 2019-01-07 18:20:47 +00:00
Asim Aslam
d179c971af Switch default codec and add default codec for server 2019-01-07 13:48:38 +00:00
Asim Aslam
5aeb28dfee Add error header 2019-01-07 09:11:36 +00:00
Asim Aslam
ed580204a8 Add grpc codec 2019-01-02 12:55:06 +00:00
Asim Aslam
e2623d8ef5 Make json/protobuf codecs 2018-12-31 22:01:16 +00:00
Asim Aslam
34ed5235a3 rename rpc codec 2018-11-23 20:05:31 +00:00
Hao Lian
d4b149046f server/rpc_codec: if c.codec.Write fails, reset write buffer and encode an error message about the encoding failure
When developing go-micro services, it is frequently possible to set invalid results in the response pointer. When this happens (as I and @trushton personally experienced), `sendResponse()` returns an error correctly explaining what happened (e.g. protobuf refused to encode a bad struct) but the `call()` function one above it in the stack ignores the returned error object.

Thus, invalid structs go un-encoded and the _client side times out_. @trushton and I first caught this in our CI builds when we left a protobuf.Empty field uninitialized (nil) instead of setting it to `&ptypes.Empty{}`. This resulted in an `proto: oneof field has nil value` error, but it was dropped and became a terribly confusing client timeout instead.

This patch is two independent changes:

* In rpc_codec, when a serialization failure occurs serialize an error message, which will correctly become a 500 for HTTP services, about the encoding failure. This means rpc_codec only returns an `error` when a socket failure occurs, which I believe is the behavior that rpc_service is expecting anyway.

* In rpc_service, log any errors returned by sendResponse instead of dropping the error object. This will make debugging client timeouts less of a hassle.
2017-07-17 14:21:43 -04:00
Asim
d306559d8f Nitpick Headers to Header 2016-01-28 18:11:13 +00:00
Asim
3b295b16e7 Working bidirectional streaming example 2015-12-18 20:28:50 +00:00
Asim
ba3b056e76 add headers 2015-12-16 02:15:09 +00:00
Asim
0c9f8411bb Pull rpcplus in local for the time being. We need to modify it for server side middleware 2015-12-01 23:32:23 +00:00
Asim
dddcdc34ed rename to protorpc and jsonrpc 2015-11-28 18:54:38 +00:00
Asim
80f53ab176 Add json codec 2015-11-28 18:40:32 +00:00
Asim
654728027b Updated codec interface and code. Painful stuff 2015-11-28 11:22:29 +00:00
Asim
12a1e1eeda Add pluggable codec support 2015-11-25 19:50:05 +00:00
Asim
5d88115f2a update links from myodc to micro 2015-11-20 16:17:33 +00:00
Asim
6b8855a337 Fix client rpc codec 2015-10-16 11:15:17 +01:00
Asim
0adc0e3c00 Fix rpc codec issue stopping json requests from working 2015-10-15 22:06:43 +01:00
Asim
09c784d294 add support for streaming requests. cleanup watcher initilisation 2015-06-01 18:55:27 +01:00