Giter Club home page Giter Club logo

avout's People

Contributors

davidrupp avatar liebke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avout's Issues

remove-watch throws exception w/ non-keyword keys

(let [test-ref (avout/zk-ref *avout-client* "some-key")]
  (add-watch test-ref "some-key" (fn [& args] true))
  (remove-watch test-ref "some-key"))
java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn
 at clojure.core$swap_BANG_.invoke (core.clj:2160)
    avout.refs.DistributedReference.removeWatch (refs.clj:106)
    clojure.core$remove_watch.invoke (core.clj:1975)

Exceptions within dosync!! blocks not gracefully handled

Modeling Clojure's STM, a user can reasonably expect an exception thrown within a dosync!! block to abort the transaction without side-effects.

This is not in fact the case.

=> (seq @(.state (avout.transaction/get-local-transaction
                  *avout-client*)))
(0 0 0 0 0 0 0 0)

=> (avout/dosync!! *avout-client*
                   (throw (RuntimeException. "FAIL!")))
run-in-transaction exception: #<RuntimeException java.lang.RuntimeException: FAIL!>
nil

=> (seq @(.state (avout.transaction/get-local-transaction
                  *avout-client*)))
(0 0 0 0 0 0 0 2)

Website?

The website appears to be broken. All I get is a blank page. The root cause appears to be that avout.io creates a frameset referencing https://leibke.github.io/avout/, which is itself a permanent redirect back to avoit.io.

Any chance this could be fixed?

zk-atoms do not persist

I have noted that zk-atoms do not persist when the client connection is broken. More details when available.

zk-ref watcher called with wrong values

I have created a zk-ref and added two watchers. One is added inline at created of the ref, the other is added subsequently using add-watch.

I then run tests by manually (from the REPL) changing the zk-ref from a remote machine.

Occasionally, I notice both watchers are called with the PREVIOUS state in the new (last) argument. Immediately after this problem, I verify that the distributed ref has the correct value on the same machine where the watcher was invoked incorrectly.

set-to/watcher-called-with/zk-ref-has
1/1/1
2/2/2
3/2/3

Two uses of dissoc inside swap! that appear incorrect

There are two expression like the one below in files atoms.clj and refs.clj that appear incorrect:

(removeWatch [this key](swap! watches %28dissoc key%29) this)

I believe the parens around (dissoc key) should be removed.

Exponential growth of watchers when ZK client disconnects/reconnects

Hi,

If for whatever reason the ZK client drops a connnection and reconnects before the SESSION_EXPIRY is raised, the number of watchers managed by the client will double each time.

During some network issues we had a few processes grind down to a halt because of this.

This is because Avout raises a watcher to manage the internal state of atoms and refs. I.e. see invalidateCache in avout.refs.

What should happen here is that each time the watcher is triggered, it should filter out events like {:event-type :None, :keeper-state :Disconnected}, perhaps by only ever being interested in event-type NodeDataChanged.

When these events get raised Avout currently registers brand new watchers even though the original watcher will still carry on firing. In ZK watchers are "fire-once" but not in the case of some events like the disconnect/connect.

This is the same for addWatch in refs and atoms.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.