cloudwego / dynamicgo Goto Github PK
View Code? Open in Web Editor NEWDynamically and efficiently operate RPC data for Go
License: Apache License 2.0
Dynamically and efficiently operate RPC data for Go
License: Apache License 2.0
protobuf的编解码属于属于位置不可移动类型. 如果能确定编码的时候,某几个字段在生成的字节数组,那么,对于转发或者代理之类的网关,就可以不需要解码整个消息,之需要解码前面几个字段。
生成器生成protobuf代码的时候, 固定写入字段的顺序(编码),这是可以固定的。另外一个是, 在需要代理转发的地方,根据二进制直接读取前面需要的字段. 目前,dynamicgo中有comsumefixed64这样的方法可以读取用一个字段,是否可以增加,连续读取几个字段的方法呢
Line 420 in 497e7b3
Background
Like Thrift, protobuf also needs a easy-to-use and high-performance generic-calling system in practice.
Goals
thrift/generic
API in the aspect of dynamic reflection.Alternatives
GraphGL
well enough.Desgin Advices
dynamicgo/conv
does —— converting in place and sequentially, without any intermediatorsearching
(based on skipping) and serializing/deserializing
(based on DOM). For searching
, one important thing is the speed of skipping algorithm —— I'm afraid that varint encoding
has big impact on it. For full-load serializing/deserializing
, I want to keep the same memory model with Thrift's DOM, for future conversion of these two —— in application on DSL like GraphGL
.NewDescritorXXX
in thrift/idl.go everywhere should be NewDescriptorXXX
:)
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
编译出错,
2023/10/24 22:11:24 go: downloading github.com/cloudwego/dynamicgo v0.1.3
2023/10/24 22:11:31 + export GO111MODULE=off
2023/10/24 22:11:31 + GO111MODULE=off
2023/10/24 22:11:31 + myfile=./vendor/golang.org/x/net/trace/trace.go
2023/10/24 22:11:31 + startLine=120
2023/10/24 22:11:31 + endLine=132
2023/10/24 22:11:31 + [[ linux-gnu =~ ^darwin ]]
2023/10/24 22:11:31 + '[' -f ./vendor/golang.org/x/net/trace/trace.go ']'
2023/10/24 22:11:31 + sed -i '120,132s/^////' ./vendor/golang.org/x/net/trace/trace.go
2023/10/24 22:11:31 + startLine=74
2023/10/24 22:11:31 + endLine=74
2023/10/24 22:11:31 + [[ linux-gnu =~ ^darwin ]]
2023/10/24 22:11:31 + '[' -f ./vendor/golang.org/x/net/trace/trace.go ']'
2023/10/24 22:11:31 + sed -i '74,74s/^////' ./vendor/golang.org/x/net/trace/trace.go
2023/10/24 22:11:31 + mkdir -p output
2023/10/24 22:11:31 + go build -buildmode=plugin -o ./output/stress.so main.go
2023/10/24 22:13:34 # command-line-arguments
2023/10/24 22:13:34 /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
2023/10/24 22:13:34 /usr/bin/ld: /tmp/go-link-419334024/go.o: relocation R_X86_64_PC32 against undefined symbol `github.com/cloudwego/dynamicgo/internal/native/avx2.__quote' can not be used when making a shared object; recompile with -fPIC
2023/10/24 22:13:34 /usr/bin/ld: final link failed: Bad value
2023/10/24 22:13:34 collect2: error: ld returned 1 exit status
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.