[metrics-bugs] #30255 [Core Tor/sbws]: Add additional bandwidth file headers in sbws 1.2
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Apr 29 07:39:04 UTC 2019
#30255: Add additional bandwidth file headers in sbws 1.2
---------------------------+-----------------------------------
Reporter: teor | Owner: (none)
Type: task | Status: new
Priority: Medium | Milestone: sbws: 1.2.x-final
Component: Core Tor/sbws | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
---------------------------+-----------------------------------
Comment (by karsten):
Replying to [comment:7 juga]:
> Replying to [comment:5 karsten]:
> > irl and I discussed the topic of additional bandwidth headers as part
of #30216, where we're trying to write a parser for these files.
>
> i'm unfamiliar with metrics ecosystem and i thought that implementing
the parser in stem (#29056, #30160) would avoid you to re-implementing for
metrics. Is there a way to avoid that?.
Nope, there's no way to avoid that. The deployed Tor Metrics services are
all implemented in Java, and we're currently starting to re-implement
parts in Python. There will be a transition phase in which we'll need to
write parsers in Java and Python.
> > When reading this ticket and its subtickets I'm slightly concerned
that you might consider adding spaces to new header lines.
>
> No, we should not add spaces. I made the mistake of writing the url of a
wip branch in a ticket that should not have been reviewed yet.
Not sure which URL or branch you refer to, but glad to hear that you agree
about the spaces.
> > For example, operating system and contact information sound like they
might contain spaces.
>
> For the operating system, this is what the command suggested by teor
would generate: `Linux-4.9.0-8-amd64-x86_64-with-glibc2.7`. It doesn't
contain space.
Okay!
> For the contact information, teor said:
>
> > Let's not specify another unstructured contact string, please.
>
> And imo, it should just be an email address, if we add contact
information.
I'll leave this to you. I mostly wanted to know about the spaces, because
that's what affects me when parsing the format.
> > But as far as I see it, that means trouble! One reason is that
`bandwidth-file-headers` in dir-spec doesn't permit spaces in `KeyValue`
parts, so that it wouldn't be possible to copy over header lines to the
vote.
> >
> > Does this make sense?
>
> Yes
Cool!
> > In fact, if it does, would you mind clarifying in the spec that header
lines always have the format `HeaderLine ::= KeyValue NL`? That would also
simplify the parser, because we'd then be able to distinguish header and
relay lines by the number of space-separated `KeyValue` elements.
>
> Hmm, that makes sense, but it's not true for the first line `Timestamp
NL`. Maybe we can just clarify that.
Yes, I think it should be possible to clarify that. After all, that's a
special line anyway.
Thanks a lot!
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30255#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the metrics-bugs
mailing list