Websocket and execute docker container #790
Replies: 3 comments
-
Hi! You can use a callback state after executing the action in the docker container. Your WebSocket should then emit a CloudEvent to resume the execution of the workflow. |
Beta Was this translation helpful? Give feedback.
-
Hi @wagnerdracha ! To begin with a side note, I would personnaly recommend not using WebSocket when in a non (browser based) front-end context: there are much better, faster, secure and stable ways to achieve RTC when freed of the constraints of a browser. On another note, as @ricardozanini mentioned, SW relies on CloudEvents for eventing, and that's what your SW runtime should consume too, ideally over HTTP using the structured (JSON) mode. Said runtime should therefore "transform" messages ingested over WebSocket to CloudEvents, consumed by your workflow. You can do so using the (soon obsolete IMO) callback state, or use an event action. Regarding the latter, the |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion as it applies to a discontinued version of the spec. On a side note, the spec now allows running containers, in case this helps you, @wagnerdracha! |
Beta Was this translation helpful? Give feedback.
-
Hello everyone
I am new here, so first of all, this is amazing project! Thanks for sharing it!
So, I like to know if specification can execute some action (the action is execute some docker container) and return the result that will be printed through the a websocket.
Imagine that specification can execute a docker container, and this container will print some results and this takes a long time antil complitelly finish.
So, I want to know if could I return this new prints with the result through the a websocket to a callback? And if can I run a docker container by Windows command line through specification?
Thanks in advanced!
Beta Was this translation helpful? Give feedback.
All reactions