diff options
author | Loïc Hoguin <[email protected]> | 2016-08-29 12:39:49 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-08-29 12:40:03 +0200 |
commit | c807880f7ac73f813b2660ea81a00f7712a4e793 (patch) | |
tree | ba1d09e9b177f230665a80513b33fbd532000ce4 /archives/extend/attachments/20150624/6d15706e/attachment-0001.html | |
parent | b1df25a7d9cda697513650659b781b55b40898f8 (diff) | |
download | ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.gz ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.bz2 ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.zip |
Add old mailing list archives
Diffstat (limited to 'archives/extend/attachments/20150624/6d15706e/attachment-0001.html')
-rw-r--r-- | archives/extend/attachments/20150624/6d15706e/attachment-0001.html | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ +<tt> +<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:[email protected]" target="_blank">[email protected]</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>_______________________________________________<br><br> +Extend mailing list<br><br> +<a href="mailto:[email protected]">[email protected]</a><br><br> +<a href="https://lists.ninenines.eu/listinfo/extend" rel="noreferrer" target="_blank">https://lists.ninenines.eu/listinfo/extend</a><br><br> +<br></blockquote></div><br></div></div><br> + +</tt> |