slides
This commit is contained in:
parent
0c46a17443
commit
3004422cb6
@ -308,6 +308,29 @@ Subcommands:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Cobra
|
||||||
|
|
||||||
|
```
|
||||||
|
,,'6''-,.
|
||||||
|
<====,.;;--.
|
||||||
|
_`---===. """==__
|
||||||
|
//""@@-\===\@@@@ ""\\
|
||||||
|
|( @@@ |===| @@@ ||
|
||||||
|
\\ @@ |===| @@ //
|
||||||
|
\\ @@ |===|@@@ //
|
||||||
|
\\ |===| //
|
||||||
|
___________\\|===| //_____,----""""""""""-----,_
|
||||||
|
""""---,__`\===`/ _________,---------,____ `,
|
||||||
|
|==|| `\ \
|
||||||
|
|==| | Python 3 + Redis ) |
|
||||||
|
|==| | _____ ______,--' '
|
||||||
|
|=| `----""" `"""""""" _,-'
|
||||||
|
`=\ __,---"""-------------"""''
|
||||||
|
""""
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# Why Redis ?
|
# Why Redis ?
|
||||||
|
|
||||||
- Redis Pub/Sub very easy to get going. Redis Stream (5.0-rc5) could be used.
|
- Redis Pub/Sub very easy to get going. Redis Stream (5.0-rc5) could be used.
|
||||||
@ -332,28 +355,25 @@ Subcommands:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Cobra
|
# Memory optimizations (thanks to tracemalloc module)
|
||||||
|
|
||||||
|
## A simple asyncio PUBLISH only client (see code in the annex)
|
||||||
|
|
||||||
```
|
```
|
||||||
,,'6''-,.
|
262.5 KB new 262.5 KB total / 2994 new 2994 total memory blocks:
|
||||||
<====,.;;--.
|
...
|
||||||
_`---===. """==__
|
File "/src/cobra/server/pipelined_publisher.py", line 35
|
||||||
//""@@-\===\@@@@ ""\\
|
pipe.publish(appChannel, data)
|
||||||
|( @@@ |===| @@@ ||
|
File "/usr/local/lib/python3.7/site-packages/aioredis/commands/transaction.py", line 145
|
||||||
\\ @@ |===| @@ //
|
task = asyncio.ensure_future(attr(*args, **kw),
|
||||||
\\ @@ |===|@@@ //
|
File "/usr/local/lib/python3.7/site-packages/aioredis/commands/pubsub.py", line 14
|
||||||
\\ |===| //
|
return self.execute(b'PUBLISH', channel, message)
|
||||||
___________\\|===| //_____,----""""""""""-----,_
|
File "/usr/local/lib/python3.7/site-packages/aioredis/commands/__init__.py", line 50
|
||||||
""""---,__`\===`/ _________,---------,____ `,
|
return self._pool_or_conn.execute(command, *args, **kwargs)
|
||||||
|==|| `\ \
|
File "/usr/local/lib/python3.7/site-packages/aioredis/commands/transaction.py", line 102
|
||||||
|==| | Python 3 + Redis ) |
|
self._pipeline.append((fut, cmd, args, kw))
|
||||||
|==| | _____ ______,--' '
|
|
||||||
|=| `----""" `"""""""" _,-'
|
|
||||||
`=\ __,---"""-------------"""''
|
|
||||||
""""
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Pipelined redis publishing
|
# Pipelined redis publishing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user