-
Notifications
You must be signed in to change notification settings - Fork 5
Action Entity send_stream_msg don't send all the chunks #112
Comments
@sleipnir this might be the reason for what is observed here in this issue https://github.com/eigr-labs/akkaserverless-protocol/blob/main/cloudstateio-protocol/cloudstate-protocols-0.6.0/protocol/cloudstate/action.proto
|
@sleipnir I think I misunderstood this issue, while the proxy does not sent the first message, I found that from the user functions perspective, in detail, in perspective of its runtime support, the proxy has to send first a command without any payload at all. I though you describe this issue as an issue of the SDK implementation, which seems not to be. |
Hi @marcellanz, I think we have two things here. Firstly, an implementation misconception that causes a message sent by the user to not have a complete response and second, and what led to the first mistake, a serious protocol design flaw (in my opinion), I don't know why this separation of first and other messages is necessary, especially regarding stateless functions such as Actions. |
there is more
https://github.com/eigr/functions-go-sdk/blob/main/cloudstate/action/server.go#L110-L131 |
Yes, I had read that. Overall, it is unnecessary complexity and so far only justified by sending Metadata in the first message. |
We can change that. |
@sleipnir why does the current protocol and its description not make sense? Or why did it even made sense in the beginning? Current AS still follows this protocol: |
My question is that first if the user sends ten messages the user function should probably respond with ten messages, this is a point where the Cloudstate description is confusing by not making it clear that this is its intention, that is, the protocol should say that an empty message body containing only the metadata should be added to the beginning of the stream, being the first message that the user function would have to deal with. Second information like service_name and command_name for me are crucial in all sends and not just in the first message, making this a must makes the design of messages and sdks considerably simpler (at least in the sdks I had to implement). It seems to me that certain things in Cloudstate and Akkaserveless are the way they are because they better match the Akka/Scala way of doing things and not because they make general architectural sense. |
I fully agree with the point made by @sleipnir. Cloudstate and Akkaserveless are making thing that fits theirs Akka/Scala and not because they make general architectural sense. We should be able to remove things if they do not make sense. But also we should strive for a general architectural which makes sense |
Describe the bug
When making a request via stream, the first payload sent in the stream is not sent to the user function.
Example:
The logs resulting from this request is:
As you can see from the payload: nil the first message goes with the payload attribute empty, and that's why in the reacquisition return only three messages are returned instead of four:
To Reproduce
Steps to reproduce the behavior:
docker run -it --rm -p 8090:8080 gcr.io/eigr-io/eigr-go-tck-action
MIX_ENV=prod USER_FUNCTION_PORT=8090 iex --name [email protected] -S mix
Expected behavior
That the response of all messages return in the console.
The text was updated successfully, but these errors were encountered: