Hello! I'm new to clojure and socket programming in particular and I kindly ask you to help me a little bit in how to design my application (all this is still overwhelming). This is a task I gave me to have something usefull while learning the clojure api:
The scenario is as follows: I have a client application that connects to a server on a port, opens a socket stream and pumps in a stream of xml data. This streams never stops, but the protocol is simple, key/value data. That's it. 1/ I want to write a server in clojure that accepts the connection from this client application, parses the xml-input stream and builds a cache with the key/values received from xml-parsing this stream. 2/ I want to start threads within my server that do some work (get notified) each time the cache has new/updated items. My naive approach is as follows: 1) use create-server to build the server that accepts the socket connection 2) use an atom as the cache that gets updated by the input stream handler/thread 3) use futures to start my working threads But how do I notify my working threads that the cache was updated? Are there some (clojure) patterns that I can use? Also some boilerplate or examples would help me a lot to get started! :-) Thanks! - Finn (finbeu) -- 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