cloudevents / sdk-rust

Rust library to interact with CloudEvents
Apache License 2.0
174 stars 61 forks source link

Implement WebSockets protocol binding #84

Open slinkydeveloper opened 4 years ago

slinkydeveloper commented 4 years ago

I would love to look at implementing https://github.com/cloudevents/spec/blob/master/websockets-protocol-binding.md for one of our integrations (maybe actix?)

nguyenquannnn commented 4 years ago

Hey I would love to take a dig at this issue for Hactoberfest!

slinkydeveloper commented 4 years ago

Go ahead! I think we want to use actix-web for the protocol binding https://actix.rs/docs/websockets/, so you can just modify the cloudevents-sdk-actix-web crate adding the new stuff in there.

A first step is to implement the message serializer/deserializer for the websockets data structures. Then, we need to figure out the apis (we can do that in 2 PRs)

nguyenquannnn commented 4 years ago

Hey @slinkydeveloper, currently WIP, taking time since this domain is new to me :D But I want to ask, from the spec of websocket, are we supporting the binary frame streaming (avro event format)?

slinkydeveloper commented 4 years ago

@nguyenquannnn I think, for now, just the text format is fine, since this sdk just supports json conversion

No9 commented 3 years ago

Added a reference web socket implementation to the tide example https://github.com/cloudevents/sdk-rust/pull/117/commits/a71f6613a1cf6007ca41e98d98d372859a91ae76 From what I can see in the spec the only requirement is to implement the upgrade headers but it would be great to get some feedback if someone thinks it can be improved.