dog-and-duck/docs/codox/intro.html

47 lines
9.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>Introduction</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Dog-and-duck</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="Using_ActivityPub.html"><div class="inner"><span>Using ActivityPub</span></div></a></li><li class="depth-1 "><a href="Validation_Faults.html"><div class="inner"><span>Validation Faults in ActivityPub documents</span></div></a></li><li class="depth-1 current"><a href="intro.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>clj-activitypub</span></div></div></li><li class="depth-2 branch"><a href="clj-activitypub.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>internal</span></div></div></li><li class="depth-3 branch"><a href="clj-activitypub.internal.crypto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crypto</span></div></a></li><li class="depth-3 branch"><a href="clj-activitypub.internal.http-util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http-util</span></div></a></li><li class="depth-3"><a href="clj-activitypub.internal.thread-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>thread-cache</span></div></a></li><li class="depth-2"><a href="clj-activitypub.webfinger.html"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>webfinger</span></div></a></li><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>dog-and-duck</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.quack.picky.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>picky</span></div></a></li><li class="depth-3"><a href="dog-and-duck.quack.quack.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>quack</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>scratch</span></div></div></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-3 branch"><a href="dog-and-duck.scratch.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="dog-and-duck.scratch.scratch.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scratch</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>utils</span></div></div></li><li class="depth-3"><a href="dog-and-duck.utils.process.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>process</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#introduction" name="introduction"></a>Introduction</h1>
<h2><a href="#the-old-dog-and-duck" name="the-old-dog-and-duck"></a>The Old Dog and Duck</h2>
<p>A Clojure library designed to implement the ActivityPub protocol, obviously.</p>
<p><img src="../images/dog-and-duck-beverley.jpg" alt="The Dog and Duck, Derby" /></p>
<p>The Old Dog and Duck is clearly a pub, and its a pub related to an activity; to whit, hunting ducks with dogs. Yes, of course one could also hunt dogs with ducks, but in practice that doesnt work so well. The point isnt whether or not I approve of hunting ducks with dogs (or vice versa); to be clear, I dont. The point is that its a pub related to an activity, and is therefore an <a href="https://www.w3.org/TR/activitypub/">ActivityPub</a>.</p>
<p>Are we clear?</p>
<p>Good.</p>
<p>Let us proceed.</p>
<p><strong>The Old Dog and Duck</strong> is intended to be a set of libraries to enable people to build stuff which interacts with ActivityPub. It isnt intended to be a replacement for, or clone of, Mastodon. I do think I might implement my own ActivityPub server on top of The Old Dog and Duck, that specifically might allow for user-pluggable feed-sorting algorithms and with my own user interface/user experience take, but that project is not (yet, at any rate) this project.</p>
<h2><a href="#status" name="status"></a>Status</h2>
<p>This is a long way pre-alpha. Everything will change. Feel free to play, but do so at your own risk. Contributions welcome.</p>
<h2><a href="#architecture" name="architecture"></a>Architecture</h2>
<p>There are a number of separate concerns required to implement ActivityPub. They include</p>
<ol>
<li>Parsing ActivityStreams messages received from peers and from clients;</li>
<li>Persisting ActivityStreams objects;</li>
<li>Delivering ActivityStreams objects to peers;</li>
<li>Delivering ActivityStreams objects to clients.</li>
</ol>
<p><strong>NOTE THAT</strong> what Mastodon delivers to clients is not actually in ActivityStreams format; this seems to be an ad-hoc hack thats just never been fixed and has therefore become a de-facto standard for communication between ActivityPub hosts and their clients.</p>
<p>My proposal would be to deliver exactly the same ActivityStreams format to my client as to other servers. There may be a valid reason for not doing this, but if there is I will discover it in due course.</p>
<h2><a href="#proposed-dog-and-duck-libraries" name="proposed-dog-and-duck-libraries"></a>Proposed dog-and-duck libraries</h2>
<p><strong>NOTE THAT</strong> at the present stage all the proposed libraries are in one package, namely this package, but that it is proposed that in future they will form separate libraries in separate packages.</p>
<h3><a href="#bar" name="bar"></a>Bar</h3>
<p>Where conversations happen. Handle interactions with clients.</p>
<h3><a href="#cellar" name="cellar"></a>Cellar</h3>
<p>Where things are stored. Persistance for ActivityStreams objects; I may at least initially simply copy the Mastodon postgres schema, but equally I may not.</p>
<h3><a href="#pantry" name="pantry"></a>Pantry</h3>
<p>Where deliveries are ordered and arrive; and from where deliveries onwards are despatched. Handle interactions with peers.</p>
<h3><a href="#quack" name="quack"></a>Quack</h3>
<p>Duck-typing for ActivityStreams objects.</p>
<p>As of version 0.1.0, this is substantially the only part that is yet at all useful, and it is still a long way from finished or robust.</p>
<h3><a href="#scratch" name="scratch"></a>Scratch</h3>
<p>What the dog does when bored. Essentially, a place where I can learn how to make this stuff work, but perhaps eventually an ActivityPub server in its own right.</p>
<h2><a href="#usage" name="usage"></a>Usage</h2>
<p>At present, only the duck-typing functions work. To play with them, use</p>
<pre><code class="clojure">(require '[dog-and-duck.quack.quack :as q])
</code></pre>
<h2><a href="#testing" name="testing"></a>Testing</h2>
<p>Prior to testing, you should clone <a href="https://github.com/w3c-social/activitystreams-test-documents">activitystreams-test-documents</a> into the <code>resources</code> directory. You can then test with</p>
<pre><code class="bash">lein test
</code></pre>
<h2><a href="#license" name="license"></a>License</h2>
<p>Copyright © Simon Brooke, 2022.</p>
<p>This program and the accompanying materials are made available under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.</p></div></div></div></body></html>