<div dir="ltr">On Fri, Oct 11, 2013 at 12:00 PM, Karsten Loesing <span dir="ltr"><<a href="mailto:karsten@torproject.org" target="_blank">karsten@torproject.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Kostas,<br>
<br>
should we move this thread to tor-dev@?<br></blockquote><div><br></div><div>Hi Karsten!</div><div><br></div><div>sure.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


>From our earlier conversation about your GSoC project:<br>
> In particular, we should discuss how to integrate your project into<br>
> Onionoo.  I could imagine that we:<br>
><br>
>  - create a database on the Onionoo machine;<br>
>  - run your database importer cronjob right after the current Onionoo<br>
> cronjob;<br>
>  - make your code produce statuses documents and store them on disk,<br>
> similar to details/weights/bandwidth documents;<br>
>  - let the ResourceServlet use your database to return the<br>
> fingerprints to return documents for; and<br>
>  - extend the ResourceServlet to support the new statuses documents.<br>
><br>
> Maybe I'm overlooking something and you have a better plan?  In any<br>
> case, we should take the path that implies writing as little code as<br>
> possible to integrate your code in Onionoo.<br>
<br>
Let me know what you think!<br></blockquote><div><br></div><div>Sounds good. Responding to particular points:</div><div><br></div><div>>  - create a database on the Onionoo machine;<br>>  - run your database importer cronjob right after the current Onionoo<br>

> cronjob;<br></div><div><br></div><div>These should be no problem and make perfect sense. It's always best to use raw SQL table creation routines to make sure the database looks exactly like the one on the dev machine I guess (cf. using SQLAlchemy abstractions to do that (I did that before)).</div>

<div><br></div><div>Current SQL script to do that is at [1]. I'll look over it. For example, I'd (still) like to generate some plots showing the chances of two fingerprints having the same substring (this is for the intermediate fingerprint table.) (One axis would be substring length, another would be the possibility in (portions of) %.) As of now, we still use substr(fingerprint, 0, 12), and it is reflected in the schema.</div>

<div><br></div><div>Overall though, no particular snags here.</div><div><br></div><div>>  - make your code produce statuses documents and store them on disk,<br>> similar to details/weights/bandwidth documents;<br>
</div>
<div><br></div><div>Right, so if we are planning to support all V3 network statuses for all fingerprints, how are we to store all the status documents? The idea is to preprocess and serve static JSON documents, correct (as in the current Onionoo)? (cf. the idea of simply caching documents: if we serve a particular status document, it gets cached, and depending on the query parameters (date range restriction, e.g.) it may be set not to expire at all.)</div>

<div><br></div><div>Or should we try and actually store all the statuses (the condensed status document version [2], of course)?</div><div><br></div><div>>  - let the ResourceServlet use your database to return the<br>

> fingerprints to return documents for; and<br>>  - extend the ResourceServlet to support the new statuses documents.<br></div><div><br></div><div>Sounds good. I assume you are very busy with other things as well, so ideally maybe you had in mind that I could try and do the Java part? :) Though, since you are much more familiar with (your own) code, you could probably do it faster than me. Not sure.</div>

<div>Any particular technical issues/nuances here (re: ResourceServlet)?</div><div><br></div><div>cheerio</div><div>Kostas.</div><div><br></div><div>[1]: <a href="https://github.com/wfn/torsearch/blob/master/db/db_create.sql">https://github.com/wfn/torsearch/blob/master/db/db_create.sql</a></div>

<div>[2]: <a href="https://github.com/wfn/torsearch/blob/master/docs/onionoo_api.md#network-status-entry-documents">https://github.com/wfn/torsearch/blob/master/docs/onionoo_api.md#network-status-entry-documents</a></div>

<div>(e.g. <a href="http://ts.mkj.lt:5555/statuses?lookup=9695DFC35FFEB861329B9F1AB04C46397020CE31&condensed=true">http://ts.mkj.lt:5555/statuses?lookup=9695DFC35FFEB861329B9F1AB04C46397020CE31&condensed=true</a> )</div>

</div></div></div>