#20405: create metrics-tools with all of the index.json processing code as first content ---------------------------------+----------------------------------- Reporter: iwakeh | Owner: karsten Type: enhancement | Status: needs_information Priority: Medium | Milestone: metrics-lib 2.0.0 Component: Metrics/metrics-lib | Version: Severity: Normal | Resolution: Keywords: | Actual Points: Parent ID: | Points: Reviewer: | Sponsor: ---------------------------------+----------------------------------- Changes (by karsten):
* status: new => needs_information Comment: I gave this some more thoughts and am unconvinced that we need another library for index.json processing or similar code. Let's consider index.json processing here, because we already have that code. The main purpose of extracting all code related to index.json production/consumption and putting it in a single place would be that we can change it in a single place quite easily. And we can test it more easily. Agreed, that would be useful. But let's take a closer look at how much overlap there's between the code in CollecTor and in metrics-lib: - CollecTor converts a directory tree to Java instances, serializes those to JSON, and writes the resulting index.json string to disk. - metrics-lib downloads the index.json file from a remote server, deserializes it to Java instances, and downloads contained files. The only code that could be shared here is the specification how Java instances are serialized to JSON and back. That's not really much code, maybe a few dozen lines of code. That's not nothing, but it's also hardly significant. But my main concern is that we'd create yet another library that makes it yet a bit harder for new contributors to see the big picture. Maybe we'll need such a library in the future, but I don't see how we're there yet. Changing status to needs_information, in case I missed something important here. But if not, I'd say let's close as wontfix. -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20405#comment:4> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online _______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs