Giter Club home page Giter Club logo

Comments (8)

simonmacmullen avatar simonmacmullen commented on August 26, 2024

I dunno, ignorance? For me it doesn't show up in the first 10 pages searching for "erlang json" so it might as well not exist ;-)

Sarcasm aside, we already support eep0018 so jiffy should not be a stretch.

from sockjs-erlang.

majek avatar majek commented on August 26, 2024

(FTR: jiffy lives here https://github.com/davisp/jiffy)

Also: [...] premature optimization [...]

I think we should make SockJS stable first and than play with not-pure-erlang dependencies.

Additionally, there are high chances that JSON encoding will not be used for SockJS-protocol v0.2.

from sockjs-erlang.

simonmacmullen avatar simonmacmullen commented on August 26, 2024

(Of course we can revisit this if the new protocol still needs JSON...)

from sockjs-erlang.

majek avatar majek commented on August 26, 2024

In #9 we came back to the idea.

from sockjs-erlang.

si14 avatar si14 commented on August 26, 2024

Nice to hear.

from sockjs-erlang.

gleber avatar gleber commented on August 26, 2024

It seems that it won't be a premature optimization. Here's the output of fprof analysis over application which does broadcast data to ~3000 users 4 times (short messages around 110-120 bytes each, excluding SockJS protocol overhead):

https://gist.github.com/2781872

As you can see mochijson2 and it's utf8 handling code is the most CPU hungry one.

from sockjs-erlang.

si14 avatar si14 commented on August 26, 2024

http://si14.livejournal.com/18757.html you can also find some JSON-related benchmarks here.

from sockjs-erlang.

majek avatar majek commented on August 26, 2024

@gleber Jiffy is fine. We actually did support it in previous sockjs-erlang versions:

But, SockJS requires custom encoding of some unicode characters. Mochiweb does most of the work out of the box and to get everything working (\uFFFE and \uFFFF chars) I needed to patch it a bit.

I'm happy to have optional jiffy support if it passes all the sockjs-protocol tests regarding encoding:

from sockjs-erlang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.