-
Notifications
You must be signed in to change notification settings - Fork 32
Add example functions section to api-server
#7398
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
Add example functions section to api-server
#7398
Conversation
functions section to api-server
functions section to api-serverfunctions section to api-server
|
@wvangeit please let me know if anything in this example is unclear. I am very happy to extend it to make it more realistic or add some actual functionality if required. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7398 +/- ##
==========================================
+ Coverage 87.42% 87.44% +0.01%
==========================================
Files 1723 1721 -2
Lines 66749 66612 -137
Branches 1133 1133
==========================================
- Hits 58356 58247 -109
+ Misses 8072 8044 -28
Partials 321 321
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
GitHK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit lost. What would be te final goal of this functions?
I see no reference to that
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also not clear what this "function" api is. all this seems very hard-coded in the end... I thought this was something where you send a "function" to be executed in there... but this looks like you have to implement each function precisely instead...
services/api-server/src/simcore_service_api_server/api/routes/functions.py
Outdated
Show resolved
Hide resolved
...ages/service-library/src/servicelib/rabbitmq/rpc_interfaces/webserver/functions/functions.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/functions/_controller_rpc.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/functions/_controller_rpc.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/functions/_service.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/functions/_controller_rpc.py
Outdated
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/functions.py
Outdated
Show resolved
Hide resolved
Yes, sorry. That's on me. I did not explain well in the header what exactly the goal of this PR is. I will update it |
Yes, actually this PR just introduce some "dummy" functions so Werner can start implementing the actual api and has a pattern to follow. I have updated the header of this PR with some more info |
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok thanks for the explanation. I am still a bit unsure. but let's see.
GitHK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but I have doubts and issues with this approach. Please let's have chat about it. See my reasons below.
I am not convinced at all by these changes/pattern.
I believe that the current approach will just cause harm in the long run.
I see the following issues/uncertainties:
- I did not understand the concept of a
function - no generic interface to register, launch and get the result of a function
- a function could also be long running (long lived), the current pattern will eventually fail (example, if the webserver is restarted)
- why was the webserver chosen as the owner of these functions?
- Can you please provide a schema/diagarm of how the interaction with a
functionswill work?
pcrespov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx!
GitHK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As said on Friday, the reason for this PR being blocked is that it lacks any interface for long running execution.
I think we agreed that most, if not all the payloads would be long running. Such support would be useful.
I think it would greatly help to have such a system in place. Event if it's not perfect, we can always improve it, instead of having to change all the interfaces in the future.
Could this be added?
That's part of the prototype Werner will implement. As I mentioned, this PR is just to show how the different services are connected. |
GitHK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will not block it, but I do not agree one bit with anything in this PR.
Thanks a lot for unblocking 🙏🏻 |
|
@Mergifyio queue |
🟠 Waiting for conditions to match
|
|
@Mergifyio queue |
🟠 Waiting for conditions to match
|
|



What's the point of this PR?
As part of out metamodeling efforts we plan to develop the concept of a
functionin the api server. These functions could point to concepts we already have in the api-server (studies or solvers) or to new types of functions. This PR does nothing more than setup a few files and connect afunctionssection in the api-server with a newfunctionsdomain in the api-server so that @wvangeit can start implementing the thing. I.e. it is a skeleton to guide the development. I.e. the functions which are introduced in this PR will eventually go away as we start to merge the real functionality for thefunctions.What do these changes do?
functionssection in api-server. Expose a singlepingendpoint as an examplepingendpoint with webserver via rpc to webserver.Related issue/s
functionsapi with a single endpoint which is connected all the way to the webserver via rpc #7348How to test
Dev-ops checklist