[erlang-questions] Webmachine Binary Request Strings
Tue Dec 20 00:58:04 CET 2011
It's long been a tenet of mine that the underlying issue here is with
the representation of "strings" in the platform. Using a text
representation of binaries would save a considerable amount of pain
across the platform and for the applications written over it. Erlang/
OTP (IMHO) should let go of the "a string is just a list of integers"
and go for a consistent api support of text as binaries. Many words
and hours would be saved if this were to happen. It would also be easy
to shed the "erlang is crap at strings" meme that is a result of the
current decision and api approach I do not think that this criticism
is one based on the platform's true capability when text is presented
and manipulated as binaries. In fact, it can and should be viewed as a
On Dec 19, 2:24 pm, Tristan Sloughter <tristan.slough...@REDACTED>
> Interesting. Sucks that webmachine is so tied to mochi and mochi so tied to
> lists, haha. But I'll give this a look.
> On Mon, Dec 19, 2011 at 1:50 PM, Magnus Klaar <magnus.kl...@REDACTED>wrote:
> > Hi!
> > Cowboy currently includes an experimental webmachine-like interface. The
> > first commit of this module should explain some of the key differences from
> > webmachine. If i remember the history of this module the intial estimate
> > for the time needed to decouple webmachine from mochiweb _and_ refactor
> > webmachine to support both binaries and lists everywhere was greater than
> > the time needed to just add the difference between the two to cowboy.
> > If you're interested in a
> > MVH Magnus
> > On Mon, Dec 19, 2011 at 6:40 PM, Tristan Sloughter <
> > tristan.slough...@REDACTED> wrote:
> >> This may be better on a Webmachine questions list. But I thought I'd ask
> >> here first since it may be that someone working on one of the other Erlang
> >> web servers, besides Mochiweb, has worked on moving Webmachine to use that
> >> server.
> >> The reason I say that is, Webmachine currently relies on Mochiweb which
> >> passes lists instead of binary strings for requests. While the req_body of
> >> a request is given as a binary the path_info and query string is dealt with
> >> as lists. While I would think there could be a performance hit due to this
> >> my main reason to ask for alternatives is that dealing with JSON
> >> representations on the backend require converting the lists to binaries for
> >> processing every time.
> >> There has beenhttps://github.com/mochi/mochiweb/pull/38but its clear
> >> at the end of the discussion its not a change that will be happening to
> >> mochiweb anytime soon.
> >> So is there work on Webmachine backed by Cowboy or another Erlang web
> >> server?
> >> Thanks,
> >> Tristan
> >> _______________________________________________
> >> erlang-questions mailing list
> >> erlang-questi...@REDACTED
> erlang-questions mailing list
More information about the erlang-questions