zulip/scripts/lib
Anders Kaseorg ea6934c26d dependencies: Remove WebSockets system for sending messages.
Zulip has had a small use of WebSockets (specifically, for the code
path of sending messages, via the webapp only) since ~2013.  We
originally added this use of WebSockets in the hope that the latency
benefits of doing so would allow us to avoid implementing a markdown
local echo; they were not.  Further, HTTP/2 may have eliminated the
latency difference we hoped to exploit by using WebSockets in any
case.

While we’d originally imagined using WebSockets for other endpoints,
there was never a good justification for moving more components to the
WebSockets system.

This WebSockets code path had a lot of downsides/complexity,
including:

* The messy hack involving constructing an emulated request object to
  hook into doing Django requests.
* The `message_senders` queue processor system, which increases RAM
  needs and must be provisioned independently from the rest of the
  server).
* A duplicate check_send_receive_time Nagios test specific to
  WebSockets.
* The requirement for users to have their firewalls/NATs allow
  WebSocket connections, and a setting to disable them for networks
  where WebSockets don’t work.
* Dependencies on the SockJS family of libraries, which has at times
  been poorly maintained, and periodically throws random JavaScript
  exceptions in our production environments without a deep enough
  traceback to effectively investigate.
* A total of about 1600 lines of our code related to the feature.
* Increased load on the Tornado system, especially around a Zulip
  server restart, and especially for large installations like
  zulipchat.com, resulting in extra delay before messages can be sent
  again.

As detailed in
https://github.com/zulip/zulip/pull/12862#issuecomment-536152397, it
appears that removing WebSockets moderately increases the time it
takes for the `send_message` API query to return from the server, but
does not significantly change the time between when a message is sent
and when it is received by clients.  We don’t understand the reason
for that change (suggesting the possibility of a measurement error),
and even if it is a real change, we consider that potential small
latency regression to be acceptable.

If we later want WebSockets, we’ll likely want to just use Django
Channels.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-01-14 22:34:00 -08:00
..
third install-yarn: Fix buggy status check for the signature. 2018-04-09 15:09:37 -07:00
__init__.py
build-pgroonga pgroonga: Upgrade from 2.1.6 to 2.1.8. 2019-05-05 17:52:32 -07:00
certbot-maybe-renew Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
check-upstart ci: Move backend and production tests to Ubuntu 16.04 (xenial). 2019-05-24 17:07:15 -07:00
clean-unused-caches scripts: Remove unused imports. 2019-02-02 17:02:58 -08:00
clean_emoji_cache.py typing: Remove now-unnecessary conditional import. 2019-07-29 15:18:22 -07:00
clean_node_cache.py typing: Remove now-unnecessary conditional import. 2019-07-29 15:18:22 -07:00
clean_venv_cache.py typing: Remove now-unnecessary conditional import. 2019-07-29 15:18:22 -07:00
create-production-venv parse_os_release: Use /etc/os-release always; remove DISTRIB_FAMILY. 2019-08-29 17:30:20 -07:00
create-thumbor-venv parse_os_release: Use /etc/os-release always; remove DISTRIB_FAMILY. 2019-08-29 17:30:20 -07:00
email-mirror-postfix email-mirror-postfix: Clean up type ignores. 2019-08-09 16:39:16 -07:00
hash_reqs.py typing: Remove now-unnecessary conditional import. 2019-07-29 15:18:22 -07:00
install prod install: Use ID_LIKE to help select os family. 2020-01-07 13:25:25 -08:00
install-node install-node: Upgrade Node 12.11.1 to 12.13.0, Yarn 1.19.0 to 1.19.1. 2019-11-11 16:26:31 -08:00
node_cache.py node_cache: Don’t retry copying node_modules; let yarn do its thing. 2019-10-29 12:30:28 -07:00
pythonrc.py pythonrc: Clean up type ignores. 2019-08-09 16:39:16 -07:00
queue_workers.py
setup-apt-repo setup-apt-repo: Install groonga-keyring. 2019-09-23 16:01:39 -07:00
setup-apt-repo-debathena Use #!/usr/bin/env for bash shebangs. 2018-12-17 17:21:08 -08:00
setup-yum-repo setup-yum-repo: Add prod flag for doing IUS install on CentOS. 2019-01-05 15:49:02 -08:00
setup_path_on_import.py setup_path_on_import: Always make sure zulip-py3-venv is activated. 2019-07-18 14:21:04 -07:00
setup_venv.py setup_venv: Use pip install --require-hashes for better security. 2019-10-06 15:21:18 -07:00
unpack-zulip scripts/lib/unpack-zulip: Avoid shelling out for rm, mv, mkdir, ln. 2018-11-28 17:48:23 -08:00
upgrade-zulip scripts: Remove unused imports. 2019-02-02 17:02:58 -08:00
upgrade-zulip-from-git upgrade-zulip-from-git: Fetch tags to make version info more useful. 2019-06-23 23:10:47 -07:00
upgrade-zulip-stage-2 dependencies: Remove WebSockets system for sending messages. 2020-01-14 22:34:00 -08:00
zulip_tools.py mypy: Upgrade from 0.730 to 0.740. 2019-11-13 12:38:45 -08:00