[tor-bugs] #21588 [Metrics/Metrics website]: Rewrite the censorship detector used by the Tor Metrics website in Java
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Mar 1 15:53:38 UTC 2017
#21588: Rewrite the censorship detector used by the Tor Metrics website in Java
-------------------------------------+------------------------------
Reporter: karsten | Owner: metrics-team
Type: enhancement | Status: new
Priority: Medium | Milestone:
Component: Metrics/Metrics website | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------+------------------------------
Changes (by iwakeh):
* keywords: metrics-help =>
Comment:
Replying to [ticket:21588 karsten]:
> The censorship detector written by George Danezis in 2011 is the only
part of the Tor Metrics website that is written in Python. We should
consider rewriting it in Java in order to integrate it more closely into
the rest of the Tor Metrics website code. This is also related to #19754.
>
> iwakeh, want to comment on whether this makes sense or not, before
somebody else comes and picks this up?
Sure.
>
> (The following thoughts depend on whether we reach consensus in the
metrics team that this is even a good idea.)
It is definitely a good idea to remove another language and the necessity
for calling scripts.
>
> [snip]
Steps 1 and 2 are for getting to know the current code (and there is a lot
not used in MetricsWeb); required reading is the
[https://research.torproject.org/techreports/detector-2011-09-09.pdf Tech
Report] describing the detector.
> Step three would be to look at required external dependencies to rewrite
the remaining code in Java. I haven't looked at all at this yet, so maybe
this is doable without adding external dependencies, which would be best.
But if external dependencies are necessary, maybe there's something in
Apache Commons that we can use here. In any case, adding external
dependencies requires discussion on this ticket.
For fitting a normal distribution and calculating percentiles for normal
and poisson distribution etc. a library will be necessary. I know that
commons-math offers some functionality in that direction, but it might not
provide fitting a normal distribution. So, quite some research necessary
here. Requirements for a useful library:
* pure java
* no further dependencies
* and in debian stable.
It might be even necessary to tweak the detector calculations.
>
> Step four would be to do the rewrite and to try out that it produces
roughly the same results (we're cutting off decimal places, for example).
There's a guide on coding style
[wiki:org/teams/MetricsTeam/MetricsJavaStyleGuide#CodingStyle here].
A rough description of the design should be discussed here first to ensure
encapsulation, object oriented design, and the other goals we listed in
the MetricsJavaStyle guide (not only CodingStyle), i.e., step 4a) rough
design suggestion, step 4b) design review, step 4c) coding.
>
> Step five would be to review the new code and integrate it into metrics-
web.
This and step 4 depend quite a bit on redesigning the entire MetricsWeb.
>
> All in all, I could imagine that steps 1 to 4 might be an interesting
task for a new volunteer. Optimistically adding the `metrics-help`
keyword.
>
> But let's first discuss whether this rewrite makes sense, or whether
there's a better plan to do it!
Because of 'let's first discuss' I would tend to remove "metrics-help". I
think metrics-help should be tasks that are clearly defined and can be
taken up by a developer without previous experience in Metrics stuff. So,
we should wait and then add metrics-help to more clearly defined tasks
derived from this.
(Hope you don't mind me removing the tag!)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21588#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list