Comments (4)
实际上protobuf支持的基本数据类型,thrift基本上也都支持,但是thrift额外支持了以下的容器类型
list(java.util.ArrayList)、set(java.util.HashSet)、map(java.util.HashMap),这点是protobuf不具备的。因此相对来说thrift支持了更丰富的数据结构,更易扩展。
from face2face.
thrift生成的对象文件里内容很多看起来很乱,修改也不方便,每次都要重新生成代码。很多情况我们vo对象都是自己写的,这样查看和修改都方便,然后对象转json再存取redis,相比thrift协议byte[]转对象 性能会差很多吗?大概相差多少呢?(刚学这方面的知识,非常感谢您的耐心解答)
from face2face.
个人认为对象转为bytep[]存储,二进制数据应该会更加紧凑,相对来说存储效率会高点。但是二进制缺点就是存储的数据必须要进行序列化反序列化,可读性较差。关于二者的性能差别,我也没有特意测试过,建议你可以针对存储空间、耗时自行做一个测试
from face2face.
非常感谢^_^
from face2face.
Related Issues (20)
- 写的真好 HOT 1
- 用了java8,让我很纠结。我们的环境是java7
- Integrate with Travis CI
- add more unit test and integration test
- refactor core module
- 连接登录问题 HOT 2
- ParseRegistryMap.initRegistry();
- 运行不了 没有找到main方法 HOT 2
- 客户端的压力测试
- 启动参数问题
- 开启2个客户端后,程序都不动了 HOT 1
- 怎么配置program arguments HOT 1
- 客户端发送给gate服务器的消息,gate 没有给转发吧?
- debug跟踪,发现logic的CprivateChat消息通过auth转发到gate
- 该套架构有线上应用的 吗 生产有这套架构的吗
- Swahili
- 注释好少,建议增加些注释 HOT 1
- google的protobuf下载不了
- logic处理的消息全是auth登录过的吗? HOT 1
- 这个works 意图是什么呢 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from face2face.