{ "info": { "author": "Christian Haintz", "author_email": "christian.haintz@orangelabs.at", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Networking" ], "description": "================================================================\nCallme - A python RPC module based on AMQP\n================================================================\n\nIntroduction\n------------\n``Callme`` provides an easy way to do RPC over AMQP (``Callme`` is the\nsuccessor of ``QAM`` ).\n\n**Key Features:**\n\n- Easy to use;\n- Uses AMQP as transport protocol;\n- Support timeouts;\n- SSL support;\n- Supports remote exceptions;\n- OpenSource BSD-licensed;\n- Designed to support broker-side permission system.\n\n\nGetting started with callme\n---------------------------\nA simple RPC Server which provides an add method::\n\n import callme\n\n def add(a, b):\n return a + b\n\n server = callme.Server(server_id='fooserver',\n amqp_host='localhost')\n\n server.register_function(add, 'add')\n server.start()\n\nand a client which uses **fooserver** to add **1 + 1** and finally prints the\nresult::\n\n import callme\n\n proxy = callme.Proxy(amqp_host='localhost')\n\n print proxy.use_server('fooserver').add(1, 1)\n\nThere are optional parameters to fit different needs which are explained in depth\nin the Server and Proxy Documentation.\n\nExamples are provided in the *examples* directory in the package.\n\nMultithreading\n--------------\nThe ``Proxy`` is not thread-safe, you must instantiate one Proxy per thread.\n\nThe ``Server`` is also not thread-safe as well. Instantiate one Server per\nthread.\n\nEven if the Server is not thread-safe itself, it has the capability to use\nmulti-threading. For each RPC Call a worker thread is started which\nsignificantly improves the call speed if multiple clients are calling\nthe server simultaneously. To activate multi-threading on the server pass\n``threading=True`` to the Server class.\n\n\nPermissions\n-----------\nIt is possible to control the access to a RPC Server by the Broker. We use\nRabbitMQ as example because this is the broker we used for testing and\ndevelopment. To get the highest security out of the permission system it is\nrecommended using separate vhost only for callme communication (if you\nhave other amqp messages on your system on the same broker). \n\nFor a more in depth explanation why these permissions look how they are see \n``Exchange Design``.\n\n\nLimit Server Permissions\n++++++++++++++++++++++++\nTo limit one server to only accept RPC Calls to its server_id and send result\nback to clients we use these permissions. Assumption the RPC server has its own\nuser called *carl* on the rabbitmq broker.\n\n``rabbitmqctl set_permissions carl \"server_fooserver_.*\" \"server_fooserver_.*|client_.*_ex_.*\" \"server_fooserver_.*\"``\n\n\nLimit Client (Proxy) Permissions\n++++++++++++++++++++++++++++++++\nTo limit the Proxy to the server with the server_id *fooserver* (no other\nserver can then be reached with this user) we use these permissions. Assumption\nthe RPC proxy has its own user called *olivia* on the rabbitmq broker.\n\n``rabbitmqctl set_permissions olivia \"client_olivia_.*\" \"client_olivia_.*|server_fooserver_ex\" \"client_olivia_.*\"``\n\nTo give the client access to another RPC server with server_id *barserver* we\nset the following permissions:\n\n``rabbitmqctl set_permissions olivia \"client_olivia_.*\" \"client_olivia_.*|server_fooserver_ex|server_barserver_ex\" \"client_olivia_.*\"``\n\nTo give the client access to all RPC servers set the permission as follows:\n\n``rabbitmqctl set_permissions olivia \"client_olivia_.*\" \"client_olivia_.*|server_.*_ex\" \"client_olivia_.*\"``\n\n\nArchitecture\n------------\nCallme uses kombu for communication between Proxy and Server. Callme transfers\ninstances of the ``RpcResponse`` and ``RpcRequest`` to execute remote procedure\ncalls (RPC). The instances of these classes are pickled by kombu and then\ntransferred to the server or proxy.\n\n\nExchange Design\n---------------\nEvery Proxy creates a Exchange and a Queue bound to the Exchange which has\nthe form ``client__ex_`` and ``client__queue_``.\n```` is generated on creation of the Proxy. All Queues and Exchanges are\nauto-deleted and non-durable.\n\nClient Exchange and Queue are declared and bound by the client and server\nExchange and Queue are declared and bound by the server.\n\n\nThe Exchange and Queue Design::\n\n\t Time \n\t | \n\t------------------------------ | ---------------------------- \n\t| Proxy | v | Server |\n\t| User: olivia | | User: carl |\n\t| ------------ | | ---------- |\n\t| | | |\n\t| --- RPC Call--------------------------> server_fooserver_ex | \n\t| | | (Exchange) |\n\t| | | | | \n\t| | | | |\n\t| | | | |\n\t| | | v |\n\t| | | |\n\t| | | server_fooserver_queue | \n\t| | | (Queue) | \n\t| | | | | \n\t| | | / | \n\t| client_olivia_ex_ <----- RPC Result -------------- | \n\t| (Exchange) | | | \n\t| | | | | \n\t| | | | | \n\t| v | | | \n\t| client_olivia_queue_ | | | \n\t| (Queue) | | | \n\t|____________________________| |__________________________| \n\n\nLogging\n-------\nAt the moment there are two loggers present with the names *callme.proxy*\nand *callme.server*. Both are mostly used for debugging at the moment.\n\n\nBug Tracker\n-----------\nIf you find any issues please report them on https://github.com/ceelian/callme/issues.\n\n\nGetting callme\n--------------\nYou can get the python package on the `Python Package Index`_.\n\n.. _`Python Package Index`: http://pypi.python.org/pypi/callme\n\nThe git repository is available at `github.com callme`_.\n\n.. _`github.com callme`: https://github.com/ceelian/callme\n\n\nInstallation\n------------\n``callme`` can be installed via the Python Package Index or from source.\n\nUsing ``easy_install`` to install ``callme``::\n\n $ easy_install callme\n\nUsing ``pip`` to install ``callme``::\n\n $ pip install callme\n\nIf you have downloaded a source tarball you can install it as follows::\n\n $ python setup.py build\n $ python setup.py install\n\n\nSupported by\n------------\nWingware - The Python IDE (http://wingware.com).\n\n\nContributing\n------------\nWe are welcome everyone who wants to contribute to ``callme``.\nDevelopment of callme happens at https://github.com/ceelian/callme.\n\n\nContributors (chronological order)\n----------------------------------\n- mkisto (https://github.com/mkisto)\n- carletes (https://github.com/carletes)\n- skudriashev (https://github.com/skudriashev)\n- venkat-tenmiles (https://github.com/venkat-tenmiles)\n- femtotrader (https://github.com/femtotrader)\n\n\nLicense\n-------\nCallme is released under the BSD License.\nThe full license text is in the root folder of the callme Package.", "description_content_type": null, "docs_url": "https://pythonhosted.org/callme/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://packages.python.org/callme", "keywords": "amqp rpc", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "callme", "package_url": "https://pypi.org/project/callme/", "platform": "any", "project_url": "https://pypi.org/project/callme/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://packages.python.org/callme" }, "release_url": "https://pypi.org/project/callme/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Python AMQP RPC module", "version": "0.2.0" }, "last_serial": 1155587, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "15da3a3cc7f53ee7a0922fef80e6e717", "sha256": "4b00f3d9af28620cbca1cde65d28d043d10a44f905c267e9302b32c2fbb5ae34" }, "downloads": -1, "filename": "callme-0.1.0.tar.gz", "has_sig": false, "md5_digest": "15da3a3cc7f53ee7a0922fef80e6e717", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17686, "upload_time": "2011-08-10T16:17:25", "url": "https://files.pythonhosted.org/packages/b9/4f/2321531900ce0eeb9c796222b72243f93acd9fd6f4c958dd9996f1e9497d/callme-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "d2bf019f875e676970f1125b8b0a0484", "sha256": "67ce62514b3ec8c0acd5f0a3c0199ce123caa603559282ee419eae5178509163" }, "downloads": -1, "filename": "callme-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d2bf019f875e676970f1125b8b0a0484", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18918, "upload_time": "2014-07-12T11:55:06", "url": "https://files.pythonhosted.org/packages/a2/65/6748d557444a2ab3bca023c94d4e9be9863940b62aeb51776077ed553f33/callme-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d2bf019f875e676970f1125b8b0a0484", "sha256": "67ce62514b3ec8c0acd5f0a3c0199ce123caa603559282ee419eae5178509163" }, "downloads": -1, "filename": "callme-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d2bf019f875e676970f1125b8b0a0484", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18918, "upload_time": "2014-07-12T11:55:06", "url": "https://files.pythonhosted.org/packages/a2/65/6748d557444a2ab3bca023c94d4e9be9863940b62aeb51776077ed553f33/callme-0.2.0.tar.gz" } ] }