[tor-bugs] #15844 [Onionoo]: Develop database schema to support Onionoo's search parameter efficiently

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue May 19 20:36:52 UTC 2015


#15844: Develop database schema to support Onionoo's search parameter efficiently
-----------------------------+-----------------
     Reporter:  karsten      |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  normal       |  Milestone:
    Component:  Onionoo      |    Version:
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+-----------------

Comment (by leeroy):

 Great thanks for clearing that up. I had resorted to reading the multiple-
 spec-documents and Onionoo code to make sure my understanding of the data
 is correct. No big deal though.

 -

 > [.. ..] converting partial fingerprints between hex and base64 might be
 problematic because of 4 vs. 6 bits per character. I'd say never mind the
 storage and just put in everything you want into the database.

 If the function index is computed on the fingerprint column, then prefix
 search should be identical with the right plan. Nevertheless, as you say,
 if storing all three is an advantage for query-time, that will be
 preferred to minimalism.

 -

 >Ordering matters if users ask for a specific ordering using the `order`
 parameter.  Of course, if they don't pass that, you're free to return
 results in whatever order you want.

 That's good to hear. By strictness, I wasn't sure about cases where
 pgnosql returns an entity's key:value pairs out of order. Suppose I get
 key, and value sets, defining ip-extra-info for a relay, like the optional
 ip-based data (geolocation,rdns,as). I would like to ensure I don't cause
 havoc if the ordering (within ordered responses) were unexpected.
 Similarly, appending new key:value pairs is less costly than insertion. If
 this isn't considered ideal, I'll use alternatives.

 -

 >Hope that helps!  Thanks for working on this!

 Don't sweat it. Helping you is helping me ;)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15844#comment:21>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list