Re: Avout: Distributed State in Clojure

2011-12-04 Thread Glen Stampoultzis
On 3 December 2011 01:44, David Edgar Liebke lie...@gmail.com wrote: Hi Glen, The init-stm step is still referenced in the documentation as being required BTW. Thanks, I'll remove the reference. I had a couple of questions. I noticed that when I create a reference (zk-ref) I

Re: Avout: Distributed State in Clojure

2011-12-04 Thread David Edgar Liebke
A related question. If I wanted to do a once-off initialization of the value (ie, the first VM to create the distributed ref will set the value) how would I go about it? I would just create the Ref without an initial value, and if the current value is non-nil, you know that it has

Re: Avout: Distributed State in Clojure

2011-12-02 Thread Chris Shea
On Fri, Dec 2, 2011 at 12:33 AM, Glen Stampoultzis gst...@gmail.com wrote: I noticed that when I create a reference (zk-ref) I need to provide an initial value. For each VM I do this for - it ends up clobbering the previous value. Is there anyway to create a reference without necessarily

Re: Avout: Distributed State in Clojure

2011-12-02 Thread David Edgar Liebke
Hi Glen, The init-stm step is still referenced in the documentation as being required BTW. Thanks, I'll remove the reference. I had a couple of questions. I noticed that when I create a reference (zk-ref) I need to provide an initial value. For each VM I do this for - it ends up

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
Hi David, I'm super excited by Avout. It seems *better* than magic in that it not only appears to make complicated things possible, but also in a conceptually transparent way. Crazy cool. I'm about to look into this in detail, but I thought I'd just post an issue I'm having with the basic

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
Hi Sam, run-in-transaction exception: #IllegalArgumentException java.lang.IllegalArgumentException: Path must not end with / character nil Very interesting, I wouldn't expect that particular exception unless you named the zk-ref /r0/ instead of /r0, which you apparently didn't. And even

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Edmund
Hey David, I get an identical exception here here w/ zookeeper version 3.2.2. Because I'm crazy that way I also tried to call the ref /r0/ (just to see) and the exception came up. However it was different in that with /r0/ I got the usual exception handling in emacs, whereas with /r0

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Edmund
Hey Sam Dave, I'm following along at home. I followed David's advice and there's no change. FWIW here's the client datastructure and the exception stacktrace: #ZooKeeper State:CONNECTED Timeout:5000 sessionid:0x133fa42621c0004 local:/10.50.0.195:58347 remoteserver:tyrol/10.50.0.184:2181

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
Hi David, I nuked all my zookeeper deps in my lib and ~/.m2 dirs, but similar to Edmund experience it doesn't fix anything. My stacktrace is also identical: ∴ /Users/sam/tmp/avv λ

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
Thanks Sam and Edmund, The stack traces were helpful, I think I understand what the immediate problem is. It appears that the transaction ID in these cases is not getting set, and then Avout is trying to write data to the ZooKeeper node /stm/history/ instead of /stm/history/txid. Since I

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
Hi David, thanks for looking into this so promptly. Sadly 0.5.1 just throws a different exception: user= (def client (connect 127.0.0.1))

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
Did you initialize the STM? (init-stm client) You only need to do it the first time, to set up the necessary zookeeper nodes, it's described in the main tutorial but not the snippet on the top of the avout site. David On Dec 1, 2011, at 12:15 PM, Sam Aaron wrote: Hi David, thanks for

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Edmund
That's the ticket! Thanks David, its working for me now. On 01/12/2011 17:21, David Edgar Liebke wrote: (init-stm client) -- 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

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
On 1 Dec 2011, at 17:21, David Edgar Liebke wrote: Did you initialize the STM? (init-stm client) Works perfectly for me too. Perhaps it might help to add that to the example snippet to stop idiots like myself falling into that trap :-) Sam --- http://sam.aaron.name -- You received this

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
Fantastic, I've added the init-stm step to the code snippet at the top of the Avout site, it was an accident to leave it out. It's been great pairing with you two :) David Works perfectly for me too. Perhaps it might help to add that to the example snippet to stop idiots like myself falling

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
Out of interest, why is #'init-stm a separate step to #'connect I tried looking at the docstrings for each fn but they were both nil :-( Sam --- http://sam.aaron.name On 1 Dec 2011, at 17:21, David Edgar Liebke wrote: Did you initialize the STM? (init-stm client) You only need to do it

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
init-stm (and reset-stm) are only used for creating an STM that will be used by every client. You only want to call it once, not every time a client connects. I could be more clever about calling it when it's clear that it hasn't been called before though. I'll dedicate that patch to you :) I

Re: Avout: Distributed State in Clojure

2011-12-01 Thread liebke
Just released Avout 0.5.2, which now includes automatic STM initialization (no more pesky init-stm step). David On Dec 1, 12:44 pm, David Edgar Liebke lie...@gmail.com wrote: init-stm (and reset-stm) are only used for creating an STM that will be used by every client. You only want to call it

Re: Avout: Distributed State in Clojure

2011-12-01 Thread Sam Aaron
On 1 Dec 2011, at 18:26, liebke wrote: Just released Avout 0.5.2, which now includes automatic STM initialization (no more pesky init-stm step). Ha, throw down the gauntlet, then beat me to it ;-) Great work, Sam --- http://sam.aaron.name -- You received this message because you are

Re: Avout: Distributed State in Clojure

2011-12-01 Thread Glen Stampoultzis
On 2 December 2011 05:26, liebke lie...@gmail.com wrote: Just released Avout 0.5.2, which now includes automatic STM initialization (no more pesky init-stm step). The init-stm step is still referenced in the documentation as being required BTW. I had a couple of questions. I noticed that

Re: Avout: Distributed State in Clojure

2011-11-30 Thread AndyK
If you're willing to dig into another language, 'Erlang and OTP in Action' gives a great overview of Erlang and the distributed principles underlying that language. Though different from the approach of distributed STM, the concepts of distributed applications are baked into the core of Erlang.

Re: Avout: Distributed State in Clojure

2011-11-30 Thread Linus Ericsson
In Clojure in Action (still in MEAP i think) there's a chapter about using (Erlang/OTP-based) RabbitMQ message queue server for making Clojure scalable in a Hadoopish map-reduce-way. Avout seems to solve many of the problems that easily could occur in such an approach by not needing a centralized

Re: Avout: Distributed State in Clojure

2011-11-30 Thread Sean Corfield
On Wed, Nov 30, 2011 at 2:39 AM, Linus Ericsson oscarlinuserics...@gmail.com wrote: In Clojure in Action (still in MEAP i think) there's a chapter about CiA was officially released at the Conj. Everyone who bought the MEAP should have had a notification by now about downloading the final version

[ANN] Avout: Distributed State in Clojure

2011-11-29 Thread liebke
Today we are releasing Avout, which brings Clojure's in-memory model of state to distributed application development by providing a distributed implementation of Clojure's Multiversion Concurrency Control (MVCC) STM along with distributable, durable, and extendable versions of Clojure's Atom and

Re: [ANN] Avout: Distributed State in Clojure

2011-11-29 Thread Chris Perkins
Wow. It will take a while to digest this before I can even dream of what possibilities this opens up. In the meantime, a couple of simple questions: 1) On the avout.io site, is the diagram of conflicting transactions correct? It looks to me like the red arrow is in the wrong place (and it

Re: [ANN] Avout: Distributed State in Clojure

2011-11-29 Thread Gary Trakhman
The issue with transactions not overlapping with in-memory ones implies some separation to deal with distributed coordination, I think. Are there any guidelines or interesting papers on how to create an effective distributed architecture with these semantics? -- You received this message

Re: [ANN] Avout: Distributed State in Clojure

2011-11-29 Thread liebke
1) On the avout.io site, is the diagram of conflicting transactions correct? It looks to me like the red arrow is in the wrong place (and it doesn't match the description below it, points 5 and 6). Great catch, I had intended to fix the figure before release but forgot. It's fixed now.

Re: [ANN] Avout: Distributed State in Clojure

2011-11-29 Thread kovas boguta
Congrats on the release! Looks like the world just got a bit more civilized :) Particularly excited to see how far this concept of distributed refs can go while remaining simple: - Using S3 as the backing store - Massively distributed STM. For example, every user of clojure sharing

Re: Avout: Distributed State in Clojure

2011-11-29 Thread Tim Robinson
Fantastic !!! I'm looking forward to giving this a try. It has the potential to solve some problems I am currently working on. so thanks for your efforts. Tim On Nov 29, 10:38 am, liebke lie...@gmail.com wrote: Today we are releasing Avout, which brings Clojure's in-memory model of state

Re: Avout: Distributed State in Clojure

2011-11-29 Thread Harrison Maseko
Could anyone please recommend a good introductory book about distributed application development? The release of Avout has gotten me interested in the subject. Thanks, Harrison. On Nov 29, 7:38 pm, liebke lie...@gmail.com wrote: Today we are releasing Avout, which brings Clojure's in-memory