• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,884
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
10
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Agenda ● Perspective ● Preliminaries ● On complecting ● Overview of Zeder ● Out of the Tar Pit ● A Little Further out of the tar pit ● Demo ● Future
  • 2. Preliminaries
  • 3. Lens
  • 4. st Fogus' 1 Law In the same way that an apple tree “apples” – so too should your systems “tuple”
  • 5. [Entity Attribute Value]
  • 6. Decomplecting
  • 7. Take transients... ...please
  • 8. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts
  • 9. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy
  • 10. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy
  • 11. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy
  • 12. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy Reference policy
  • 13. Transients ● Limited mutability ● Thread isolated change ● Not persistent ● Not references ● Speed boosts Change policy Sharing policy Reference policy This is what you wanted.
  • 14. RAWG!?
  • 15. Pods decomplect ● Reference policy ● Change policy
  • 16. Zeder pods decomplect ● Reference policy ● Change policy ● Sharing policy (Zeder version anyway)
  • 17. Zeder pods decomplect ● Reference policy – ● There are themselves references Change policy – – ● Transients internally Mutable objects Sharing policy (Zeder version anyway) – – Single-thread Multiple threads
  • 18. A pod++ transient-of value value-of writer shareable? reader
  • 19. th Fogus' 10 Rule Any sufficiently complicated Clojure program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of OPS5.
  • 20. OPS5 ● Invented in the late 1970s ● Charles Forgy ● Rete algorithm ● Incredibly efficient ● Used to develop expert systems (XCON)
  • 21. OPS5
  • 22. OPS5 {:db/ident :user/username … } {:db/ident :user/salt … } (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) ;; something triggers a call ;; to store-user-info
  • 23. OPS5 (literalize user username salt ) {:db/ident :user/username … } {:db/ident :user/salt … } (p new-user (user ^username <name> ^salt nil)) --> (modify 1 ^salt “Bad salt”) ) (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) (make user ^username fogus ;; something triggers a call
  • 24. OPS5 (literalize user username salt ) {:db/ident :user/username … } {:db/ident :user/salt … } (p new-user (user ^username <name> ^salt nil)) --> (modify 1 ^salt “Bad salt”) ) (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) (make user ^username fogus ;; something triggers a call
  • 25. OPS5 (literalize user username salt ) {:db/ident :user/username … } {:db/ident :user/salt … } (p new-user (user ^username <name> ^salt nil)) --> (modify 1 ^salt “Bad salt”) ) (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) (make user ^username fogus ;; something triggers a call
  • 26. OPS5 (literalize user username salt ) {:db/ident :user/username … } {:db/ident :user/salt … } (p new-user (user ^username <name> ^salt nil)) --> (modify 1 ^salt “Bad salt”) ) (defn store-user-info [uname] @(transact connection [{:user/username uname :user/salt (gen-salt)}])) (make user ^username fogus ?? ;; something triggers a call
  • 27. Out of the Tarpit 2006 by Ben Moseley and Peter Marks
  • 28. Decomplecting
  • 29. Re Decomplecting
  • 30. Data Behavior Function
  • 31. Data Behavior tactical strategic Function tactical
  • 32. Driving principles ● Get stuff done ● Data rocks ● Don't invent anything ● Protocols (swappable engines) ● Pattern matching ● Immutability (or the appearance thereof) ● Fast would be nice
  • 33. Things not shown ● Snapshots ● Rete implementation details ● Pod details ● Engine swaps ● RHS Actions ● LHS (match) predicates