Switch to unified view

a/pyforge/docs/plugins.rst b/pyforge/docs/plugins.rst
1
Writing Plugins for PyForge
2
=====================================================================
3
4
5
Writing applications that run in pyforge
6
7
8
TODO: Basics of app writing here.   HelloWiki tutorial in the 
9
tutorials section. 
10
11
12
Writing event listeners
1
Writing event listeners
13
---------------------------------------------------------------------
2
---------------------------------------------------------------------
14
3
15
TODO: write about event listeners in general
4
TODO: write about event listeners in general
16
5
17
Types of event hooks you can use: 
6
Our event system is driven by RabbitMQ, most of which you can ignore,
7
because we've simplified it down to two kinds of event listeners: 
18
8
9
.. image:: _static/images/amqp.png
10
   :alt: App Plugins
11
12
Basically you either get: 
19
* Immediate, best effort
13
* Immediate, best effort messages
20
* Queue based, will be processed (eventually)
14
* Queue based messages will be processed (eventually)
15
16
The pyforge platform creates a pool of queue consumers that handle messages, 
17
and it calls all the Reactors that are registered for that event. 
18
19
Or, you can ask for immediate message receipt, with now guarantee of delivery. 
21
20
22
Writing your own WebHooks
21
Writing your own WebHooks
23
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
23
25
In general it's best to use a BusHook  when writing web hooks 
24
There's no reason a event listener can't call out over HTTP to some web 
26
because you get higher performance and you don't slow down
25
service...
27
the queue processing.
26
27
TODO: Document reactors that implement web-hooks after we write some ;) 
28
28
29
29
Extending the pyforge markup
30
Extending the pyforge markup
30
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
32
32
There is a special kind of queue based pluging that allows you to
33
There is a special kind of queue based pluging that allows you to