Browse Source

Add minimal messaging doc.

Stefano Cossu 6 years ago
parent
commit
7f03abfaf1
4 changed files with 29 additions and 3 deletions
  1. 2 0
      README.md
  2. 0 2
      doc/notes/architecture.md
  3. 27 0
      doc/notes/messaging.md
  4. 0 1
      lakesuperior/model/ldpr.py

+ 2 - 0
README.md

@@ -154,6 +154,8 @@ meant to live as a community project.
 
 [Content Model](doc/notes/model.md)
 
+[Messaging](doc/notes/messaging.md)
+
 [Command-Line Reference](doc/notes/cli.md)
 
 [Storage Implementation](doc/notes/storage.md)

+ 0 - 2
doc/notes/architecture.md

@@ -1,7 +1,5 @@
 # LAKEsuperior Architecture
 
-**DOCUMENTATION AND IMPLEMENTATION OF THIS SECTION ARE WORK-IN-PROGRESS!**
-
 LAKEsuperior is written in Python. It is not excluded that parts of the code
 may be rewritten in [Cython](http://cython.readthedocs.io/) for performance.
 

+ 27 - 0
doc/notes/messaging.md

@@ -0,0 +1,27 @@
+# LAKEsuperior Messaging
+
+LAKEsuperior implements a messaging system based on ActivityStreams, as
+indicated by the
+[Feodra API specs](https://fedora.info/2017/06/30/spec/#notifications).
+The metadata set provided is currently quite minimal but can be easily
+enriched by extending the
+[default formatter class](https://github.com/scossu/lakesuperior/blob/master/lakesuperior/messaging/messenger.py).
+
+STOMP is the only supported protocol at the moment. More protocols may be made
+available at a later time.
+
+LAKEsuperior can send messages to any number of destinations: see
+[configuration](https://github.com/scossu/lakesuperior/blob/master/etc.defaults/application.yml#L79).
+By default, CoilMQ is provided for testing purposes and listens to
+`localhost:61613`. The default route sends messages to `/topic/fcrepo`.
+
+A small command-line utility, also provided with the Python dependencies,
+allows to watch incoming messages. To monitor messages, enter the following
+*after activating your virtualenv*:
+
+```
+stomp -H localhost -P 61613 -L /topic/fcrepo
+```
+
+See the [stomp.py library reference page](https://github.com/jasonrbriggs/stomp.py/wiki/Command-Line-Access)
+for details.

+ 0 - 1
lakesuperior/model/ldpr.py

@@ -371,7 +371,6 @@ class Ldpr(metaclass=ABCMeta):
 
         @param create_only (boolean) Whether this is a create-only operation.
         '''
-        pdb.set_trace()
         create = create_only or not self.is_stored
         ev_type = RES_CREATED if create else RES_UPDATED