27 lines
979 B
Plaintext
27 lines
979 B
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Eventing\n",
|
|
"\n",
|
|
"Under [working with proxy.py](welcome.ipynb) we saw that plugin instances are not global. So, how to manage shared data? You have 2 options:\n",
|
|
"\n",
|
|
"1. Use in-built Python provided concepts of shared memory in a `multiprocessing` environment.\n",
|
|
"2. Use `proxy.py` provided eventing core\n",
|
|
"\n",
|
|
"`proxy.py` provides an in-built mechanism to publish and subscribe to messages between processes within a running instance. With a pubsub facility in hand, we can develop variety of models e.g. multi-producer-single-subscriber model. Imagine, publishing one or multiple messages from your plugin instances (per-request) and then processing them in near real-time within a single subscriber thread."
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"language_info": {
|
|
"name": "python"
|
|
},
|
|
"orig_nbformat": 4
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|