{ "info": { "author": "Colin Alston", "author_email": "colin.alston@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: System :: Clustering", "Topic :: System :: Distributed Computing" ], "description": "Distributex\n-----------\nDistributex is a simple mutex service for coordinating certain cluster\noperations.\n\n**Note**: Distributex is not designed for tasks which require high performance\nor fair lock acquisition. It is a very simple Busy-waiting lock with very slow\nacquisition. Do not use it for extremely large clusters either as there's \na good chance a requester might never obtain a lock.\n\nDistributex server\n------------------\n\nThe Distributex server provides a simple HTTP service. It is written using\nTwisted, and provides a Twisted plugin. It also requires PyYAML for its \nconfiguration. \n\nYou can start it as follows, or wrap it in supervisor, or pass -d, or whatever::\n\n $ twistd -n distributex -c distributex.yaml\n\nThe configuration file is a simple YAML structure which defines lock pools. A\nlock pool is a resource you want to allow things to fight over.::\n\n backend: memcache\n pools:\n - name: pool1\n expire: 300\n\n - name: pool2\n expire: 300\n servers: acme1, acme2\n\nThis will create two pools whose lock expires after 5 minutes. It's generally\na good idea to set an expiry to ensure something, otherwise it will default to\n30 minutes. If you don't want it to expire then set it to 0, but I don't \nrecommend that.\n\nYou can specify either the 'memcache' backend or 'inmemory', there are pros\nand cons to both. Memcache will be slower, but state is retained away from \nthe Distributex server and you can scale out workers - however since the \ninmemory backend can handle about 5000 waiting locks on a single machine \nredundancy is the only real concern. Lock expiry is also a bit more reliable\nand simpler in the memcache backend.\n\nA comma separated list of servers can also be provided to prevent accidental\npool incursions. This isn't secure, nor are lock releases, since anyone can\njust forge their hostname. The distributex client will pass the FQDN of the\nhost.\n\nIt is also possible to set 'maxlocks' which allows the pool to behave like\na semaphore.\n\nYou can test the service as follows::\n\n $ curl \"http://localhost:9889/get/?host=me&pool=pool1\"\n YES\n $ curl \"http://localhost:9889/get/?host=them&pool=pool1\"\n NO\n $ curl \"http://localhost:9889/release/?host=me&pool=pool1\"\n OK\n $ curl \"http://localhost:9889/get/?host=them&pool=pool1\"\n YES\n $ curl \"http://localhost:9889/release/?host=them&pool=pool1\"\n OK\n\nThe service also provides a 'wait' command which will leave the connection\nopen until a lock is obtained.\n\n\nDistributex client\n------------------\n\nNot included in this package is a simple Python script is provided to wrap commands. You can get it from https://raw.github.com/calston/distributex/master/client/distributex ::\n\n usage: distributex [-h] -H HOST -r POOL [-p PORT] [command]\n\n Distributex client\n\n positional arguments:\n command Command to execute when lock is obtained\n\n optional arguments:\n -h, --help show this help message and exit\n -H HOST Server hostname\n -r POOL Resource pool\n -p PORT Server port (default 9889)\n -l Use local locking as well\n\nThis is useful for blocking a cron job like Puppet.::\n\n */5 * * * * /usr/bin/distributex -H distributex.acme.com -r pool1 '/usr/bin/puppet agent --onetime --no-daemonize'\n\n\nThis will ensure that only one instance of Puppet in the cluster runs at any time.\nYou might also want to pass -l to distributex to prevent local process overlap.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/calston/distributex", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "distributex", "package_url": "https://pypi.org/project/distributex/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/distributex/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/calston/distributex" }, "release_url": "https://pypi.org/project/distributex/0.7/", "requires_dist": null, "requires_python": null, "summary": "A network mutex service for distributed environments.", "version": "0.7" }, "last_serial": 1143246, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3c279281230ab9e018d0ea29dcb0c1f1", "sha256": "f1dc0538678fe1f7cfc235fcad65b0fe2a0d9664ca31c0fd249647236dfdfd32" }, "downloads": -1, "filename": "distributex-0.1.tar.gz", "has_sig": false, "md5_digest": "3c279281230ab9e018d0ea29dcb0c1f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4292, "upload_time": "2014-01-26T11:53:11", "url": "https://files.pythonhosted.org/packages/36/fc/93fd60cdffac9d86bfdd638d8715f177838097a77171a4f2801dc939a023/distributex-0.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "9710c0812957fb9f243f13eec6479ca2", "sha256": "60bebcc6452979d22a66a792cffb6ffded656ead6205968a37b0005e228e8108" }, "downloads": -1, "filename": "distributex-0.3.tar.gz", "has_sig": false, "md5_digest": "9710c0812957fb9f243f13eec6479ca2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4356, "upload_time": "2014-02-07T06:51:16", "url": "https://files.pythonhosted.org/packages/e3/b0/566534caa354a6f8893147803cf3b566e4b15b056e9933fc46906d7cc00d/distributex-0.3.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "96621b08f17ce41f95fce139a4241b20", "sha256": "e40ff641168d54b81b9bc7546e4a01e095b770371b3250eeae793cfafde69074" }, "downloads": -1, "filename": "distributex-0.5.tar.gz", "has_sig": false, "md5_digest": "96621b08f17ce41f95fce139a4241b20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4409, "upload_time": "2014-07-01T14:13:42", "url": "https://files.pythonhosted.org/packages/c7/2e/eb0830afd6276bef631a31d65ae79c5323052c9ff4d7cf46cca692561544/distributex-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "bdf1c14f9e398aac85ab0e0a15a1fe40", "sha256": "8e42f3bb950461441f7792cd2532f05f13ea253341d6da6d68c807f737fea012" }, "downloads": -1, "filename": "distributex-0.6.tar.gz", "has_sig": false, "md5_digest": "bdf1c14f9e398aac85ab0e0a15a1fe40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4399, "upload_time": "2014-07-01T14:17:55", "url": "https://files.pythonhosted.org/packages/f2/c5/785387a8af1fd31ae9181b7de12164c812d8ef4bb5a871f47457ce04bd96/distributex-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "d236950b3082e759c46b0c0107d8844e", "sha256": "73fda756b1829ff41b1fd5eb0009e24b5b5a1d55460565b6a9ba4283f83c65d2" }, "downloads": -1, "filename": "distributex-0.7.tar.gz", "has_sig": false, "md5_digest": "d236950b3082e759c46b0c0107d8844e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4400, "upload_time": "2014-07-01T14:37:08", "url": "https://files.pythonhosted.org/packages/12/0e/a6636a0a6b04b3db049aac3ba373eb2472ccc2fd8f1c3ae0c3ae2202d6fc/distributex-0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d236950b3082e759c46b0c0107d8844e", "sha256": "73fda756b1829ff41b1fd5eb0009e24b5b5a1d55460565b6a9ba4283f83c65d2" }, "downloads": -1, "filename": "distributex-0.7.tar.gz", "has_sig": false, "md5_digest": "d236950b3082e759c46b0c0107d8844e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4400, "upload_time": "2014-07-01T14:37:08", "url": "https://files.pythonhosted.org/packages/12/0e/a6636a0a6b04b3db049aac3ba373eb2472ccc2fd8f1c3ae0c3ae2202d6fc/distributex-0.7.tar.gz" } ] }