Skip to content

Added faas gRPC interface definition#48

Open
amolfnal wants to merge 9 commits intomainfrom
faas
Open

Added faas gRPC interface definition#48
amolfnal wants to merge 9 commits intomainfrom
faas

Conversation

@amolfnal
Copy link

gRPC for fission

string message = 2;
int32 exit_code = 3;
string details = 4;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need comments here. All these fields look like a bunch of redundant information.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will add more comments to explain

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is marked as "resolved" but I don't see comments...

@amolfnal amolfnal requested a review from rneswold November 19, 2025 14:48
Copy link
Contributor

@rneswold rneswold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of commenting-out code and committing it. The git history will tell you what was changed.

Are those commented-out fields going to be re-introduced at a later time? If not, just delete them. We don't have a production-ready FaaS system, so I'd renumber the fields, if you delete the commented ones.

rpc UpdateMessageQueueTrigger(UpdateMQTriggerRequest) returns (GenericResponse);
rpc DeleteMessageQueueTrigger(DeleteMQTriggerRequest) returns (GenericResponse);

// Lust of functions and triggers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"List" of functions. 🤣

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added this features to let user know how many functions and trigger are there

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was giggling at your code comment "Lust of functions". 😄

@amolfnal
Copy link
Author

I will remove the commented part.

Copy link
Contributor

@beauremus beauremus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but needs polishing. If you like my suggestions, then I'm ready to approve.

string message = 2;
int32 exit_code = 3;
string details = 4;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is marked as "resolved" but I don't see comments...


package services.faas;

// high-level RPC to manage Fission resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear what this comment pertains to. Either remove it or move it closer to the relevant code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AH! If it's a summary of this entire definition, then maybe say more about the approach.


// By default all functions will have HTTP trigger
// HTTP trigger operation to expose function via Fission router
//rpc CreateHTTPTrigger(CreateHTTPTriggerRequest) returns (GenericResponse);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear why these three rpc calls exist when we have the ones below. If the latter rpcs replace these, then remove these. No commented code.

}

// CreateHTTPTrigger
//message CreateHTTPTriggerRequest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't used, remove it. No commented code.

//}

// DeleteHTTPTrigger
//message DeleteHTTPTriggerRequest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't used, remove it. No commented code.

}

// UpdateFunction
message UpdateFunctionRequest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is identical to CreateFunctionRequest. This is fragile because if one changes, you'd expect the other to change, and a future developer may not recognize that. I recommend merging these into UpsertFunctionRequest and reusing this where appropriate.

//rpc UpdateHTTPTrigger(UpdateHTTPTriggerRequest) returns (GenericResponse);
//rpc DeleteHTTPTrigger(DeleteHTTPTriggerRequest) returns (GenericResponse);

// Create timer trigger (cron-like spec)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What motivates these separate Trigggerrpcs? It's intuitive to me that these structures should be part of the Upsert. What do you think? I think this, along with my other recommendations, could really simplify this protocol.

string error_mq = 5;
string maxtries = 6;
string cooldowntime = 7;
string poolingtime = 8;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like these fields could be integers (6, 7, and 8.)

string error_mq = 5;
string maxtries = 6;
string cooldowntime = 7;
string poolingtime = 8;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fields 6, 7, and 8 should be integers, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants