inhindsight / hindsight

Apache License 2.0
12 stars 8 forks source link

Destination broadcast #206

Closed bbalser closed 4 years ago

bbalser commented 4 years ago

Broadcast is really weird, the goal was to have each source/destination be self contained. However due to the way phoenix works, the implementation of Channel.Topic destination has to know about BroadcastWeb.Endpoint. It seems simplest for service_broadcast to break encapsulation and use the fields inside the struct. This is not ideal, but any other solutions I thought of were very convoluted. Channel.Topic does have to implement the Destination protocol, hence the raising of "Not Implemented.