Awesome!<br><br><div class="gmail_quote">On Mon, Dec 19, 2011 at 2:02 PM, Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@dev-extend.eu">essen@dev-extend.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Working on this:<br>
<a href="https://github.com/extend/bullet" target="_blank">https://github.com/extend/<u></u>bullet</a><br>
<br>
Needs more work on the JS side (perhaps taking from socket.io-like projects later on) and documentation, but it works pretty well and is in production already.<br>
<br>
It's a bit different as it builds something upon websocket's design, it's more of an "always connected" websocket.<div class="im"><br>
<br>
On 12/19/2011 10:57 PM, Andrew Berman wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
A bit off topic, but have you ever considered adding support for<br>
something like Socket.IO (adding a TCP handler to support their<br>
JavaScript)? I think it's going to be a while before WebSockets is<br>
going to be able to be used across the web and I think Socket.IO is a<br>
great bridge until that time comes.<br>
<br>
On Mon, Dec 19, 2011 at 1:39 PM, Loïc Hoguin <<a href="mailto:essen@dev-extend.eu" target="_blank">essen@dev-extend.eu</a><br></div><div class="im">
<mailto:<a href="mailto:essen@dev-extend.eu" target="_blank">essen@dev-extend.eu</a>>> wrote:<br>
<br>
You can check out my implementation here for Cowboy:<br></div>
<a href="https://github.com/extend/__cowboy/blob/master/src/cowboy___http_rest.erl" target="_blank">https://github.com/extend/__<u></u>cowboy/blob/master/src/cowboy_<u></u>__http_rest.erl</a><div class="im"><br>
<<a href="https://github.com/extend/cowboy/blob/master/src/cowboy_http_rest.erl" target="_blank">https://github.com/extend/<u></u>cowboy/blob/master/src/cowboy_<u></u>http_rest.erl</a>><br>
<br>
Clean straightforward code was one of the big goals of this work. It<br>
has few differences with Webmachine, but people have been converting<br>
resources from Webmachine to Cowboy without much pain. And Cowboy<br>
already had a dispatcher so it was really just a matter of writing<br>
the decision code.<br>
<br>
Of course I'm open to any comment you may have about it, good or bad.<br>
<br>
<br>
On 12/19/2011 10:34 PM, Andrew Berman wrote:<br>
<br>
Ah, yes, I agree we would need a SimpleBridgeBinary and then go the<br>
opposite way if a web server doesn't support binary<br>
(binary_to_list). I<br>
don't think that would be too difficult to implement. The<br>
Webmachine<br>
decision core is the more difficult part but not too difficult<br>
as it<br>
has been implemented in many other languages which might make the<br>
decisioning a bit easier to follow.<br>
<br>
On Mon, Dec 19, 2011 at 1:27 PM, Loïc Hoguin<br>
<<a href="mailto:essen@dev-extend.eu" target="_blank">essen@dev-extend.eu</a> <mailto:<a href="mailto:essen@dev-extend.eu" target="_blank">essen@dev-extend.eu</a>><br></div><div><div class="h5">
<mailto:<a href="mailto:essen@dev-extend.eu" target="_blank">essen@dev-extend.eu</a> <mailto:<a href="mailto:essen@dev-extend.eu" target="_blank">essen@dev-extend.eu</a>>>> wrote:<br>
<br>
SimpleBridge is nice, but it doesn't solve the OP's issue,<br>
which is<br>
that all the lists are being converted to binary when<br>
encoding into<br>
JSON, so he wants a binary webmachine to avoid converting<br>
from lists<br>
to binary all the time. I believe the implementation added<br>
to Cowboy<br>
recently does what the OP needs. On the other hand it's<br>
definitely<br>
tied to Cowboy and that should be taken into consideration when<br>
deciding what to use. It's also still considered experimental,<br>
although I've had good reports so far.<br>
<br>
Now if there was a SimpleBinaryBridge project it could be more<br>
suitable for his purpose, but afaik only Cowboy is full<br>
binary so<br>
far (only accepting (io)lists as output data). And of course<br>
adding<br>
Cowboy to SimpleBridge would just be a binary_to_list fest<br>
and would<br>
remove half the advantages of using that server so it's a<br>
bit of a<br>
dead end there.<br>
<br>
<br>
On 12/19/2011 10:16 PM, Andrew Berman wrote:<br>
<br>
There was talk on one of the mailing lists about using<br>
something<br>
like<br>
SimpleBridge<br></div></div>
(<a href="https://github.com/nitrogen/____simple_bridge" target="_blank">https://github.com/nitrogen/_<u></u>___simple_bridge</a><br>
<<a href="https://github.com/nitrogen/__simple_bridge" target="_blank">https://github.com/nitrogen/_<u></u>_simple_bridge</a>><div><div class="h5"><br>
<<a href="https://github.com/nitrogen/__simple_bridge" target="_blank">https://github.com/nitrogen/_<u></u>_simple_bridge</a><br>
<<a href="https://github.com/nitrogen/simple_bridge" target="_blank">https://github.com/nitrogen/<u></u>simple_bridge</a>>>) so that the use<br>
<br>
of a web server could be independent of Webmachine's logic,<br>
which IMO is<br>
the best solution. I don't think anyone did anything<br>
about it,<br>
but for<br>
some reason, SimpleBridge has Webmachine support, which<br>
doesn't make<br>
sense logically to me since Webmachine is a toolkit and<br>
not a<br>
web server.<br>
<br>
I use Webmachine and love what it does for me, but the code<br>
seems overly<br>
complicated with a heavy reliance on Mochiweb and uses<br>
parameterized<br>
modules (an unsupported feature of Erlang), so I would<br>
actually<br>
be more<br>
inclined to start a new project which is influenced by<br>
Webmachine but<br>
corrects all the issues with it and makes it a bit more<br>
flexible and<br>
modern (would love for Webmachine to support PATCH for<br>
example and<br>
something like Socket.IO). I'd be happy to help out<br>
with such a<br>
project<br>
if anyone is interested in starting one.<br>
<br>
--Andrew<br>
<br>
On Mon, Dec 19, 2011 at 12:24 PM, Tristan Sloughter<br>
<<a href="mailto:tristan.sloughter@gmail.com" target="_blank">tristan.sloughter@gmail.com</a> <mailto:<a href="mailto:tristan.sloughter@gmail.com" target="_blank">tristan.sloughter@<u></u>gmail.com</a>><br>
<mailto:<a href="mailto:tristan.sloughter@" target="_blank">tristan.sloughter@</a>__<a href="http://gmail.com" target="_blank">gm<u></u>ail.com</a><br>
<mailto:<a href="mailto:tristan.sloughter@gmail.com" target="_blank">tristan.sloughter@<u></u>gmail.com</a>>><br></div></div>
<mailto:<a href="mailto:tristan.sloughter@" target="_blank">tristan.sloughter@</a><br>
<mailto:<a href="mailto:tristan.sloughter@" target="_blank">tristan.sloughter@</a>>__<a href="http://gm__ail.com" target="_blank">g<u></u>m__ail.com</a> <<a href="http://gmail.com" target="_blank">http://gmail.com</a>><div class="im">
<br>
<br>
<mailto:<a href="mailto:tristan.sloughter@" target="_blank">tristan.sloughter@</a>__<a href="http://gmail.com" target="_blank">gm<u></u>ail.com</a><br>
<mailto:<a href="mailto:tristan.sloughter@gmail.com" target="_blank">tristan.sloughter@<u></u>gmail.com</a>>>>> wrote:<br>
<br>
Interesting. Sucks that webmachine is so tied to<br>
mochi and<br>
mochi so<br>
tied to lists, haha. But I'll give this a look.<br>
<br>
Tristan<br>
<br>
<br>
On Mon, Dec 19, 2011 at 1:50 PM, Magnus Klaar<br>
<<a href="mailto:magnus.klaar@gmail.com" target="_blank">magnus.klaar@gmail.com</a> <mailto:<a href="mailto:magnus.klaar@gmail.com" target="_blank">magnus.klaar@gmail.com</a><u></u>><br>
<mailto:<a href="mailto:magnus.klaar@gmail.com" target="_blank">magnus.klaar@gmail.com</a> <mailto:<a href="mailto:magnus.klaar@gmail.com" target="_blank">magnus.klaar@gmail.com</a><u></u>>__><br>
<mailto:<a href="mailto:magnus.klaar@gmail.com" target="_blank">magnus.klaar@gmail.com</a> <mailto:<a href="mailto:magnus.klaar@gmail.com" target="_blank">magnus.klaar@gmail.com</a><u></u>><br>
<br>
<mailto:<a href="mailto:magnus.klaar@gmail.com" target="_blank">magnus.klaar@gmail.com</a><br></div><div class="im">
<mailto:<a href="mailto:magnus.klaar@gmail.com" target="_blank">magnus.klaar@gmail.com</a><u></u>>__>__>> wrote:<br>
<br>
Hi!<br>
<br>
Cowboy currently includes an experimental<br>
webmachine-like<br>
interface. The first commit of this module should<br>
explain some<br>
of the key differences from webmachine. If i<br>
remember the<br>
history of this module the intial estimate for<br>
the time<br>
needed<br>
to decouple webmachine from mochiweb _and_ refactor<br>
webmachine<br>
to support both binaries and lists everywhere was<br>
greater than<br>
the time needed to just add the difference<br>
between the<br>
two to<br>
cowboy.<br>
<br></div>
<a href="https://github.com/extend/____cowboy/commit/____aab1587a4b3d8f0c3d92a208322752____7d51109980" target="_blank">https://github.com/extend/____<u></u>cowboy/commit/____<u></u>aab1587a4b3d8f0c3d92a208322752<u></u>____7d51109980</a><br>
<<a href="https://github.com/extend/__cowboy/commit/__aab1587a4b3d8f0c3d92a208322752__7d51109980" target="_blank">https://github.com/extend/__<u></u>cowboy/commit/__<u></u>aab1587a4b3d8f0c3d92a208322752<u></u>__7d51109980</a>><div class="im">
<br>
<br>
<<a href="https://github.com/extend/__cowboy/commit/__aab1587a4b3d8f0c3d92a208322752__7d51109980" target="_blank">https://github.com/extend/__<u></u>cowboy/commit/__<u></u>aab1587a4b3d8f0c3d92a208322752<u></u>__7d51109980</a><br>
<<a href="https://github.com/extend/cowboy/commit/aab1587a4b3d8f0c3d92a2083227527d51109980" target="_blank">https://github.com/extend/<u></u>cowboy/commit/<u></u>aab1587a4b3d8f0c3d92a208322752<u></u>7d51109980</a>>><br>
<br>
If you're interested in a<br>
<br>
MVH Magnus<br>
<br>
On Mon, Dec 19, 2011 at 6:40 PM, Tristan Sloughter<br>
<<a href="mailto:tristan.sloughter@gmail.com" target="_blank">tristan.sloughter@gmail.com</a><br>
<mailto:<a href="mailto:tristan.sloughter@gmail.com" target="_blank">tristan.sloughter@<u></u>gmail.com</a>><br>
<mailto:<a href="mailto:tristan.sloughter@" target="_blank">tristan.sloughter@</a>__<a href="http://gmail.com" target="_blank">gm<u></u>ail.com</a><br>
<mailto:<a href="mailto:tristan.sloughter@gmail.com" target="_blank">tristan.sloughter@<u></u>gmail.com</a>>><br></div>
<mailto:<a href="mailto:tristan.sloughter@" target="_blank">tristan.sloughter@</a><br>
<mailto:<a href="mailto:tristan.sloughter@" target="_blank">tristan.sloughter@</a>>__<a href="http://gm__ail.com" target="_blank">g<u></u>m__ail.com</a> <<a href="http://gmail.com" target="_blank">http://gmail.com</a>><div>
<div class="h5"><br>
<br>
<mailto:<a href="mailto:tristan.sloughter@" target="_blank">tristan.sloughter@</a>__<a href="http://gmail.com" target="_blank">gm<u></u>ail.com</a><br>
<mailto:<a href="mailto:tristan.sloughter@gmail.com" target="_blank">tristan.sloughter@<u></u>gmail.com</a>>>>> wrote:<br>
<br>
This may be better on a Webmachine questions<br>
list. But I<br>
thought I'd ask here first since it may be<br>
that someone<br>
working on one of the other Erlang web<br>
servers, besides<br>
Mochiweb, has worked on moving Webmachine to use<br>
that server.<br>
<br>
The reason I say that is, Webmachine<br>
currently relies on<br>
Mochiweb which passes lists instead of binary<br>
strings for<br>
requests. While the req_body of a request is<br>
given as a<br>
binary the path_info and query string is<br>
dealt with as<br>
lists. While I would think there could be a<br>
performance hit<br>
due to this my main reason to ask for<br>
alternatives<br>
is that<br>
dealing with JSON representations on the<br>
backend require<br>
converting the lists to binaries for processing<br>
every time.<br>
<br>
There has been<br></div></div>
<a href="https://github.com/mochi/____mochiweb/pull/38" target="_blank">https://github.com/mochi/____<u></u>mochiweb/pull/38</a><br>
<<a href="https://github.com/mochi/__mochiweb/pull/38" target="_blank">https://github.com/mochi/__<u></u>mochiweb/pull/38</a>><div class="im"><br>
<br>
<<a href="https://github.com/mochi/__mochiweb/pull/38" target="_blank">https://github.com/mochi/__<u></u>mochiweb/pull/38</a><br>
<<a href="https://github.com/mochi/mochiweb/pull/38" target="_blank">https://github.com/mochi/<u></u>mochiweb/pull/38</a>>> but<br>
its clear at the end of the discussion its not a<br>
change that<br>
will be happening to mochiweb anytime soon.<br>
<br>
So is there work on Webmachine backed by<br>
Cowboy or<br>
another<br>
Erlang web server?<br>
<br>
Thanks,<br>
Tristan<br>
<br>
<br></div>
______________________________<u></u>_____________________<div class="im"><br>
<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a> <mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@<u></u>erlang.org</a>><br>
<mailto:<a href="mailto:erlang-questions@" target="_blank">erlang-questions@</a>__<a href="http://erlang.org" target="_blank">erl<u></u>ang.org</a><br>
<mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@<u></u>erlang.org</a>>><br></div>
<mailto:<a href="mailto:erlang-questions@" target="_blank">erlang-questions@</a><br>
<mailto:<a href="mailto:erlang-questions@" target="_blank">erlang-questions@</a>>__<a href="http://erl__ang.org" target="_blank">er<u></u>l__ang.org</a> <<a href="http://erlang.org" target="_blank">http://erlang.org</a>><br>
<mailto:<a href="mailto:erlang-questions@" target="_blank">erlang-questions@</a>__<a href="http://erlang.org" target="_blank">erl<u></u>ang.org</a><br>
<mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@<u></u>erlang.org</a>>>><br>
<br>
<a href="http://erlang.org/mailman/____listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/____<u></u>listinfo/erlang-questions</a><br>
<<a href="http://erlang.org/mailman/__listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/__<u></u>listinfo/erlang-questions</a>><br>
<<a href="http://erlang.org/mailman/__listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/__<u></u>listinfo/erlang-questions</a><br>
<<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a>>><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_____________________<div class="im"><br>
<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a> <mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@<u></u>erlang.org</a>><br>
<mailto:<a href="mailto:erlang-questions@" target="_blank">erlang-questions@</a>__<a href="http://erlang.org" target="_blank">erl<u></u>ang.org</a><br>
<mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@<u></u>erlang.org</a>>><br></div>
<mailto:<a href="mailto:erlang-questions@" target="_blank">erlang-questions@</a><br>
<mailto:<a href="mailto:erlang-questions@" target="_blank">erlang-questions@</a>>__<a href="http://erl__ang.org" target="_blank">er<u></u>l__ang.org</a> <<a href="http://erlang.org" target="_blank">http://erlang.org</a>><br>
<mailto:<a href="mailto:erlang-questions@" target="_blank">erlang-questions@</a>__<a href="http://erlang.org" target="_blank">erl<u></u>ang.org</a><br>
<mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@<u></u>erlang.org</a>>>><br>
<br>
<a href="http://erlang.org/mailman/____listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/____<u></u>listinfo/erlang-questions</a><br>
<<a href="http://erlang.org/mailman/__listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/__<u></u>listinfo/erlang-questions</a>><br>
<<a href="http://erlang.org/mailman/__listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/__<u></u>listinfo/erlang-questions</a><br>
<<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a>>><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_____________________<div class="im"><br>
<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a> <mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@<u></u>erlang.org</a>><br>
<mailto:<a href="mailto:erlang-questions@" target="_blank">erlang-questions@</a>__<a href="http://erlang.org" target="_blank">erl<u></u>ang.org</a><br>
<mailto:<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@<u></u>erlang.org</a>>><br></div>
<a href="http://erlang.org/mailman/____listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/____<u></u>listinfo/erlang-questions</a><br>
<<a href="http://erlang.org/mailman/__listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/__<u></u>listinfo/erlang-questions</a>><div class="im"><br>
<br>
<<a href="http://erlang.org/mailman/__listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/__<u></u>listinfo/erlang-questions</a><br>
<<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a>>><br>
<br>
<br>
<br>
--<br>
Loďc Hoguin<br>
Dev:Extend<br>
<br>
<br>
<br>
<br>
--<br>
Loïc Hoguin<br>
Dev:Extend<br>
<br>
<br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
-- <br>
Loïc Hoguin<br>
Dev:Extend<br>
</div></div></blockquote></div><br>