Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Issue 8528049: Introduce the constrained network server. (Closed)

Created:
9 years, 1 month ago by DaleCurtis
Modified:
9 years, 1 month ago
CC:
chromium-reviews, hclam+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, acolwell+watch_chromium.org, annacc+watch_chromium.org, pam+watch_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing), ihf+watch_chromium.org, shadi
Visibility:
Public.

Description

Introduce the constrained network server. The CNS allows files to be served under constrained network conditions per the design doc listed in the bug report. Uses CherryPy to handle HTTP processing. See ./cns.py --help, to run: ./cns.py [--port <port>] [--port-range <port-range>] Requests can then be made to: http://<server ip>:<port>/ServeConstrained?f=<file>&latency=...&bandwidth=...&loss=... The server will allocate a port from the preconfigured range and setup constraints on that port. Subsequent requests for the same constraints from the same source ip will result in the constrained port being reused. BUG=104242 TEST=Ran locally. Ran unittests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110458

Patch Set 1 #

Total comments: 32

Patch Set 2 : Fixed code review issues. Added unit tests. #

Total comments: 2

Patch Set 3 : Fixed nits. #

Total comments: 8

Patch Set 4 : Fixed code review issues. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+437 lines, -0 lines) Patch
A media/tools/constrained_network_server/cns.py View 1 2 3 1 chunk +275 lines, -0 lines 0 comments Download
A media/tools/constrained_network_server/cns_test.py View 1 2 3 1 chunk +162 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
DaleCurtis
Early review. No unit tests yet and Shadi is still finishing his scripts. Everything else ...
9 years, 1 month ago (2011-11-15 02:13:37 UTC) #1
Ami GONE FROM CHROMIUM
Mostly nits. http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py File media/tools/constrained_network_server/cns.py (right): http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py#newcode28 media/tools/constrained_network_server/cns.py:28: _DEFAULT_SERVING_PORT = 80 Does this script require ...
9 years, 1 month ago (2011-11-15 17:54:06 UTC) #2
DaleCurtis
http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py File media/tools/constrained_network_server/cns.py (right): http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py#newcode28 media/tools/constrained_network_server/cns.py:28: _DEFAULT_SERVING_PORT = 80 Technically this script doesn't. However shadi's ...
9 years, 1 month ago (2011-11-15 18:46:00 UTC) #3
vrk (LEFT CHROMIUM)
Taking myself off reviewers list since I don't know Python!
9 years, 1 month ago (2011-11-16 01:20:42 UTC) #4
DaleCurtis
PTAL. All issues addressed. http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py File media/tools/constrained_network_server/cns.py (right): http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py#newcode163 media/tools/constrained_network_server/cns.py:163: sanitized_path = os.path.abspath(os.path.join(self._options.www_root, file)) Actually ...
9 years, 1 month ago (2011-11-16 02:17:38 UTC) #5
scherkus (not reviewing)
I am in no way a python guy so I have a few tiny nits ...
9 years, 1 month ago (2011-11-16 02:25:42 UTC) #6
DaleCurtis
http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py File media/tools/constrained_network_server/cns.py (right): http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py#newcode67 media/tools/constrained_network_server/cns.py:67: **kwargs: Constraints to pass into ***TODO*** ConstraintGenerator... On 2011/11/16 ...
9 years, 1 month ago (2011-11-16 02:35:56 UTC) #7
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py File media/tools/constrained_network_server/cns.py (right): http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py#newcode28 media/tools/constrained_network_server/cns.py:28: _DEFAULT_SERVING_PORT = 80 On 2011/11/15 18:46:00, DaleCurtis wrote: > ...
9 years, 1 month ago (2011-11-16 03:11:21 UTC) #8
DaleCurtis
http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py File media/tools/constrained_network_server/cns.py (right): http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py#newcode28 media/tools/constrained_network_server/cns.py:28: _DEFAULT_SERVING_PORT = 80 Done. Used 9000 since layout tests ...
9 years, 1 month ago (2011-11-16 20:20:15 UTC) #9
Ami GONE FROM CHROMIUM
LGTM++ http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py File media/tools/constrained_network_server/cns.py (right): http://codereview.chromium.org/8528049/diff/1/media/tools/constrained_network_server/cns.py#newcode259 media/tools/constrained_network_server/cns.py:259: pa.Cleanup(all_ports=True) > > I don't think that's needed; ...
9 years, 1 month ago (2011-11-16 20:28:26 UTC) #10
scherkus (not reviewing)
LGTM
9 years, 1 month ago (2011-11-17 01:23:18 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/8528049/9001
9 years, 1 month ago (2011-11-17 01:38:10 UTC) #12
commit-bot: I haz the power
9 years, 1 month ago (2011-11-17 06:19:07 UTC) #13
Change committed as 110458

Powered by Google App Engine
This is Rietveld 408576698