-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GRPC API Review Changes #275
Conversation
@tegefaulkes please copy the tasks from the #249 into this and flesh them out as well. |
OK, so the way we can include the |
With the const anyMessage = new Any();
const echoMessage = new messages.common.EchoMessage();
anyMessage.pack(echoMessage.serializeBinary(), 'common.EchoMessage');
const test2 = anyMessage.unpack(
messages.common.EchoMessage.deserializeBinary,
'common.EchoMessage',
);
console.log(test2); // Is a EchoMessage
const test3 = anyMessage.unpack(
messages.common.StatusMessage.deserializeBinary,
'common.StatusMessage',
);
console.log(test3); // Is null The only use for this that comes to mind is a wrapper message for the NAT relay. |
const timeStampMessage = new Timestamp();
timeStampMessage.fromDate(new Date());
console.log(timeStampMessage.getNanos());
console.log(timeStampMessage.getSeconds());
console.log(timeStampMessage.toDate()); |
Our JS dates don't have nanoseconds, only up to milliseconds.
…On 10/28/21 2:00 PM, Brian Botha wrote:
|Timestamp| message is pretty simple. we can use it to send date info
without converting to nanoseconds first.
const timeStampMessage = new Timestamp();
timeStampMessage.fromDate(new Date());
console.log(timeStampMessage.getNanos());
console.log(timeStampMessage.getSeconds());
console.log(timeStampMessage.toDate());
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#275 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE4OHLCBSWGB7EMZ33ZRV3UJC4DTANCNFSM5GZD7JKA>.
|
The const testObject = {
1: 1,
"two": 2,
"three": "Three",
}
const structMessage = Struct.fromJavaScript(testObject);
console.log(structMessage.toJavaScript());
// { '1': 1, three: 'Three', two: 2 } |
for the service versioning I need to..
I occurs to me that we only really need to version the Agent service. The client is bundled with the agent so the service the use to communicate should match. However different versions of nodes should be able to communicate with each other. |
I think a single service version is enough for both client and agent. Both client and service should be using the same version integer.
On 29 October 2021 10:36:06 am AEDT, Brian Botha ***@***.***> wrote:
for the service versioning I need to..
1. create a new version for a service in the protobuf definitions.
2. run both services at the same time.
3. test communicating with a V1 service.
4. test communicating with a v2 service.
5. test communicating with a "removed" service.
I occurs to me that we only really need to version the Agent service. The client is bundled with the agent so the service the use to communicate should match. However different versions of nodes should be able to communicate with each other.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#275 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
No the version number is only incremented on breaking changes. Meaning most of the time we will ensure backwards compatibility. This means when the version mismatch it means there is no possible communication.
On 29 October 2021 10:36:06 am AEDT, Brian Botha ***@***.***> wrote:
for the service versioning I need to..
1. create a new version for a service in the protobuf definitions.
2. run both services at the same time.
3. test communicating with a V1 service.
4. test communicating with a v2 service.
5. test communicating with a "removed" service.
I occurs to me that we only really need to version the Agent service. The client is bundled with the agent so the service the use to communicate should match. However different versions of nodes should be able to communicate with each other.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#275 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Updated all usages of clientPB protoDefinitions updates stage 1, Divided messages into their own domain protofiles and imported them where needed. Only updated client.proto so far.
e380ae6
to
ba5dc9c
Compare
Re-based on master. |
@tegefaulkes before we forget what this PR was doing, I'm guessing the changes here were all prototyping and can be squashed into one to rebase? |
I think the only changes this has was prototyping using the google protobuf messages and versioning. AFAIK those changes already exist in the master branch. It can be squashed and re-based. Keep in mind there are a lot of conflicts with importing messages. |
Going to close this for now, as the aim of #249 has changed to focus on replacing GRPC itself with something more generic. Plus this code is wildly outdated now. |
Description
This PR is for changes relating to the API review discussion.
Issues Fixed
Fixes #249
Tasks
Client.proto
andAgent.proto
with version names and test out multiple-version services, and find out what the client does when the version wanted is not availableMAX_CONCURRENT_CONNECTIONS
is used1.4.1
version has some incompatibility:TypeError: http2Server.on is not a function
.Final checklist