From c807880f7ac73f813b2660ea81a00f7712a4e793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 29 Aug 2016 12:39:49 +0200 Subject: Add old mailing list archives --- .../extend/attachments/20150624/6d15706e/attachment-0001.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 archives/extend/attachments/20150624/6d15706e/attachment-0001.html (limited to 'archives/extend/attachments/20150624/6d15706e/attachment-0001.html') diff --git a/archives/extend/attachments/20150624/6d15706e/attachment-0001.html b/archives/extend/attachments/20150624/6d15706e/attachment-0001.html new file mode 100644 index 00000000..3d01eba7 --- /dev/null +++ b/archives/extend/attachments/20150624/6d15706e/attachment-0001.html @@ -0,0 +1,9 @@ + +<div dir="ltr">I think you'd have to roll your own, you just need some way to <a href="http://www.enterpriseintegrationpatterns.com/CorrelationIdentifier.html" target="_blank">correlate</a> responses with the originating request. OTP does something similar under the hood with gen_server <a href="http://www.erlang.org/doc/man/gen_server.html#call-2" target="_blank">calls</a>.<div><br></div><div>It's also possible to treat the ws connection as a messaging channel, and use something like <a href="http://www.enterpriseintegrationpatterns.com/MessageSelector.html" target="_blank">selective consumer</a> to de-multiplex the messages. e.g. you could add a type/channel field to each message, and only subscribe to those messages.</div><div><br></div><div>Remember that once you move into an async world, there are no guarantees that you will receive a response! So you need to start thinking about timeouts etc.</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 June 2015 at 10:18, Robert Balogh <span dir="ltr"><<a href="mailto:ethrbh@gmail.com" target="_blank">ethrbh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>hello,<br><br></div>According to you grate support I got from you at yesterday, I could continue my project, where I use Cowboy webserver and using Websocket. Now I made an own web page with basic features I need, so the server and client can communicates to eachother. I like it. <br><br>Now I would like to step forward, and I would like to implement a Request-Response mechanism. I read few articles in to this topic, and all of them has mentioned this "feature" is not part of the Websocket standard. They were suggested to use some sub-protocols for this, but I did not see any written in Erlang.<br><br></div>So, I would like to ask you, do I understand right that Cowboy does not have this feature too? If so, do you have some idea how can I implement a basic request-response mechanism? Probably one of you guys in this forum have some idea.<br><br></div><div>Btw, the links I read about this topic:<br>    <a href="http://stackoverflow.com/questions/10882370/websocket-request-response-subprotocol" target="_blank">http://stackoverflow.com/questions/10882370/websocket-request-response-subprotocol</a><br>    <a href="http://alabor.me/articles/request-response-oriented-websockets/" target="_blank">http://alabor.me/articles/request-response-oriented-websockets/</a><br>    <a href="https://www.npmjs.com/package/primus-responder" target="_blank">https://www.npmjs.com/package/primus-responder</a><br></div><div><br></div>thanks for your help,<br></div>/Robi<br></div>
+<br>_______________________________________________<br>
+Extend mailing list<br>
+<a href="mailto:Extend@lists.ninenines.eu">Extend@lists.ninenines.eu</a><br>
+<a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br>
+<br></blockquote></div><br></div></div>
+ +
-- cgit v1.2.3