{"action":"opened","number":3,"pull_request":{"url":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls/3","id":90297322,"html_url":"https://github.com/UV-CDAT/vcs-js/pull/3","diff_url":"https://github.com/UV-CDAT/vcs-js/pull/3.diff","patch_url":"https://github.com/UV-CDAT/vcs-js/pull/3.patch","issue_url":"https://api.github.com/repos/UV-CDAT/vcs-js/issues/3","number":3,"state":"open","locked":false,"title":"Deployment Improvements","user":{"login":"chaosphere2112","id":718512,"avatar_url":"https://avatars.githubusercontent.com/u/718512?v=3","gravatar_id":"","url":"https://api.github.com/users/chaosphere2112","html_url":"https://github.com/chaosphere2112","followers_url":"https://api.github.com/users/chaosphere2112/followers","following_url":"https://api.github.com/users/chaosphere2112/following{/other_user}","gists_url":"https://api.github.com/users/chaosphere2112/gists{/gist_id}","starred_url":"https://api.github.com/users/chaosphere2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaosphere2112/subscriptions","organizations_url":"https://api.github.com/users/chaosphere2112/orgs","repos_url":"https://api.github.com/users/chaosphere2112/repos","events_url":"https://api.github.com/users/chaosphere2112/events{/privacy}","received_events_url":"https://api.github.com/users/chaosphere2112/received_events","type":"User","site_admin":false},"body":"This pull request puts `vcs.js` about where we need it for VCDAT. There's a bit here, so I'll break it down.\r\n\r\n### Simple changes:\r\n\r\nI created a script \"vcs-server\" that launches the server automatically. I also converted the backend to be installable as a package using setup.py; this also builds the javascript and bundles it in the package, and the server provides a version of the script that is already pointing at the correct URLs. All a user needs to do to use VCS.js is add `<script src=\"http://server.com/scripts/vcs.js\"></script>` to their page, and it'll be available in the `vcs` global variable.\r\n\r\n### Bigger changes:\r\n\r\nSo, this is the controversial change: I dropped ParaViewWeb, and reimplemented the subset that we need using Tornado.\r\n\r\nI did this for a few reasons. A fairly straightforward one is that we have a need for HTTP as well as WebSocket communications (I spent a fair bit of time trying to see if there was any support for running both on a single server in PVW, but couldn't find anything). The reason I believe we need HTTP as well as WebSockets is for client side rendering. It seems like massive overkill to use a WebSocket to make a one-time transfer of data to the client side, and transferring both the array data and the metadata through the same protocol leads to a number of complications (we could serialize the entire array in JSON, but that's extremely bandwidth intensive, re: the very slow client side demo packaged with the previous version). HTTP is a pretty natural fit for solving these; the body of the response is the binary array data (which the browser interprets as an ArrayBuffer), and I used a series of X-Cdms-* headers to communicate the rest of the metadata about the array (shape, datatype, axis information). The result is that the client-side render is actually substantially faster than any of the other rendering methods:\r\n\r\nPackage            | Transfer Mechanism      | Time till image in browser\r\n----------------|------------------------|--------------------------\r\nPlot.ly                 | JSON-encoded Data    | ~16.5 seconds (mostly spent download clt.json from kitware's servers)\r\nPlot.ly                 | ArrayBuffer Encoded    | < .5 seconds\r\nVTKWeb             | WebSocket                    | ~1.5 sec\r\nTornado Socket | WebSocket                    | ~1.2 sec\r\n\r\nThere also appears to be some kind of race condition that's messing things up in PVW. These GIFs show roughly the difference in my experience between PVW and my Tornado server; generally speaking, on my computer PVW will only render a random subset of the 3 plots that it's supposed to be rendering. Every once in a blue moon it will actually render all three.\r\n\r\nParaviewWeb:\r\n\r\n![pvw](https://cloud.githubusercontent.com/assets/718512/19580064/d766d508-96d8-11e6-8dde-96b15a83919c.gif)\r\n\r\nTornado:\r\n\r\n![tornado](https://cloud.githubusercontent.com/assets/718512/19580186/8be8c6ee-96d9-11e6-8444-a6d5eeee7eca.gif)\r\n\r\nThere's also this message:\r\n\r\n![screen shot 2016-10-20 at 2 09 48 pm](https://cloud.githubusercontent.com/assets/718512/19579458/ae4ce57a-96d5-11e6-832f-b860a8943a30.png)\r\n\r\nThis is the server informing you that after 5 minutes of inactivity, it's going to die. I tried setting it to -1 (`AssertionError: -1 is not greater than or equal to 0 seconds`), to 0 (dies immediately), and to 1e20 (`vcs-server: error: argument -t/--timeout: invalid int value: '1e20'`). As far as I can tell, there's no way to not have your server commit suicide at some point.\r\n\r\nAlso, for whatever reason, the PVW click code was dysfunctional:\r\n\r\n![screen shot 2016-10-20 at 2 13 04 pm](https://cloud.githubusercontent.com/assets/718512/19580248/e354475a-96d9-11e6-95f1-4e8f071f7b3a.png)\r\n\r\nI reimplemented the basics of it using Tornado and JS mouse events, proxied over to the vtkRenderWindowInteractor:\r\n\r\n![tornado_click](https://cloud.githubusercontent.com/assets/718512/19580275/12ba9a12-96da-11e6-9936-9f0a50323ad6.gif)\r\n","created_at":"2016-10-20T23:06:10Z","updated_at":"2016-10-20T23:06:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36a921c3c6ece91087f78f28c408c4ad022cab7f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls/3/commits","review_comments_url":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls/3/comments","review_comment_url":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UV-CDAT/vcs-js/issues/3/comments","statuses_url":"https://api.github.com/repos/UV-CDAT/vcs-js/statuses/a432dc258f6debf90e5944f1663ef34e0e7de3d1","head":{"label":"UV-CDAT:easy_deployment","ref":"easy_deployment","sha":"a432dc258f6debf90e5944f1663ef34e0e7de3d1","user":{"login":"UV-CDAT","id":2781444,"avatar_url":"https://avatars.githubusercontent.com/u/2781444?v=3","gravatar_id":"","url":"https://api.github.com/users/UV-CDAT","html_url":"https://github.com/UV-CDAT","followers_url":"https://api.github.com/users/UV-CDAT/followers","following_url":"https://api.github.com/users/UV-CDAT/following{/other_user}","gists_url":"https://api.github.com/users/UV-CDAT/gists{/gist_id}","starred_url":"https://api.github.com/users/UV-CDAT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UV-CDAT/subscriptions","organizations_url":"https://api.github.com/users/UV-CDAT/orgs","repos_url":"https://api.github.com/users/UV-CDAT/repos","events_url":"https://api.github.com/users/UV-CDAT/events{/privacy}","received_events_url":"https://api.github.com/users/UV-CDAT/received_events","type":"Organization","site_admin":false},"repo":{"id":62652583,"name":"vcs-js","full_name":"UV-CDAT/vcs-js","owner":{"login":"UV-CDAT","id":2781444,"avatar_url":"https://avatars.githubusercontent.com/u/2781444?v=3","gravatar_id":"","url":"https://api.github.com/users/UV-CDAT","html_url":"https://github.com/UV-CDAT","followers_url":"https://api.github.com/users/UV-CDAT/followers","following_url":"https://api.github.com/users/UV-CDAT/following{/other_user}","gists_url":"https://api.github.com/users/UV-CDAT/gists{/gist_id}","starred_url":"https://api.github.com/users/UV-CDAT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UV-CDAT/subscriptions","organizations_url":"https://api.github.com/users/UV-CDAT/orgs","repos_url":"https://api.github.com/users/UV-CDAT/repos","events_url":"https://api.github.com/users/UV-CDAT/events{/privacy}","received_events_url":"https://api.github.com/users/UV-CDAT/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UV-CDAT/vcs-js","description":null,"fork":false,"url":"https://api.github.com/repos/UV-CDAT/vcs-js","forks_url":"https://api.github.com/repos/UV-CDAT/vcs-js/forks","keys_url":"https://api.github.com/repos/UV-CDAT/vcs-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UV-CDAT/vcs-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UV-CDAT/vcs-js/teams","hooks_url":"https://api.github.com/repos/UV-CDAT/vcs-js/hooks","issue_events_url":"https://api.github.com/repos/UV-CDAT/vcs-js/issues/events{/number}","events_url":"https://api.github.com/repos/UV-CDAT/vcs-js/events","assignees_url":"https://api.github.com/repos/UV-CDAT/vcs-js/assignees{/user}","branches_url":"https://api.github.com/repos/UV-CDAT/vcs-js/branches{/branch}","tags_url":"https://api.github.com/repos/UV-CDAT/vcs-js/tags","blobs_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UV-CDAT/vcs-js/statuses/{sha}","languages_url":"https://api.github.com/repos/UV-CDAT/vcs-js/languages","stargazers_url":"https://api.github.com/repos/UV-CDAT/vcs-js/stargazers","contributors_url":"https://api.github.com/repos/UV-CDAT/vcs-js/contributors","subscribers_url":"https://api.github.com/repos/UV-CDAT/vcs-js/subscribers","subscription_url":"https://api.github.com/repos/UV-CDAT/vcs-js/subscription","commits_url":"https://api.github.com/repos/UV-CDAT/vcs-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/UV-CDAT/vcs-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/UV-CDAT/vcs-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/UV-CDAT/vcs-js/contents/{+path}","compare_url":"https://api.github.com/repos/UV-CDAT/vcs-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UV-CDAT/vcs-js/merges","archive_url":"https://api.github.com/repos/UV-CDAT/vcs-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UV-CDAT/vcs-js/downloads","issues_url":"https://api.github.com/repos/UV-CDAT/vcs-js/issues{/number}","pulls_url":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls{/number}","milestones_url":"https://api.github.com/repos/UV-CDAT/vcs-js/milestones{/number}","notifications_url":"https://api.github.com/repos/UV-CDAT/vcs-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UV-CDAT/vcs-js/labels{/name}","releases_url":"https://api.github.com/repos/UV-CDAT/vcs-js/releases{/id}","deployments_url":"https://api.github.com/repos/UV-CDAT/vcs-js/deployments","created_at":"2016-07-05T16:30:35Z","updated_at":"2016-07-05T16:31:37Z","pushed_at":"2016-10-20T23:06:10Z","git_url":"git://github.com/UV-CDAT/vcs-js.git","ssh_url":"git@github.com:UV-CDAT/vcs-js.git","clone_url":"https://github.com/UV-CDAT/vcs-js.git","svn_url":"https://github.com/UV-CDAT/vcs-js","homepage":null,"size":1295,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"UV-CDAT:master","ref":"master","sha":"e593f1277de030bbbf9d917e7977f26c5b39dca2","user":{"login":"UV-CDAT","id":2781444,"avatar_url":"https://avatars.githubusercontent.com/u/2781444?v=3","gravatar_id":"","url":"https://api.github.com/users/UV-CDAT","html_url":"https://github.com/UV-CDAT","followers_url":"https://api.github.com/users/UV-CDAT/followers","following_url":"https://api.github.com/users/UV-CDAT/following{/other_user}","gists_url":"https://api.github.com/users/UV-CDAT/gists{/gist_id}","starred_url":"https://api.github.com/users/UV-CDAT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UV-CDAT/subscriptions","organizations_url":"https://api.github.com/users/UV-CDAT/orgs","repos_url":"https://api.github.com/users/UV-CDAT/repos","events_url":"https://api.github.com/users/UV-CDAT/events{/privacy}","received_events_url":"https://api.github.com/users/UV-CDAT/received_events","type":"Organization","site_admin":false},"repo":{"id":62652583,"name":"vcs-js","full_name":"UV-CDAT/vcs-js","owner":{"login":"UV-CDAT","id":2781444,"avatar_url":"https://avatars.githubusercontent.com/u/2781444?v=3","gravatar_id":"","url":"https://api.github.com/users/UV-CDAT","html_url":"https://github.com/UV-CDAT","followers_url":"https://api.github.com/users/UV-CDAT/followers","following_url":"https://api.github.com/users/UV-CDAT/following{/other_user}","gists_url":"https://api.github.com/users/UV-CDAT/gists{/gist_id}","starred_url":"https://api.github.com/users/UV-CDAT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UV-CDAT/subscriptions","organizations_url":"https://api.github.com/users/UV-CDAT/orgs","repos_url":"https://api.github.com/users/UV-CDAT/repos","events_url":"https://api.github.com/users/UV-CDAT/events{/privacy}","received_events_url":"https://api.github.com/users/UV-CDAT/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UV-CDAT/vcs-js","description":null,"fork":false,"url":"https://api.github.com/repos/UV-CDAT/vcs-js","forks_url":"https://api.github.com/repos/UV-CDAT/vcs-js/forks","keys_url":"https://api.github.com/repos/UV-CDAT/vcs-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UV-CDAT/vcs-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UV-CDAT/vcs-js/teams","hooks_url":"https://api.github.com/repos/UV-CDAT/vcs-js/hooks","issue_events_url":"https://api.github.com/repos/UV-CDAT/vcs-js/issues/events{/number}","events_url":"https://api.github.com/repos/UV-CDAT/vcs-js/events","assignees_url":"https://api.github.com/repos/UV-CDAT/vcs-js/assignees{/user}","branches_url":"https://api.github.com/repos/UV-CDAT/vcs-js/branches{/branch}","tags_url":"https://api.github.com/repos/UV-CDAT/vcs-js/tags","blobs_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UV-CDAT/vcs-js/statuses/{sha}","languages_url":"https://api.github.com/repos/UV-CDAT/vcs-js/languages","stargazers_url":"https://api.github.com/repos/UV-CDAT/vcs-js/stargazers","contributors_url":"https://api.github.com/repos/UV-CDAT/vcs-js/contributors","subscribers_url":"https://api.github.com/repos/UV-CDAT/vcs-js/subscribers","subscription_url":"https://api.github.com/repos/UV-CDAT/vcs-js/subscription","commits_url":"https://api.github.com/repos/UV-CDAT/vcs-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/UV-CDAT/vcs-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/UV-CDAT/vcs-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/UV-CDAT/vcs-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/UV-CDAT/vcs-js/contents/{+path}","compare_url":"https://api.github.com/repos/UV-CDAT/vcs-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UV-CDAT/vcs-js/merges","archive_url":"https://api.github.com/repos/UV-CDAT/vcs-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UV-CDAT/vcs-js/downloads","issues_url":"https://api.github.com/repos/UV-CDAT/vcs-js/issues{/number}","pulls_url":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls{/number}","milestones_url":"https://api.github.com/repos/UV-CDAT/vcs-js/milestones{/number}","notifications_url":"https://api.github.com/repos/UV-CDAT/vcs-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UV-CDAT/vcs-js/labels{/name}","releases_url":"https://api.github.com/repos/UV-CDAT/vcs-js/releases{/id}","deployments_url":"https://api.github.com/repos/UV-CDAT/vcs-js/deployments","created_at":"2016-07-05T16:30:35Z","updated_at":"2016-07-05T16:31:37Z","pushed_at":"2016-10-20T23:06:10Z","git_url":"git://github.com/UV-CDAT/vcs-js.git","ssh_url":"git@github.com:UV-CDAT/vcs-js.git","clone_url":"https://github.com/UV-CDAT/vcs-js.git","svn_url":"https://github.com/UV-CDAT/vcs-js","homepage":null,"size":1295,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls/3"},"html":{"href":"https://github.com/UV-CDAT/vcs-js/pull/3"},"issue":{"href":"https://api.github.com/repos/UV-CDAT/vcs-js/issues/3"},"comments":{"href":"https://api.github.com/repos/UV-CDAT/vcs-js/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UV-CDAT/vcs-js/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/UV-CDAT/vcs-js/statuses/a432dc258f6debf90e5944f1663ef34e0e7de3d1"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"commits":9,"additions":788,"deletions":566,"changed_files":24}}
{"actor":{"display_login":"chaosphere2112"}}