Skip to content

Releases: taoensso/sente

v1.4.1 - 2015 Mar 11

11 Mar 09:04
Compare
Choose a tag to compare

Trivial, non-breaking release that adds a pair of optional web-adapter aliases to help make examples a little simpler.

[com.taoensso/sente "1.4.1"]

v1.4.0 - 2015 Mar 9

01 Mar 14:33
Compare
Choose a tag to compare

This is a major BREAKING release. Biggest change is added support for web servers besides http-kit (only Immutant for now). A big thanks to @tobias for his assistance with the Immutant support.

  • BREAK: added support for web servers besides http-kit (see migration instructions) [@tobias #2]
  • BREAK: removed support for nil user-id broadcasts (previously deprecated in v1.3.0) [#85] [1]
  • Fix: temporary workaround for core.async router error-catching issues [@shaharz #97]
  • New: throw clear compile-time exception on encore dependency issues
  • New: enable clients to distinguish between auto/manual reconnects [@sritchie #105] [2]
  • New: allow arbitrary user-provided handshake data with :chsk/handshake events [@whodidthis #110 #111] [3]
  • Ref example: some clarifications re: how to authenticate users

Notes

[1]: Server-side (chsk-send! <user-id> <event>) calls used to broadcast to all nil-uid users when <user-id> was nil. Now you must use the special :sente/all-users-without-uid keyword for these cases. The new behaviour helps prevent unintentional broadcasting.

[2]: :chsk/state event data now contains :requested-reconnect? val.

[3]: Server-side make-channel-socket! fn now takes an optional :handshake-data-fn (fn [ring-req]) opt and client-side's ch-recv now receives [:chsk/handshake [<?uid> <?csrf-token> <?handshake-data>]] events.

MIGRATION INSTRUCTIONS (from any version < v1.4.0)

  1. Http-kit is no longer an automatic Sente dependency. To continue using http-kit, add [http-kit "2.1.19"] to your project.clj :dependencies.
  2. Your Clojure-side make-channel-socket! call must now take a web server adapter as first argument. To continue using http-kit, add [taoensso.sente.server-adapters.http-kit] to your Clojure-side ns form's :require entries and pass taoensso.sente.server-adapters.http-kit/http-kit-adapter as the first arg to make-channel-socket!.

So:

[http-kit "2.1.19"] ; <--- Add to project.clj :dependencies

(ns my-clj-ns
  (:require
    ;; Other stuff
    [taoensso.sente.server-adapters.http-kit] ; <--- Add this entry
    ))

;; (sente/make-channel-socket! <opts-map>) ; Old Clojure-side chsk constructor
(sente/make-channel-socket!
  taoensso.sente.server-adapters.http-kit/http-kit-adapter ; <--- Add this arg
  <opts-map) ; NEW Clojure-side chsk constructor

This change is a once-off nuisance that'll allow us the freedom of supporting a wide range of web servers in the future. Interested in a web server besides http-kit or Immutant? Am now welcoming PRs to support additional web servers.

Finally, please see the updated reference example project for instructions on switching to an alternative web server like Immutant.

/ Peter Taoussanis

[com.taoensso/sente "1.4.0"]

v1.3.0 / 2015 Jan 17

11 Dec 11:55
Compare
Choose a tag to compare

This is a non-breaking maintenance release focused on general housekeeping + on adding some user-id flexibility.

  • DEPRECATED [#85]: Server->user broadcasts should now use :sente/all-users-without-uid instead of nil uid when intending to broadcast to users without a user id. The new behaviour is less accident prone.
  • CHANGE [#84, #95]: Improve error reporting in the case of missing Ring middleware.
  • FIX [#94]: ClojureScript dependency is now :provided to keep it from being unnecessarily pulled into JARs, etc (@zentrope).
  • NEW [#82]: Server-side :user-id-fn's Ring request now includes a :client-id arg provided by clients.
  • Various doc+example improvements.
[com.taoensso/sente "1.3.0"]

v1.2.0 / 2014 Oct 6

06 Oct 07:30
Compare
Choose a tag to compare

This is a maintenance update that is non-breaking UNLESS:

  1. You are not using the default server-side chsk router.
  2. You are relying on (?reply-fn <args>) to log a warning rather than throw an NPE for nil ?reply-fns.
  • FIX: Broken chsk router shutdown due to http://goo.gl/be8CGP.
  • BREAKING [#77]: No longer substitute a dummy (logging) ?reply-fn for non-callback events.
[com.taoensso/sente "1.2.0"]

v1.1.0 / 2014 Sep 7

07 Sep 16:08
Compare
Choose a tag to compare
  • FIX: taoensso/timbre#79 (unnecessary deps being pulled in).
  • NEW: Added client-side ajax-call utility.
  • NEW: Added keys to event-msgs: :id (event-id), :?data (event-?data).
[com.taoensso/sente "1.1.0"]

v1.0.0 / 2014 Sep 2

02 Sep 13:49
Compare
Choose a tag to compare

This is a MAJOR release with a bunch of improvements, most notably efficiency improvements. It is BREAKING if-and-only-if you read from the client-side :ch-recv channel directly.

  • NEW: Added chsk-destroy! client-side API fn.
  • NEW [#60]: Several transfer format efficiency improvements (faster, less bandwidth use).
  • NEW [#12], [#59], [#66], [#67]: Added :packer option to client+server-side make-channel-socket! fns. This can be used to plug in an arbitrary de/serialization format. The default continues to be edn (which gives the best common-case performance and doesn't require any extra dependencies). An experimental Transit-based packer is included which allows manual + smart (automatic) per-payload format selection. See the updated reference example for details. Big thanks to @ckarlsen for getting the work started on this!
  • DEPRECATED: start-chsk-router-loop!->start-chsk-router! (both client + server-side). There's a new event-handler format that's consistent between the client + server, and that makes componentizing Sente considerably easier. See the updated reference example for details. Big thanks to @hugoduncan for his work & input on this!
  • CHANGE: Client-side router now traps+logs errors like the server-side router.
  • CHANGE: General code improvements/refactoring, stuff I'd been meaning to do forever and wanted to get in before a v1 release.
  • CHANGE: Further improvements to the reference example to make it play better with LightTable.
  • BREAKING: the client-side :ch-recv channel now receives event-msg (maps) rather than event (vectors). (:event <event-msg>) will return the event-msg's event.
[com.taoensso/sente "1.0.0"]

v0.15.1 / 2014 July 21

21 Jul 06:07
Compare
Choose a tag to compare

v0.15.1 / 2014 July 21

Hotfix focused on adjusting default options for Heroku users.

[com.taoensso/sente "0.15.1"]

v0.15.0 / 2014 July 11

12 Jul 06:12
Compare
Choose a tag to compare

Minor, non-breaking update.

  • CHANGE: Support for new (namespaced) Ring Anti-Forgery session key (@domkm).
  • CHANGE: [chsk/uidport-close] event now triggers only 5 seconds after a WebSocket channel is closed (same as Ajax channels). Helps prevent unnecessary noise during window refresh, etc.
  • NEW [#50]: Added a :chsk-url-fn option to client-side make-channel-socket! fn for full URL control.
[com.taoensso/sente "0.15.0"]

v0.14.1 / 2014 May 18

18 May 08:34
Compare
Choose a tag to compare

Minor, non-breaking update.

  • FIX: Handshakes were interfering with singleton WebSocket callback replies.
[com.taoensso/sente "0.14.1"]

v0.14.0 / 2014 May 16

16 May 08:25
Compare
Choose a tag to compare

Minor, non-breaking update.

  • FIX: WebSocket reconnect exponential backoff wasn't being reset correctly.
  • [#39] FIX: Race condition affecting buffered server>user events (@smichal).
  • NEW: [chsk/uidport-open], [chsk/uidport-close] server-side events generated on a uid connecting/disconnecting (any protocol). As before, you can watch the connected-uids atom for more detailed info.
[com.taoensso/sente "0.14.0"]