I'm sure Plugh probably does similar things, but my "learning clojure app" has my own custom RPC mechanism over websockets that I wrote (because it was fun) that is all based around core.async and uses edn to transfer data back and forth.
https://github.com/markmandel/chaperone Server Side: https://github.com/markmandel/chaperone/blob/master/src/chaperone/web/websocket.clj https://github.com/markmandel/chaperone/blob/master/src/chaperone/web/rpc.clj Client Side: https://github.com/markmandel/chaperone/blob/master/src-cljs/chaperone/websocket.cljs Hope that helps. The project isn't hugely far along, but the RPC mechanism works. Mark On Thu, Jan 23, 2014 at 6:55 PM, Sean Corfield <s...@corfield.org> wrote: > Ah, what good timing! > > David Pollak's project Plugh does this, essentially as an implementation > detail. I spent some time with him today discussing this, as I want to use > exactly this functionality in a project I'm building. > > The plan is for me to create a standalone project, based on the kernel of > David's code, and enhance it to address a number of issues that he > identified as needing work before the project could be used in production > code, and then - hopefully - people will use it and provide additional > integrations (such as core.async over a message hub to provide > server-to-server operation, or core.async between browser client and server > using more transmission methods than just web sockets). > > David's code addresses naming using a registry of channels, identified by > GUIDs, on both sides. The web socket reconnection issue is one of the > specific enhancements he identified that I plan to figure out and address. > There are several others (including actually "GC'ing" closed channels on > the other side of the address space divide). > > Sean > > On Jan 22, 2014, at 11:39 PM, t x <txrev...@gmail.com> wrote: > > Hi, > > I apologize for my vague question. > > Does anyone have a good example / blog / library for using the > core.async abstraction across a websocket. > > * one side of the channel is in clojure land > * other side of the channel is in cljs land > > * I promise that all messages can be encoded via pr-str and read via > clojure.edn/read-string > > What I'm struggling with are matters of: > > * how to ensure data is not lost even when websocket disconects / > reconnects > > * "naming" on client/server side to ensure messages go to right channels > on both sides > > * issues I haven't even begun to imagine. > > Good news: > > * I control both sides: both the clj and cljs side, so any workable > design is fine. > > Thanks! > > -- > -- > 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/groups/opt_out. > > > Sean Corfield -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "Perfection is the enemy of the good." > -- Gustave Flaubert, French realist novelist (1821-1880) > > > > -- E: mark.man...@gmail.com T: http://www.twitter.com/neurotic W: www.compoundtheory.com 2 Devs from Down Under Podcast http://www.2ddu.com/ -- -- 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/groups/opt_out.