X master, storage: Speak both NEO and HTTP protocol on the same port
We can detect which protocol a client speaks by analyzing the first few bytes it sends. Then we can use HTTP for administrative & debugging tasks. In particular HTTP right now allows to collect profiles and traces: https://golang.org/pkg/net/http/pprof/ and requests tracing for places where it is used: https://godoc.org/golang.org/x/net/trace Even though it is a pity that such wrapping retains artifact that the connection actually used is a wrapper connection over accepted one, the performance impact is negligable: name old time/object new time/object delta deco/neo/go/fs1(!sha1)/zhash.go 31.6µs ± 2% 31.6µs ± 2% ~ (p=0.897 n=28+29)
Showing
go/neo/cmd/neo/misc.go
0 → 100644
Please register or sign in to comment