{ "info": { "author": "Vit Soucek", "author_email": "soucevi1@fit.cvut.cz", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Education", "License :: Public Domain", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.7", "Topic :: Communications :: Chat", "Topic :: System :: Distributed Computing" ], "description": "Distributed chat based on Chang-Roberts algorithm\n=================================================\n\nThis program is a semestral project on MI-PYT and MI-DSV courses. It is implemented in Python 3.7 and uses `AsyncIO `_.\n\nSince a few new AsyncIO features were used in this program, it is necessary to have **Python 3.7 or higher** to run it.\n\nThis application is a CLI chat room program. However, it does not use a simple server-client way. All nodes are clients, any node can be a server from this point of view.\n\nFor better understanding, the server (node that manages the user messages) will be referred to as the *leader* and the AsyncIO component of the application that listens on the given port will be refered to as the *server* further on in the docuentation. Meaning that any node has a *server*, however only one node in the chatroom is the *leader*.\n\nThe chatroom is a network ring (a node only knows its *next* and *previous* node), however all nodes know the *leader* node as well in order to send it a message. The first node that creates the chatroom is automtically its *leader*. When the *leader* dies or logs out, the new *leader* is elected using `Chang-Roberts leader election algorithm `_. \n\nWhen the user types a message, the node sends it to the *leader* node and the *leader* distributes it to all the participants (the *leader* knows them all).\n\nWhen a node wants to join the chat room, all it needs is one address of any node that is already in the room.\n\nWhen a node logs out or dies without informing the others, its next and previous nodes detect it and repair the ring.\n\nInstallation\n------------\nThe program is uploaded on `PyPI `_.\n\nFor the newest version, just type::\n\n python -m pip install soucevi1_dist_chat\n\nFor any specific version, type::\n\n python -m pip install soucevi1_dist_chat==\n\nYou can also clone and use the `GitHub repository `_.\n\nUsage\n-----\n\nCreating the chatroom\n^^^^^^^^^^^^^^^^^^^^^\n\nTo run the application as the leader node after the installation, type::\n\n soucevi1_dist_chat -l -a -p -n \n\nWhere ```` and ```` is the IP address and port the node will listen on, ```` is the username of your choice and ``-l`` stands for being the *leader*.\n\nJoining the existing chatroom\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nTo join the existing chatroom, you need to know IP ```` and port ```` of any node that is already in the chatroom::\n\n soucevi1_dist_chat -a -p -n -na -np \n\nLogging\n^^^^^^^\n\nIn both cases you can specify the option ``-v`` that stands for verbose. Without ``-v``, the application logs into file (``chat_.log``). With ``-v`` the application logs to the file as well as to the stdout.\n\nThe format of the log message is::\n\n TS: message\n\nWhere ``TS`` is Lamport logical clock timestamp.\n\nChatting\n^^^^^^^^\n\nOnce you start the *leader*, you won't be able to do anything until the first connection of another node is made. After that, you get a prompt that looks like this::\n\n > Name(IP:port): \n\nWhere you can write your message and press Enter to send it. Received message looks simillar::\n\n > Name(IP:port)[Lamport timestamp]: Hello from Name\n\n\nTo exit the application, instead of your message simply write ``//exit``.\n\nHelp\n^^^^\n\nFor help, run::\n\n soucevi1_dist_chat --help\n\n\nDocumentation\n-------------\nYou can take a look at the documentation on this `website `_.\n\nOr, you can build it using Sphinx::\n\n $ cd docs\n $ make html\n\nYou can replace ``html`` in the command with whatever Sphinx currently supports. Beware that some third party Sphinx extensions might be required (listed in ``docs/requirements.txt``).", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/soucevi1/dist-chat", "keywords": "chat,Chang-Roberts,distributed", "license": "Public Domain", "maintainer": "", "maintainer_email": "", "name": "soucevi1-dist-chat", "package_url": "https://pypi.org/project/soucevi1-dist-chat/", "platform": "", "project_url": "https://pypi.org/project/soucevi1-dist-chat/", "project_urls": { "Homepage": "https://github.com/soucevi1/dist-chat" }, "release_url": "https://pypi.org/project/soucevi1-dist-chat/0.1.6/", "requires_dist": null, "requires_python": "", "summary": "Distributed chat based on Chang-Roberts algorithm", "version": "0.1.6" }, "last_serial": 4725965, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "d710bdb41e88190206b7df6a9206936b", "sha256": "db33b10220506d40c89b1238ae80a7e7a41d130794807d18f507665f5577a1cd" }, "downloads": -1, "filename": "soucevi1_dist_chat-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d710bdb41e88190206b7df6a9206936b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11811, "upload_time": "2018-12-18T11:42:04", "url": "https://files.pythonhosted.org/packages/71/bf/db49dcb15cd9be2d55e9457e2280b722edbcb7735695b297f2470a3adb54/soucevi1_dist_chat-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2209e84527938795d42215a16282120c", "sha256": "3a64367cef6513486478080cd18e4aeb57780bfa483afb9c73896229fd326925" }, "downloads": -1, "filename": "soucevi1_dist_chat-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2209e84527938795d42215a16282120c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13639, "upload_time": "2018-12-19T12:25:55", "url": "https://files.pythonhosted.org/packages/3a/cb/7415f055dc059787b8f6930cf2e60e6ca75a200398865eb81b52a98f2774/soucevi1_dist_chat-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "08214813eb854a1099f2b7185a29c49d", "sha256": "98d7caea8c5866b8db3599d48a7df0cb82c7b3021fba12e25c9e0d88b46ebfe0" }, "downloads": -1, "filename": "soucevi1_dist_chat-0.1.3.tar.gz", "has_sig": false, "md5_digest": "08214813eb854a1099f2b7185a29c49d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13652, "upload_time": "2018-12-19T13:53:28", "url": "https://files.pythonhosted.org/packages/4e/dc/705faa940d86b9139469b881a6d35dd73d8dea82943b79c3a210ffe7f070/soucevi1_dist_chat-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "3b1476041c86dd8f489b195621759111", "sha256": "6eefd0e08fb39cd304d0e76bf7fef2d0583b502da04b357c10e6045a7a880ed6" }, "downloads": -1, "filename": "soucevi1_dist_chat-0.1.4.tar.gz", "has_sig": false, "md5_digest": "3b1476041c86dd8f489b195621759111", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13807, "upload_time": "2019-01-02T14:00:09", "url": "https://files.pythonhosted.org/packages/f2/6a/9d77a2ce537bd73654d9741f8dbc13a2c5514ad3eed94967d0e11fc19f86/soucevi1_dist_chat-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "b5e7b9a8ae56ecd0d0a2853958cf9087", "sha256": "be26a008ab10c64420361b81d67e9ad0f08f78f4b98f8a7edf48b2dd0eeab440" }, "downloads": -1, "filename": "soucevi1_dist_chat-0.1.5.tar.gz", "has_sig": false, "md5_digest": "b5e7b9a8ae56ecd0d0a2853958cf9087", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14300, "upload_time": "2019-01-22T13:29:50", "url": "https://files.pythonhosted.org/packages/df/ca/1c258b345559449156a16078cd54494a16e370a7607552ee58ffcaef25b5/soucevi1_dist_chat-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "a7b55d89413458bc43aa13550b959271", "sha256": "7bf5dcc66bc5cdc130cd214cd253bee8fbfe2c4fa5e763b7cc9d77216bc51c24" }, "downloads": -1, "filename": "soucevi1_dist_chat-0.1.6.tar.gz", "has_sig": false, "md5_digest": "a7b55d89413458bc43aa13550b959271", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14290, "upload_time": "2019-01-22T13:39:30", "url": "https://files.pythonhosted.org/packages/9d/07/85664dc83dd11b0be86e14d71cb650fa513b35ac3d409d1fdc6d30268fcf/soucevi1_dist_chat-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a7b55d89413458bc43aa13550b959271", "sha256": "7bf5dcc66bc5cdc130cd214cd253bee8fbfe2c4fa5e763b7cc9d77216bc51c24" }, "downloads": -1, "filename": "soucevi1_dist_chat-0.1.6.tar.gz", "has_sig": false, "md5_digest": "a7b55d89413458bc43aa13550b959271", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14290, "upload_time": "2019-01-22T13:39:30", "url": "https://files.pythonhosted.org/packages/9d/07/85664dc83dd11b0be86e14d71cb650fa513b35ac3d409d1fdc6d30268fcf/soucevi1_dist_chat-0.1.6.tar.gz" } ] }