Comments (5)
Can you show me what your RPC call looks like?
I am interested to see what the API is. Because when I put the interface inside another struct it works completely fine for me.
from govector.
Sure,
This is the send call
err = connection.Call("MinerApi.FloodOperation", operation, &reply)
And this is the API signature
type MinerApi int
func (m* MinerApi) FloodOperation(args Operation, reply *bool) error {
...
}
If replace Operation
with the scruct that implements the interface itself, such as AppendOperation
it works.
from govector.
You are running into the issue where gob can not encode/decode the interface.
A simple fix for this is to embed the operation inside an Args struct
type Args struct {
op Operation
}
and modify your RPC call to have the argument be args *Args instead of op Operation.
That is the best short term fix I can suggest.
I will look into a more permanent solution in the meanwhile. Although I first one to ensure that this is different than normal RPC behaviour.
from govector.
I just tested it out. Even with Go's RPC package you can not use an interface as your type for Args in your RPC API. You would get the following error :
gob: local interface type *main.Operation can only be decoded from remote interface type; received concrete type AppendOperation
from govector.
@vaastav can you add information about this to the README (under best practices or common problems)? I'm closing this issue since this is not a GoVector issue.
from govector.
Related Issues (20)
- Update broker_test.go to create a different broker with a new port for each test
- Create separate RPC servers for publishers and subscribers
- Create log entry with reconstructed vector clock if publisher disconnects
- Change FileSub to keep the file open and close at end of run
- Pass vclock data in Local and NetworkMessage rather than string
- Create separate log file for internal messages/errors
- Create log file for internal messages in the Broker
- Parameterize logging in GoVec HOT 1
- Parameterize logging code in Broker
- In pubmanager.go registerPublisher should return an error
- Create filters for the SubManager
- Import issue HOT 6
- Improve output HOT 1
- Mocking Library for Log Outputs
- Integration Testing
- Error: Logical clock values for each host must start at 1 HOT 1
- nil pointer dereference when calling PrepareToSend(..) HOT 2
- Little Code Error HOT 1
- Faulty Vector Clock Comparison 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 govector.