forked from theRainbird/CoreRemoting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO.txt
74 lines (49 loc) · 2.98 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Intern strings like vs-streamjsonrpc? For messagepack.
CallContext
ResultContext? Maybe an idea to separate them, have a separate context that flows back to the client...
session:
client heartbeat
client login\Auth
// ret sessionId
Guid service.Auth()
token?
sessionid?
TODO:
Maybe OneWay delegate could be an opt-in instead of the default (still only max one could be non-OneWay)
Instead of eating exceptions from delegates, maybe could have an optino to throw them or some way to get notified about them (via subscribe to delegate)
Update: there is an event OneWayException in RemotingClient\RemotingServer if you want to observe any eaten exceptions.
Add session management? (not in the core, but as example)
SessionManager? And an easyer way to send messages to clients via session manager?
Cache created methods? MakeGenericType? MakeGenericMethod?
CreateProxiedDelegate?
_delegateProxyCache?
OnBefore(Method)Call
OnAfter(Method)Call
OnOneWayException
OnUnobservedException
OnException
OnClientTriggeredException
remote linq
https://github.com/dotnet/csharplang/discussions/5555#discussioncomment-1852834
https://github.com/6bee/Remote.Linq
callcontext vs headers \ trailers of grpc?
meaning, could we make a GrpgCallHeaders static class, that works similar?
and meaning, could we make a GrpgCallTrailers static class, that works similar?
Use headers to tell what\if compression to use? Compress\compressor: Deflate, gzip, etc.
Use separate methods for bidir and unary? So if no callback delegate arguments can use unary.
Why? maybe a bit faster? But not sure.
TODO: try to reproduce mass reset\cancellation hang on client with bidir and dornet client?
grpd-dotnet server hack to close stream on return:
var ctx = context.GetHttpContext();
var http2stream = ctx.Features.Get<IHttp2StreamIdFeature>();
http2stream.GetType().GetMethod("OnEndStreamReceived", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance).Invoke(http2stream, null);
PS: only seems to work well for native client.
dotnet client at some point hang due to a mass reset problem (also it is a huge overhead here that every call end upm as cancelled)
So...it seems not possible to create a grpc dotnet server that is stable with both native and dotnet client...
Native client and server is always stable. Native server is stable with dotnet client too.
Dotnet client can be made stable with dotnetserver by having server sering a hangup message to the client
and then client call RequestStream.CompleteAsync() before the server call returns.
BUT this does not help when using the native client -> dotnet server, in this case the dot net server still fails.
So native client -> dotnet server seems to be most incompatible and no know hack or workaround here.
TODO: compression. use headers? (Metadata). Compress if over 1000 bytes? (at least good for data over web sockets). Deflate
But grpc has native compression too? Is it enabled by default? Find out...