Comments (4)
是的,其实你出去找了一个很核心的问题,那就是无论是客户端往服务端发送信息还是服务端网客户端发送信息都需要那个信息可以反序列化。
反序列化涉及到两个问题。第一,我们要知道反序列化的目标对象是什么类型;第二,我们要知道要确切持有那个类型。
对于第一个问题可以在参数中包含目标对象的类型。第二个问题,那就复杂了,因此在RPC中,往往会定义能够支持的目标类型的集合,例如必须是基本类型。
但是我们要注意这并不是RPC所特有的问题,而是所有远程调用都会遇到的问题。好,回想一下HTTP调用中你发送的参数类型是不是都是基本类型呢,甚至都是字符串这一种类型。
from easyrpc.
是的,其实你触及到了一个很核心的问题。。。。
from easyrpc.
另外还有一个问题是 如果在真实的rcp环境中 @RemoteService
是不是也该附加上server_ip:port
from easyrpc.
是的。
不过,在生产环境下也没有这么简单,因为目标的IP可能是变的。毕竟提供真正的服务的是一个集群,集群中的节点可能会增加或者删除。
真实环境下,一般会给出一个服务注册中心的地址,然后由代理去查询注册中心。
from easyrpc.
Related Issues (4)
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 easyrpc.