HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

How to replace the WsMsgBroker by some other broker? #67

Closed skorsky closed 9 years ago

skorsky commented 9 years ago

This is related to https://github.com/HEADS-project/training/tree/master/2.Kevoree_Basics/6.Contrib/SAG and #53. What are the technical requirements for a broker / message bus to replace WsMsgBroker? What protocols are used by WsMsgBroker?

Looks like WsMsgBroker is sending the same message several times on one channel.

maxleiko commented 9 years ago

There is no requirements to replace WsMsgBroker, you are free to use anything you want.
WsMsgBroker is just a WebSocket server/broker that I have made because I could not find anything else using only WebSockets and providing a "basic but handy" protocol. But it is clearly not perfect.

You can find some documentation about its protocol there

maxleiko commented 9 years ago

@skorsky can you close this is the answer suits you?

skorsky commented 9 years ago

@maxleiko - I'm just working on this.

skorsky commented 9 years ago

I connected the JavaNode with our messaging product, which supports WebSockets, but the communication breaks. With a monitor I got this on the wire. No clue what the binary stuff is.

@maxleiko any idea?

==== Request ==== GET / HTTP/1.1 Origin: localhost Sec-WebSocket-Key: hSNm+p1zAtMfKDiom7Y0gw== Connection: upgrade Sec-WebSocket-Version: 13 Upgrade: websocket Host: 127.0.0.1:9050

?ÖПpº«½Ù¤öÔò¥Rȵøɤú˜ü½Þò¥R•¾ðߣÄÕ´ú@çÿü× ðß¾ëá½æ3Õ½ï-•¢úϹíÞ‹ðÎ?êϵÂ/Ù¸þŠò∀8Žþ< ==== Response ==== HTTP/1.1 101 Switching Protocols Upgrade: WebSocket Connection: Upgrade Sec-WebSocket-Accept: e27ORht+IeUvXHh6GbnSVnHkUBA=

?[{"d":[3,""]}]

maxleiko commented 9 years ago

No idea. It's pretty weird.

skorsky commented 9 years ago

OK, I'll leave this as is for now.