{ "info": { "author": "Carlos de Alfonso", "author_email": "caralla@upv.es", "bugtrack_url": null, "classifiers": [], "description": "1. INTRODUCTION\n\nlockserver is a simple lock server that enables the coordination of several clients\n to accede to a single resource in a network that has a maximum number of simultaneous\n sessions.\n \nThe origin of this server is the access to a Dell Equallogic SAN. Such SAN has a limit\n of 7 (or 8) SSH concurrent sessions, but we had more clients that were trying to ssh\n this SAN. A limit was needed, and so this lockserver was created.\n \nClients are modified to use the Lock object from the lockcli module and connect to the\n server that is located in a URL in the network. The server is configured to allow a\n number of simultaneous clients.\n \nThe server is created in a general way so multiple locks can be created although it is\n disabled the remote creation of locks. The server is able to create a lock at startup,\n and the parameters of such lock are stated in the .conf file.\n \n* There is a start-up service created for debian, but it is not supposed to work in Red\n Hat based distros.\n\n2. JOB PENDING\n\n- Include some kind of authentication for clients (i.e. a secret key)\n\n- Include a script to start as a service in other than debian-based distros\n \n3. EXAMPLE\n\n 3.1 SERVER: lockserver.my.url.com\n \n Will run lockserver with the \"DefaultLock\" lock created on startup, and will allow up\n to 6 concurrent locks. If a lock query is not used for more than 1200 seconds, it will\n expire.\n \n 3.1.1 FILE /etc/lockserver.conf\n\n [general]\n # set to localhost if you do not want access from outside this server\n SERVER=0.0.0.0\n # the port where it will listen\n PORT=9090\n # the log file\n LOG_FILE=/var/log/lockserver.log\n # the log level (superdebug, debug, info, error or warning)\n LOGLEVEL=debug\n # the period for evaluating the queue\n LIFECYCLE_PERIOD=1\n # the parameters of the lock that will be created on startup\n DEFAULT_LOCK=DefaultLock\n DEFAULT_LOCK_SIZE=6\n DEFAULT_LOCK_GRACE_TIME=10\n DEFAULT_LOCK_EXPIRATION_TIME=1200\n DEFAULT_LOCK_MAX_LOCK_TIME=1200\n\n 3.2 CLIENTS (e.g. node1.my.url.com, node2.my.url.com, node3.my.url.com)\n\n Will run cliapp to coordinate\n \n 3.2.1 APPLICATION cliapp\n\n /usr/bin/myapp.py\n #!/usr/bin/python\n import lockcli\n import socket\n l = lockcli.Lock(\"http://lockserver.my.url.com:9090/RPC2\", \"DefaultLock\")\n if l.lock_query(\"i queried a lock from %s\" % socket.gethostname()):\n print \"lock queried\"\n if l.lock_wait():\n print \"lock acquired\"\n time.sleep(30) # this is the hard job\n l.lock_release()\n print \"lock released\"\n else:\n print \"could not get lock\"\n else:\n print \"could not query for lock\"\n \n4. LICENSE\n\n# The MIT License (MIT)\n#\n# Copyright (c) 2014 Carlos de Alfonso (caralla@upv.es)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n\n5. CHANGE LOG\n\n 2014-12-16 (v.0.36)\n Bug correction in install for pypi.\n\n 2014-12-16 (v.0.35)\n Added web browsing support. Using a web browser we can get statistics of usage\n and the current state of the locks (locks locked and the queue).\n \n 2014-12-11 (v.0.30)\n Initial public version, submited to pypi", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.grycap.upv.es", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "lockserver", "package_url": "https://pypi.org/project/lockserver/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lockserver/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.grycap.upv.es" }, "release_url": "https://pypi.org/project/lockserver/0.36/", "requires_dist": null, "requires_python": null, "summary": "Simple lock server and client api for distributed coordination using a simple centralized python lock server", "version": "0.36" }, "last_serial": 1345999, "releases": { "0.30": [ { "comment_text": "", "digests": { "md5": "9b642fd640f1b721ae63370ebd6d5806", "sha256": "85ab9eb98115209cfe94238ce40657f8310aba8aac61aaf1641656988eb2db9d" }, "downloads": -1, "filename": "lockserver-0.30.tar.gz", "has_sig": false, "md5_digest": "9b642fd640f1b721ae63370ebd6d5806", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6563, "upload_time": "2014-12-11T09:30:23", "url": "https://files.pythonhosted.org/packages/51/04/8a5a02c170bc91da40c1658e6b442cb85626e92967b1543fe52902e701fe/lockserver-0.30.tar.gz" } ], "0.36": [ { "comment_text": "", "digests": { "md5": "845f21613331bb638c3984c58ce87177", "sha256": "f22b42757f0514942979f8f09bd3602658b7b577680e943a5b5c0a2020944073" }, "downloads": -1, "filename": "lockserver-0.36.tar.gz", "has_sig": false, "md5_digest": "845f21613331bb638c3984c58ce87177", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7616, "upload_time": "2014-12-16T11:26:47", "url": "https://files.pythonhosted.org/packages/6e/29/f69fa20c213e0dd00ad562d7525302ef740a40e815fee467fc6f6d2db500/lockserver-0.36.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "845f21613331bb638c3984c58ce87177", "sha256": "f22b42757f0514942979f8f09bd3602658b7b577680e943a5b5c0a2020944073" }, "downloads": -1, "filename": "lockserver-0.36.tar.gz", "has_sig": false, "md5_digest": "845f21613331bb638c3984c58ce87177", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7616, "upload_time": "2014-12-16T11:26:47", "url": "https://files.pythonhosted.org/packages/6e/29/f69fa20c213e0dd00ad562d7525302ef740a40e815fee467fc6f6d2db500/lockserver-0.36.tar.gz" } ] }