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
Make channel socket available in event-msg-handler #69
Closed
hugoduncan
wants to merge
12
commits into
taoensso:master
from
hugoduncan:feature/add-start-message-router
Closed
Make channel socket available in event-msg-handler #69
hugoduncan
wants to merge
12
commits into
taoensso:master
from
hugoduncan:feature/add-start-message-router
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use `ring-defaults` middleware (danielsz)
To allow a message handler to be used without reference to a singleton channel socket instance, pass channel-socket information to the event-msg-handler function. On the server side, the :channel-socket key is added to the event map passed as the first argument, and the ch-recv argument is removed (as it is now available under the :channel-socket. On the client side, the event-msg-handler signature is changed to match the server side more closely, taking a single map argument that has :event and :channel-socket keys. The new signature is used by the new start-message-router! functions. The old signature is still used by the start-chsk-router-loop! functions.
Hi Hugo, thanks for this! Sorry for not replying at the other thread, haven't had an opportunity to look over the issue properly yet. Have been batching some Sente work which I'm hoping to (finally) get to tomorrow. Will come back to you shortly. Cheers! :-) |
ptaoussanis
added a commit
that referenced
this pull request
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.
Closing, changes merged manually in v1.0.0-SNAPSHOT. |
ptaoussanis
added a commit
that referenced
this pull request
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 pull request
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a provisional pull-request that makes the changes proposed in #68