<div dir="ltr"><div>Hi Karsten</div><div><br></div><div>Another thought on the value of Tor shiny server</div><div><br></div>Updating metrics is just the start for a shiny server.   The big benefit is enabling a Tor data warehouse for privacy intelligence.      I'm willing to do the metrics work for the oportunity to implement a privacy warehouse. <div><br></div><div>Worth mentioning again the benefit of maintaining current Debian R packages --  changes could evolve into a big can of worms with no apparent upside. </div><div><br></div><div>Fyi & Cheers,</div><div>John</div><div><br></div><div><br><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 1, 2017 at 5:23 AM, Karsten Loesing <span dir="ltr"><<a href="mailto:karsten@torproject.org" target="_blank">karsten@torproject.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi John, please give me another day or four (after the weekend) to<br>
figure out the best way forward.  Karsten<br>
<br>
<br>
On 29.05.17 18:29, John Williams wrote:<br>
> followup thought .... I know that deploying a shiny server has not been<br>
> your priority, but, replacing the 26 plots with shiny apps will sidestep<br>
> the Debian-R limitation issue , as shiny server runs its own instance of R<br>
> and won't affect legacy code running on the Debian R instance  ... a far<br>
> better solution, IMO, than updating R code with outdated R functions ....<br>
><br>
> On Mon, May 29, 2017 at 9:01 AM, Karsten Loesing <<a href="mailto:karsten@torproject.org">karsten@torproject.org</a>><br>
> wrote:<br>
><br>
>> Hi John,<br>
>><br>
>> On 29.05.17 13:35, John Williams wrote:<br>
>>> Hi Karsten<br>
>>><br>
>>> The modern R tool chain  has the tidyverse<br>
>>> <<a href="https://blog.rstudio.org/2016/09/15/tidyverse-1-0-0/" rel="noreferrer" target="_blank">https://blog.rstudio.org/<wbr>2016/09/15/tidyverse-1-0-0/</a>> as it core.  The<br>
>>> tidyverse library is a convenience library for installing and loading the<br>
>>> core set of R packages that comprise the tidyverse - ggplot2, dplyr,<br>
>> tidyr,<br>
>>> readr, purrr & tibble. A dozen other packages are installed but not<br>
>>> explicitly loaded by tidyverse.<br>
>>><br>
>>> A high rate of R package innovation currently exists within & beyond<br>
>>> the tidyverse (e.g., the shiny tool chain) and it would be difficult to<br>
>>> exclude CRAN <<a href="https://cran.r-project.org/" rel="noreferrer" target="_blank">https://cran.r-project.org/</a>>-<wbr>compliant packages from use.<br>
>>><br>
>>> I have high confidence in the people & motivations<br>
>>> <<a href="https://rviews.rstudio.com/2016/10/12/interview-with-j-j-allaire/" rel="noreferrer" target="_blank">https://rviews.rstudio.com/<wbr>2016/10/12/interview-with-j-j-<wbr>allaire/</a>><br>
>> behind<br>
>>> the tidyverse & shiny tool chains.<br>
>>><br>
>>> Speaking of shiny, a shiny server<br>
>>> <<a href="https://www.rstudio.com/products/shiny/shiny-server" rel="noreferrer" target="_blank">https://www.rstudio.com/<wbr>products/shiny/shiny-server</a>> installed in the<br>
>> Tor<br>
>>> metrics subnet will enable rapid innovation in Tor metrics. Instead of<br>
>>> creating plot code to called by javascript, we'll create interactive<br>
>> shiny<br>
>>> apps linked by iframe,  and/or standalone, data-centric web apps, just<br>
>>> using R.<br>
>><br>
>> Can you elaborate on that?  How would we use Shiny Server without<br>
>> JavaScript?  (I'm not asking, because I think it's impossible.  I'm<br>
>> asking because I haven't looked at all the details there and am curious.)<br>
>><br>
>>> My library of Tor analytics is small but growing:<br>
>>><br>
>>> Exit Nodes <<a href="http://rpubs.com/johnbwilliams/nodes" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/nodes</a>><br>
>>> Network Size <<a href="http://rpubs.com/johnbwilliams/refactor" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/refactor</a>><br>
>>> Network Size Delta <<a href="http://rpubs.com/johnbwilliams/network_size_delta" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/network_size_<wbr>delta</a>><br>
>>> hidserv-descs-per-hsdir<br>
>>> <<a href="http://rpubs.com/johnbwilliams/hidserv-descs-per-hsdir" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/hidserv-descs-<wbr>per-hsdir</a>><br>
>>><br>
>>> This is all well and good but pales in comparison to what could be done<br>
>> in<br>
>>> Tor Metrics with an analytics (shiny) server.<br>
>>><br>
>>> I see that a local cloud service provider, with whom I have done business<br>
>>> from time to time, is hosting a Tor exit address.  I was thinking that<br>
>> the<br>
>>> Project could make a business case to this provider's management for<br>
>>> hosting a shiny server for Tor metrics.<br>
>>><br>
>>> Yes, it is possible but not desirable to revert to base R functions from<br>
>>> readr - a core package of the tidyverse.  I'll do that as requested.<br>
>><br>
>> I can understand that going back to base functions is a bit painful.  My<br>
>> main goal here is to start making improvements as soon as possible.  I<br>
>> think it would take some time to get everyone involved in dependencies<br>
>> on Tor hosts to make a decision here, and I'd rather want to postpone<br>
>> that and start coding and reviewing.<br>
>><br>
>> Two ideas:<br>
>><br>
>>  - We include our own version of a read_csv that internally uses R base<br>
>> functions to do the job and that we can later replace by what's in readr.<br>
>><br>
>>  - We try to get readr into Debian backports.  A Debian developer told<br>
>> me that it's not that difficult to do that, and he might help with the<br>
>> process.  (We could even go one step further and try to get tidyverse<br>
>> into Debian backports, but that might be a bigger project.)<br>
>><br>
>> I think my preference would be the first option, because that's likely<br>
>> the quickest way to get the code updated.  What do you think?<br>
>><br>
>>> Cheers,<br>
>>><br>
>>> John<br>
>><br>
>> All the best,<br>
>> Karsten<br>
>><br>
>><br>
>>><br>
>>> On Mon, May 29, 2017 at 3:12 AM, Karsten Loesing <<a href="mailto:karsten@torproject.org">karsten@torproject.org</a><br>
>>><br>
>>> wrote:<br>
>>><br>
>>>> Hi John,<br>
>>>><br>
>>>> On 26.05.17 05:02, John Williams wrote:<br>
>>>>> something like this?<br>
>>>>><br>
>>>>> refactor of network size plot <<a href="http://rpubs.com/johnbwilliams/refactor" rel="noreferrer" target="_blank">http://rpubs.com/<wbr>johnbwilliams/refactor</a><br>
>>><br>
>>>><br>
>>>> Looks great!  A lot shorter and clearer than before.<br>
>>>><br>
>>>> By the way, did you change that code after posting here?  I remember<br>
>>>> seeing `library(tidyverse)` in the original version, which I couldn't<br>
>>>> find in Debian stable or backports.<br>
>>>><br>
>>>> The current code doesn't contain `library(tidyverse)` anymore, but it<br>
>>>> has `library(readr)` which I couldn't find in Debian stable or backports<br>
>>>> either.<br>
>>>><br>
>>>> The other libraries are all available in Debian stable or backports as<br>
>>>> far as I can see.<br>
>>>><br>
>>>> We're trying to depend only on Debian packages for anything running on<br>
>>>> the server.  This is not an absolute requirement, and we might not keep<br>
>>>> it up anyway if we ever switch to a Shiny server.  But for the moment it<br>
>>>> would be great if we could keep this requirement.  Or at least we<br>
>>>> shouldn't give up on it too easily.<br>
>>>><br>
>>>> Do you think you can change the code to avoid `library(readr)`?<br>
>>>><br>
>>>> Thanks!<br>
>>>><br>
>>>> All the best,<br>
>>>> Karsten<br>
>>>><br>
>>>><br>
>>>>> On Wed, May 24, 2017 at 7:57 PM, David Fifield <<a href="mailto:david@bamsoftware.com">david@bamsoftware.com</a>><br>
>>>>> wrote:<br>
>>>>><br>
>>>>>> On Wed, May 24, 2017 at 07:28:39PM -0400, John Williams wrote:<br>
>>>>>>> Thanks, Karsten, but the direct links to CSV files are not working -<br>
>>>> get<br>
>>>>>>> Oops! Something went wrong here! We encountered a 404 Not Found when<br>
>>>>>> processing<br>
>>>>>>> your request!<br>
>>>>>><br>
>>>>>> The URLs were missing a "/stats".<br>
>>>>>><br>
>>>>>> <a href="https://metrics.torproject.org/stats/servers.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/servers.csv</a><br>
>>>>>> <a href="https://metrics.torproject.org/stats/bandwidth.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/bandwidth.csv</a><br>
>>>>>> <a href="https://metrics.torproject.org/stats/torperf-1.1.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/torperf-1.1.csv</a><br>
>>>>>> <a href="https://metrics.torproject.org/stats/connbidirect2.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/connbidirect2.csv</a><br>
>>>>>> <a href="https://metrics.torproject.org/stats/advbwdist.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/advbwdist.csv</a><br>
>>>>>> <a href="https://metrics.torproject.org/stats/hidserv.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/hidserv.csv</a><br>
>>>>>> <a href="https://metrics.torproject.org/stats/webstats.csv" rel="noreferrer" target="_blank">https://metrics.torproject.<wbr>org/stats/webstats.csv</a><br>
>>>>>><br>
>>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>><br>
>><br>
>><br>
>><br>
><br>
<br>
<br>
</blockquote></div><br></div>