Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional support for JSON instead of edn #12

Closed
ptaoussanis opened this issue Mar 12, 2014 · 2 comments
Closed

Add optional support for JSON instead of edn #12

ptaoussanis opened this issue Mar 12, 2014 · 2 comments

Comments

@ptaoussanis
Copy link
Member

Edn can occasionally be too slow for some applications. In other cases apps may need to interface with pre-existing JSON services, etc.

Edn's a sensible default, but it'd be nice to offer optional JSON chsks.

Pull-requests welcome!

@michaelklishin
Copy link

Doh. I am replacing Sente with Chord because it now has JSON support (and it was trivial to add). This would be very helpful to people who can't go 200% hipster with ClojureScript ;)

@ptaoussanis
Copy link
Member Author

Actually closing this. Benchmarks show that this wouldn't buy us as much as I was expecting. Treating edn as an implementation format and allowing arbitrary encoding on top is actually quite feasible, and preferable for flexibility. Will update docs later.

ptaoussanis added a commit that referenced this issue Sep 1, 2014
…, [#69] (@hugoduncan), more

Completely refactored Sente's client<->server data handling for:
  * Greater consistency, simplicity, robustness.
  * Increased efficiency (smaller cb ids, leaner cb wrapping format).
  * Pluggable serialization.

The pluggable serialization brings optional support for Transit, incl.
JSON and MessagePack over Transit (thanks to @ckarlsen for getting the ball
rolling on this!).

An early, experimental FlexiPacker is provided that allows per-payload
format selection and simple heuristic-based auto format selection for highly
efficient client<->server data comms in a wide range of use cases. This will
likely become Sente's standard (if not default) package format in future.

Other changes in this squashed commit include:
  * General code review + clean-up.
  * Improved logging.
  * A new client-side `chsk-destroy!` API fn.
  * Improved client+server router support for component-style configs
    (thanks to @hugoduncan for this!): server+client side routers now
    both receive `event-msg`s, and those `event-msg`s contain more
    useful goodies.
  * Client-side router now traps+logs errors like the server-side router.
  * Improve reference example's compatibility with LightTable.
ptaoussanis added a commit that referenced this issue Sep 1, 2014
…, [#69] (@hugoduncan), more

Completely refactored Sente's client<->server data handling for:
  * Greater consistency, simplicity, robustness.
  * Increased efficiency (smaller cb ids, leaner cb wrapping format).
  * Pluggable serialization.

The pluggable serialization brings optional support for Transit, incl.
JSON and MessagePack over Transit (thanks to @ckarlsen for getting the ball
rolling on this!).

An early, experimental FlexiPacker is provided that allows per-payload
format selection and simple heuristic-based auto format selection for highly
efficient client<->server data comms in a wide range of use cases. This will
likely become Sente's standard (if not default) package format in future.

Other changes in this squashed commit include:
  * General code review + clean-up.
  * Improved logging.
  * A new client-side `chsk-destroy!` API fn.
  * Improved client+server router support for component-style configs
    (thanks to @hugoduncan for this!): server+client side routers now
    both receive `event-msg`s, and those `event-msg`s contain more
    useful goodies.
  * Client-side router now traps+logs errors like the server-side router.
  * Improve reference example's compatibility with LightTable.
ptaoussanis added a commit that referenced this issue Sep 2, 2014
…, [#69] (@hugoduncan), more

Completely refactored Sente's client<->server data handling for:
  * Greater consistency, simplicity, robustness.
  * Increased efficiency (smaller cb ids, leaner cb wrapping format).
  * Pluggable serialization.

The pluggable serialization brings optional support for Transit, incl.
JSON and MessagePack over Transit (thanks to @ckarlsen for getting the ball
rolling on this!).

An early, experimental FlexiPacker is provided that allows per-payload
format selection and simple heuristic-based auto format selection for highly
efficient client<->server data comms in a wide range of use cases. This will
likely become Sente's standard (if not default) package format in future.

Other changes in this squashed commit include:
  * General code review + clean-up.
  * Improved logging.
  * A new client-side `chsk-destroy!` API fn.
  * Improved client+server router support for component-style configs
    (thanks to @hugoduncan for this!): server+client side routers now
    both receive `event-msg`s, and those `event-msg`s contain more
    useful goodies.
  * Client-side router now traps+logs errors like the server-side router.
  * Improve reference example's compatibility with LightTable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants