A conceptual introduction to approaching virtual interaction as human-machine conversations modeled on persistent data-structures using Clojure and Datomic and its benefits, possibilities and long-term implications.
to order now or read more? I would like to read some more please. We have widgets from A to Z. John and Mary also think it's good. What did Mary say about it? She said "They're great. Cheap, fast and good!" Should we perhaps call you for some personal advice on widgets? Yeah sure. Great? What's your name and phone number?
widgets: .... You can add one, see the next 50 or pick one you want to change. I would like to change that one We currently have ... on file. Do you want to change price, name or stock, or forget about it for now. I want to give it a different price. What price do you want to give it? €29,95 12:47:59 at 13 Nov 2014 12:48:34 at 13 Nov 2014 12:48:34 at 13 Nov 2014 12:48:46 at 13 Nov 2014 12:48:46 at 13 Nov 2014 12:48:58 at 13 Nov 2014
widgets: .... You can add one, see the next 50 or pick one you want to change. I would like to change that one We currently have ... on file. Do you want to change price, name or stock, or forget about it for now. I want to give it a different price. What price do you want to give it? €29,95 12:47:59 at 13 Nov 2014 12:48:34 at 13 Nov 2014 12:48:34 at 13 Nov 2014 12:48:46 at 13 Nov 2014 12:48:46 at 13 Nov 2014 12:48:58 at 13 Nov 2014 Datomic Transactions
• transfer a model of the world • narrow behavior to meaningful responses • Every user interface is a speech act • Every input lets users perform speech acts System are just speech act generators
give those acts the best stage • Create dedicated interfaces for types of acts • Optimising for another kind of performance • Designing for muscle-memory responses • Auto-cueing teleprompter for video recordings
depends on the entire VM, meaning they: • always have to live server side • aren't referentially transparent • must store raw output data for history (At least until EClj performantly support first class namespaces.)
interactions • into a purely functional data structure • with minimal amounts of purely referential code allowing others to locally anticipate actions.
on the level of granularity of speech acts • Datomic can store it as a persistent data structure • Allows responses to refer to a specific state/act • States are good place for limited, versioned, logic
• Undo moves current pointer back in the sequence • Redo moves the pointer forward • Actions 'sideline' acts beyond current pointer • Optionally rolling back their side effects • Or just create a new version of the current act
handle that by nesting state machines, where each state can be it's own state machine, allowing for a high degree of composability. (If you squint you can even see objects there ;)
switch between contexts • nest contexts inside other contexts • maintain state (fuzzy history) per context • narrow action, and perception, through context
a state • Path fragments refer to hierarchical levels /inbox/12/my-thread/73/third-response#reply-to-all • Clicking a link (GET) is argument-less transition • Submitting a form (POST) an argumented transition • With redirects leading to a new state
discoverability • We can have tons of speech act types Yes/No, Multiple Choice, Forms, Video, Audio, Drawings, Payments, Social Shares, GPS, Weight • But each act type has just a few well-defined exits • Making discoverability not just feasible, but built in
• History support through a rewind gesture or • Swiping across a visual "sequence of acts" • Automatically accommodates all aspect ratios • Nested contexts as hide-on-scroll navigation bars • Multi service with intents or protocol ping-pong
Live Datalog queries on Datomic make it possible • Offline viewing can be built in through e.g. Datascript • Offline speculative operation possible through analysis: • Conflict-free work through continuity of user memory • Informed speculative work on branch prediction • Natural conflict resolution schemes either way
people, Collecting profiles, Losing weight • Your success depends on your ability to help your customers achieve their goals • You have access to a complete view on all of your customer interactions So what do you do?
• Identify areas of improvement Lost customers, Plateauing users, Losing engagement • Design (experimental) corrective action • Select affected customers and apply the action • Automate the process if it ends up working
experiment. Luckily, as long as we can display stored acts, especially if they contain the creation process, we can re-experience the entire user journey and create transcripts/re-presentations from them.
users in them, which used to be a prohibitively hard problem. But it comes completely for free if we • store state machine definitions in Datomic • assign users to specific versions of them • store the code used for branching
from them so we want only a single variable to change. Single-act interfaces are great experimental units. The sequence approach perfectly isolates them, making it the perfect platform for A/B testing (or any other type of sociological research.)
What if you care more about results than wisdom? Let the machine do the learning! Multi-armed bandit can optimise for you, automatically choosing versions giving best results
server • That means the NSA is, or can be, watching • People will never speak freely if that’s the case • Nor will companies share all their data with you
own data • And reference data used from other participants State machine definitions. Branching logic. User acts. • Everyone gets a namespaced Datomic-style DB • Work with live/pub-sub Datalog cross-DB querying • Based on a.o. Nikitonsky’s Datomic as a Protocol
data with a personal key • Share by encrypting with others' public signatures • Share data, by context, on a need-to-know basis • Have privacy correspond to cryptographical reality.
can (temporarily) assume an identity • Sign everything you created under that identity • Retroactively revokable when compromised • Publish publicly for a timestamped proof • Enabling e.g. secure ad-hoc referendum voting
• You can create a view of all public information • Including aggregations of private data • And similar views of accessible data per recipient • And encrypt those materialised views accordingly