{ "info": { "author": "Michael McNeil Forbes, Katheryn Buble", "author_email": "michael.forbes+python@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Utilities" ], "description": ".. -*- rst -*- -*- restructuredtext -*-\n\n.. This file should be written using the restructure text\n.. conventions. It will be displayed on the bitbucket source page and\n.. serves as the documentation of the directory.\n\n\n\nAsync Plotter\n=============\n\nSimple two-process client/server plotting with the following features:\n\n* Plotting does not slow down calculations.\n* User maintains control of the calculation (i.e. KeyboardInterrupts work).\n* Auto-launch client from the server.\n\n * The user defines the plotting code in a (picklable) class, and\n provides the class to the Server() constructor. The Server passes the pickled Plotter\n to the client when the client process is launched in a new python interpreter. \n The python interpreter command line options for the client are passed to the Server \n constructor at the time of instantiation. Default values are: \n (ex. [\"ipython\", \"--pylab=osx\", \"-c\"])\n\n\nTo Do\n=====\n\nPrototype for asynchronous plotting with separate processes using sockets\n\nStill Needs:\n\n* Comprehensive testing\n* Logging (print debug messages in debug mode for checking network problems)\n* Profile performance.\n* Configuration (hostname, port specification etc.)\n\nI think that these have been dealt with, but they need testing:\n\n* socket buffer overflow (recv)\n* cleanup thread and socket command line termination\n* error handling. ex. when a client disconnects then server listen continues,\n network errors\n* multiple clients (plotting)\n\n\nOther Design Approaches\n=======================\n\nThreading Solution\n==================\nThe simplest approach is a multi-thread approach. In principle, one can run the\ncomputations in the main thread and plotting in a separate thread. This\nsolution is sketched in ``thread.py`` but fails with most matplotlib_ backends\ndue to their requirement of running in the main thread. A quick work-around is\nto run the computation in a secondary thread, but this precludes the user being\nable to interrupt the computation.\n\nA nice feature of the python GIL is that one can be fairly confident about\nsharing data (a careful solution would require locks etc.)\n\nMultiprocessing Solution\n========================\nThis same solution should work with multiprocessing_, but this fails on my\ndevelopment platform (Mac OS X 10.5) with the following error::\n\n The process has forked and you cannot use this CoreFoundation \n functionality safely. You MUST exec().\n Break on \n __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.\n\nSeparate Processes\n==================\nIt seems that the most robust solution is to have the calculation and plotters\nrun in completely separate processes. This has an added benefit:\n\n* User can plot remotely.\n\nOne issue that needs to be addressed here (and in the multiprocessing_ solution)\nis the copying of data. One common use-case is that the plotter may be slower\nthan the computation. Thus, intermediate data may be discarded and should not\nbe sent across the network.\n\n\nAdditional Approaches\n=====================\nIt seems that one should be able to use IPython_ to do this, but I have not\nfound a simple way to do this yet.\n\n.. _matplotlib: http://matplotlib.org/\n.. _IPython: http://ipython.org/\n.. _multiprocessing: http://docs.python.org/2/library/multiprocessing.html", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/mforbes/asyncplot", "keywords": "asynchronous,plotting,matplotlib", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "asyncplot", "package_url": "https://pypi.org/project/asyncplot/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/asyncplot/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/mforbes/asyncplot" }, "release_url": "https://pypi.org/project/asyncplot/0.1/", "requires_dist": null, "requires_python": null, "summary": "Asynchronous client-server library for simple plotting.", "version": "0.1" }, "last_serial": 786537, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ccff58381bab858481b7c7fd591d6867", "sha256": "a24f15f74e9aeb806f03b90f3997b9602c59364efa1189fe3813e65ecfcb0ced" }, "downloads": -1, "filename": "asyncplot-0.1.tar.gz", "has_sig": false, "md5_digest": "ccff58381bab858481b7c7fd591d6867", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8662, "upload_time": "2013-01-09T01:09:34", "url": "https://files.pythonhosted.org/packages/98/a9/c6758ac3e222a238b72734659735adfc7d9d3525d3ba036a70ccddd72211/asyncplot-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ccff58381bab858481b7c7fd591d6867", "sha256": "a24f15f74e9aeb806f03b90f3997b9602c59364efa1189fe3813e65ecfcb0ced" }, "downloads": -1, "filename": "asyncplot-0.1.tar.gz", "has_sig": false, "md5_digest": "ccff58381bab858481b7c7fd591d6867", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8662, "upload_time": "2013-01-09T01:09:34", "url": "https://files.pythonhosted.org/packages/98/a9/c6758ac3e222a238b72734659735adfc7d9d3525d3ba036a70ccddd72211/asyncplot-0.1.tar.gz" } ] }