| Commit message (Collapse) | Author | Age |
| ... | |
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
The NodeDataWriter and DetailsDataWriter did very similar things. They
processed various descriptors and performed GeoIP and rDNS lookups to
learn the latest status of a relay or bridge for summary and details
documents. Merging these classes makes sense, because we can start rDNS
lookups much earlier which then run in the background.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
rndm says: "There was a bug in the opera browser that misplaced the
"returns a x" on each request method. I changed the css from
"float:right" to a "position: absolute; right: 0" that does the same.
It now looks the same on firefox, chromium and opera."
Thanks, rndm!
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The resource servlet is now only responsible for handling web requests,
and all the hard work of filtering results and putting together responses
from previously stored JSON files is done by the new response builder.
This will make it easier in the future to switch to a database.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far, we deleted details, bandwidth, and weights documents when a relay
or bridge went offline for at least 7 days. The reason was that we
wouldn't return documents for these relays or bridges anyway, and once the
relay or bridge comes back online, we'd write a new document from our
status files.
Very soon we'll want to support searching for relays and bridges that have
been offline for more than 7 days, and we'll also want to serve their
details, bandwidth, and weights documents. We need to stop deleting them.
Related to this, we now write new details, bandwidth, and weights
documents for all relays and bridges, regardless of whether they were
running in the last 7 days.
This step also removes some dependencies in the code which may allow us to
parallelize more stuff in the future.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Spotted by Sebastian.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Without specifying a file encoding, Java uses the system default, which
may be UTF-8 on Linux systems. But MaxMind's files all use ISO-8859-1.
The effect is that our details files may contain incorrect lines like:
"as_name":"Servi\uFFFDos de Comunica\uFFFD\uFFFDo S.A.",
which should be:
"as_name":"Servi\u00C1os de Comunica\u00C1\u201Eo S.A.",
|
| | |
|
| |
|
|
|
|
|
| |
In particular, if our data is more than 6 hours old, respond with 500
Internal Server Error to all requests, because someone should investigate
the problem. That's much better than serving stale data and either nobody
noticing or relying on clients to check timestamps.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Implements #5255.
|
| |
|
|
|
| |
"Things you find in server logs when you're looking for something entirely
unrelated."
|
| | |
|
| | |
|
| |
|
|
|
| |
Instead, store advertised bandwidths in weights status files. Prepares
using a parse history for server descriptors.
|
| |
|
|
|
|
|
| |
Instead of parsing all server descriptors of the past 72 hours, we now
cache the most recent server descriptor parts for details documents.
Same applies to bridge pool assignments. Prepares using a parse history
for server descriptors.
|
| |
|
|
|
| |
There was a bug in one of the previous commits which made us write NaN
values to weights status files. Remove those lines when reading files.
|
| | |
|
| | |
|
| |
|
|
|
| |
So far, we parsed the empty string as single flag called "". This is a
bug. We need to omit the "flags" field in this case.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We say that a bridge is "running" if it's contained in the bridge network
status, but it also needs the "Running" flag.
This worked fine for relays, because only running relays are contained in
the consensus, but bridge network statuses may contain non-running
bridges.
We should require the "Running" flag for both relays and bridges, just in
case we fall back to a consensus method that contains non-running relays.
Fixes #9198.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Introduce a new document type hierarchy for internal text-based status
documents (*Status) and JSON-formatted output documents (*Document).
Prepares moving all formatting and parsing code to DocumentStore or
Document subtypes, so that *Writer classes won't have to worry about
document formats anymore.
- Rename Node to NodeStatus and make it handle its own formatting and
parsing. DocumentStore now returns NodeStatus objects instead of one
large summary status documents containing all nodes. Prepares moving to
a database design where each NodeStatus object will have its own
database entry. DocumentStore still reads and writes a single summary
status document, so that file formats don't change, but keeps a local
NodeStatus cache in memory and writes this file to disk before exiting.
- Don't share CurrentNodes code between back-end and front-end. Move
back-end-only functionality to new NodeDataWriter and front-end-only
functionality to ResourceServlet.
- Rename DetailDataWriter to DetailsDataWriter for consistency with other
document types.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add new DescriptorSource class that abstracts away details of
configuring metrics-lib's DescriptorReader and handling parse
histories. This moves descriptor file paths to a single place and
makes it easier to test classes that process descriptors.
- Add new DocumentStore class that abstracts away storing,
retrieving, listing, and deleting files produced as output of
processing descriptors. Allows for easier testing of classes that
store results from parsing descriptors, and prepares exchanging
file system storage with a database.
- Write parse history file to disk after all new descriptors are
processed, rather than have the descriptor reader do that after
providing the last descriptor. Avoids edge cases where processing
breaks and we don't re-process descriptors in the next execution
because we think we already processed them last time.
- When overwriting files, write contents to temporary files, delete
original files, and rename written temporary file to original file.
Minimizes effects of concurrent executions changing the same set of
files.
- Print out statistics of parsed descriptors and document store
activity. Can help figuring out performance bottlenecks in the
future.
|
| | |
|
| |
|
|
|
| |
It's yet unclear what causes the back-end to write corrupt details files,
but the front-end shouldn't serve corrupt responses in any case.
|
| | |
|
| |
|
|
|
|
|
|
| |
Right now, relays and bridges have exactly one IPv4 address and at most
one IPv6 address. Due to alphanumerical ordering the primary OR address
is first in the OR address array anyway. But the requirements to IPv4 or
IPv6 addresses might change in the future, so make sure the ordering stays
this way.
|
| | |
|
| | |
|
| | |
|
| | |
|