Comments (3)
@kumarashit @himanshuvar @pravinran @wisererik @sushanthakumar If you people have any information and comments regarding this issue please submit here
from dock.
Detailed description of issue :
Problem statement: In GRPC client server architecture, the protobuf file is shared which enables them to communicate with each other.In this case, SODA Dock and Controller are separate microservices which has their own proto files and for communication they send/recieve the common structs to gRPC for creating a handshake. The problem is even though the projects are separate, they still have to maintain a continuity in proto in assigning the field number for an attribute. For example:
Here are struct from controller and dock proto for CreateVolumeOpts:
Controller- model.proto
message CreateVolumeOpts {
// The uuid of the volume, optional when creating.
string id = 1;
// The name of the volume, required.
string name = 2;
// The requested capacity of the volume, required.
int64 size = 3;
// The description of the volume, optional.
string description = 4;
// When create volume from snapshot, this field is required.
string snapshotId = 5;
// The locality that volume belongs to, required.
string availabilityZone = 6;
// The service level that volume belongs to, required.
// TODO: This item will be replace by profile, don't use it.
string profileId = 7;
// The uuid of the pool on which volume will be created, required.
string poolId = 8;
// The name of the pool on which volume will be created, required.
string poolName = 9;
}
Dock - model.proto
message CreateVolumeOpts {
// The uuid of the volume, optional when creating.
string id = 1;
// The name of the volume, required.
string name = 2;
// The requested capacity of the volume, required.
int64 size = 3;
// The description of the volume, optional.
string description = 4;
// When create volume from snapshot, this field is required.
string snapshotId = 5;
// The locality that volume belongs to, required.
string availabilityZone = 6;
// The uuid of the pool on which volume will be created, required.
string poolId = 8;
// The name of the pool on which volume will be created, required.
string poolName = 9;
}
Here if attribute "poolID" is tagged field number 8 in controller proto, similarly we had to assign 8 in dock as well missing field number 7 in the struct. This is not a right practice to assign field number in proto as it should be sequential.
Solutions analysis:
To solve the above problems we can have a few ways:
- Either we add attribute "profileID" in dock proto as well assigning number "7", to make it sequential. But this is not sanity, because we don't actually need "profileID" in Dock project.
- We can make a shared folder in the upper level of both projects where we can have one proto file for all Dock, Controller and API which will be superset for all the projects proto file. In this solution we can use some leverages from protobuf like OneOf or omitempty, where we can make all attributes optional(by default in proto3 version or above)
- We can make an agreement between Controller and Dock proto, where only those attributes which are needed for communication between them will be part of the common struct and if any of the projects need some other attributes(private), they can make other struct which can import common struct as base model.But this is also not optimized as, there will be a lot many code changes in both the projects to adapt to this new struct, plus if in future we need to add new attribute , we again have to make other struct which inherits the base struct.
- client and server must be agreed on same unique tag number of parameters. so for ex: if client, is sending some parameters on tag number 10(lets say), then server must catch the same parameters on exactly same tag number. because of serialization and deserialization concept.
Conclusion:
We can optimize SODA Dock and SODA Controller where we can check for the client server agreement for these services. If Controller is using/wrapping the dock grpc client, this grpcs client should be capable enough to send the right information/messages to the dock grpc server.
from dock.
Won't fix
from dock.
Related Issues (20)
- FileShare access delete error
- Snapshot delete error
- Revamp Host Based Replication using new framework/API from LinBit.
- Build and test Netapp driver for replication with SODA Hotpot and Nbp(k8s) project.
- [Linstor - HBR] : Prepare Infrastructure for LinStor integration.
- [Linstor - HBR] : Analysis of Dock w.r.t HBR. HOT 1
- [Linstor - HBR ] : Installation & Config of LinStor
- [Linstor - HBR]: Linstore Driver Server / Satellite.
- [LinStor - HBR] : Uninstall and cleanup of Linsotr
- [Linsotr - HBR] : Documentation of Linstore based HBR.
- Analysis of replication driver for Netapp storage HOT 1
- Implementation of replication driver for Netapp storage
- Rename OpenSDS to SODA HOT 3
- help needed : OpenStack cinder https certificate HOT 2
- Integrate Github Actions in SODA Projects HOT 1
- Upload snapshot to s3 storage
- Ensure Dock Containers runs on K8s 1.22+
- Upgrade the project to use Go 1.17+ HOT 1
- Check for Updates for latest stable package dependencies and libraries
- Installation of Terra a failure in Ubuntu
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 dock.