Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"pyamqp" should be suggest way of defining the protocol for rabbitmq #290

Merged
merged 4 commits into from
Sep 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ and providing a simple YAML configuration file:

# foobar.yaml

AMQP_URI: 'amqp://guest:guest@localhost'
AMQP_URI: 'pyamqp://guest:guest@localhost'

WEB_SERVER_ADDRESS: '0.0.0.0:8000'

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/standalone_events.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from nameko.standalone.events import event_dispatcher

config = {
'AMQP_URI': AMQP_URI # e.g. "amqp://guest:guest@localhost"
'AMQP_URI': AMQP_URI # e.g. "pyamqp://guest:guest@localhost"
}

dispatch = event_dispatcher(config)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/standalone_rpc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from nameko.standalone.rpc import ClusterRpcProxy

config = {
'AMQP_URI': AMQP_URI # e.g. "amqp://guest:guest@localhost"
'AMQP_URI': AMQP_URI # e.g. "pyamqp://guest:guest@localhost"
}

with ClusterRpcProxy(config) as cluster_rpc:
Expand Down
2 changes: 2 additions & 0 deletions docs/key_concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ Each worker executes in its own greenthread. The maximum number of concurrent wo

Workers are stateless so are inherently thread safe, but dependencies should ensure they are unique per worker or otherwise safe to be accessed concurrently by multiple workers.

Unfortunately, many C-extensions that are using sockets and that would normally be considered thread-safe may not work with greenthreads. Among them `librabbitmq <https://pypi.python.org/pypi/librabbitmq>`_, `MySQLdb <http://mysql-python.sourceforge.net/MySQLdb.html>` and others.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change

"Unfortunately, many C-extensions" => "Note that many C-extensions"
"Among them" => "Among them are"

And then add

"Modules with C-extensions that are not "green" may be wrapped in an eventlet thread-pool <http://eventlet.net/doc/threading.html>."


.. _extensions:

Extensions
Expand Down
7 changes: 7 additions & 0 deletions docs/similar_projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ Kombu
`Kombu <http://kombu.readthedocs.org/>`_ is a Python messaging library, used by both Celery and Nameko. It exposes a high-level interface for AMQP and includes support for "virtual" transports, so can be run with non-AMQP transports such as Redis, ZeroMQ and MongoDB.

Nameko's AMQP features are built using Kombu but don't include support for the "virtual" transports.

Also, due to the usage of `eventlet <http://eventlet.net/>`_ for green concurrency, Nameko can't make use of C-extensions such as `librabbitmq <https://pypi.python.org/pypi/librabbitmq>`_ that Kombu uses by default if it's available. If you want to have `librabbitmq <https://pypi.python.org/pypi/librabbitmq>`_ in your environment for other purposes than Nameko, you can force Kombu to use standard Python implementation of AMQP by defining broker urls as ``pyamqp://`` instead of ``amqp://``

Eventlet
--------

`Eventlet <http://eventlet.net/>`_ is a Python library that provides concurrency via "greenthreads". You can check more details on how it's used by Nameko in :ref:`Concurrency <concurrency>` section.
9 changes: 9 additions & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ deserialized
deserializers
deserializes
deserializing
e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to do this. These are from "i.e.", right? Travis correctly considers it a word.

Are you developing locally on OS X? If so, the master branch of pyenchant has more up-to-date dictionaries. It hasn't been released though :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was from "i.e", but it was failing on travis and on my local (ubuntu/mint). I can revert those.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is curious because we already have "i.e." in the master branch. Maybe something changed on Travis...

entrypoint
entrypoints
eventlet
Expand All @@ -41,6 +42,7 @@ freenode
greenthread
greenthreads
homebrew
i
init
initialize
initialized
Expand All @@ -56,6 +58,7 @@ javascript
kombu
kwarg
kwargs
librabbitmq
lifealike
lifecycle
localhost
Expand All @@ -72,6 +75,7 @@ mixin
monolith
monolithic
monospaced
mysqldb
nameko
namespace
onefinestay
Expand All @@ -82,6 +86,7 @@ pre
programmatically
pseudocode
py
pyamqp
pyrabbit
pytest
rabbitmq
Expand All @@ -104,6 +109,7 @@ serialized
serializers
serializes
serializing
shutdown
specialization
specialize
specialized
Expand All @@ -117,6 +123,7 @@ submodules
subpackages
teardown
testability
timeouts
traceback
tracebacks
tuple
Expand All @@ -127,9 +134,11 @@ unregister
unregistered
unregisters
utils
urls
visualize
visualized
visualizing
vs
webapp
websocket
websockets
Expand Down