If we exposed a global list of uids, and a list of UIDs per channel, I think we'd have enough to build up a nice set of broadcast operations. For example:
- Broadcast to this channel for users that pass this predicate - hit these multiple channels except for these users- re-broadcast this user's message to everyone in the channel except this user
So yeah, I think that exposing a list will get us pretty far. The missing piece, then, would be the ability for a a client to send a connection request for a specific channel.
Peter Taoussanis <mailto:ptaoussa...@gmail.com> April 15, 2014 10:18 AM Hey Sam! it doesn't look like the list of all connected users is available in the API. Yeah, that's right. Have been punting on this...For the moment have left it up to applications to decide who they're interested in broadcasting to. This might be everyone that's connected, everyone that's connected with certain credentials, everyone subscribed to certain topics, etc.Basically the application's expected to keep an appropriate index of event-types -> user-ids.Haven't thought much about what kind of help the core API could offer. Probably a good starting point would be a simple set of all currently connected uids. Then folks could intersect that against their own subscriptions, etc.Would that be helpful in your case? Otherwise, like I say - haven't thought much about this so ideas would be very welcome.Cheers! :-) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.comNote that posts from new members are moderated - please be patient with your first post.To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en ---You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com <mailto:clojure+unsubscr...@googlegroups.com>.For more options, visit https://groups.google.com/d/optout. Sam Ritchie <mailto:sritchi...@gmail.com> April 15, 2014 9:05 AM Hey Peter,I like the UUID feature, but it doesn't look like the list of all connected users is available in the API. How would you do a global broadcast to all connected clients using Sente? I'm having trouble figuring out how to write a chat demo using Sente.Thanks for your work! On Wednesday, February 26, 2014 6:57:24 AM UTC-7, Peter Taoussanis wrote: -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.comNote that posts from new members are moderated - please be patient with your first post.To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en ---You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com <mailto:clojure+unsubscr...@googlegroups.com>.For more options, visit https://groups.google.com/d/optout. Peter Taoussanis <mailto:ptaoussa...@gmail.com> February 26, 2014 6:57 AM Hi folks,Quick post to announce a new lib release: https://github.com/ptaoussanis/senteFrom the README:*Sente* is small client+server library that makes it easy to build *reliable, high-performance realtime web applications with Clojure*.* *Bidirectional a/sync comms*over both*WebSockets*and*Ajax*(auto-selecting).* *Robust*: auto keep-alives, buffering, mode fallback, reconnects. * ednrocks. So*send edn, get edn*: no json here. * *Tiny, simple API*:|make-channel-socket!|and you're good to go.* Automatic, sensible support for users connected with*multiple clients*and/or devices simultaneously.* *Flexible model*: use it anywhere you'd use WebSockets or Ajax. * *Fully documented, with examples*(more forthcoming).* Small:*less than 600 lines of code*for the entire client+server implementation.* *Supported servers*: currently onlyhttp-kit, but easily extended. ---Have been using something like this in production since a little after core.async came out, and wouldn't want to go back. Note that I tweaked a few things for the public release so there may be some rough edges initially.An example project's included (new as of today) and there's a Leiningen alias configured to handle all the fiddly bits like getting the Cljx and Cljs to compile: just download, `lein start-dev` at a terminal, and you're good to go.Any questions/problems/whatever, you can reach me here or on GitHub. That's it! Happy hacking, cheers! :-) - *Peter Taoussanis* https://twitter.com/ptaoussanis https://www.taoensso.com/clojure-libraries -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.comNote that posts from new members are moderated - please be patient with your first post.To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en ---You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com.For more options, visit https://groups.google.com/groups/opt_out.
-- Sam Ritchie (@sritchie) Paddleguru Co-Founder 703.863.8561 www.paddleguru.com <http://www.paddleguru.com/>Twitter <http://twitter.com/paddleguru>// Facebook <http://facebook.com/paddleguru>
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
<<inline: postbox-contact.jpg>>
<<inline: postbox-contact.jpg>>