danwent / Perspectives

Perspectives Firefox Extension
http://perspectives-project.org
66 stars 19 forks source link

Continue to query after first failure #107

Closed PRabahy closed 10 years ago

PRabahy commented 10 years ago

Right now in the firefox plugin, it appears that the plugin will stop querying notaries on the first failure. If one of the servers is down, that can lead to a false positive.

I have not checked the source, but observed this behavior because perspectives1.networknotary.org is down right now. When I clicked on the "view notary results" button most of the grid (perspectives2-9) showed up blank. I then removed perspectives1.networknotary.org from the list of notary servers and the entire grid filled with data.

daveschaefer commented 10 years ago

Hello! Thank you for reporting this.

So the 'networknotary.org' notaries are running a very old version and configuration of the server software. They have a hard time keeping up with demand and often return HTTP 500 error codes rather than notary results. When this happens their lines will appear as white or blank in the results list. However, re-querying the notaries can often lead to a better response through sheer luck.

Perspectives actually does continue to query notaries after the first failure. It will try each notary in the list three times before giving up (for that query). My guess is that you simply got a bad response during your first query but a good response during the second one. In your results do you get responses from the heimdal or nine-eyes notaries? Those two are running a newer version of the server software and should always respond.

The networknotary.org machines will also have a better rate of replies at different times of day, as the scanning process they run twice daily slows down the web server (newer versions of the software do not have that problem).

We have plans to upgrade the notary machines in the near future. After the upgrade responses should always return normally.

In the meantime I have removed notary1 from the default list until we can get it back online. That should improve everyone's response times.

Does that make sense?

Thanks for reporting this - it is good to hear the feedback.

PRabahy commented 10 years ago

What you say makes sense, but does not match what I am/was observing. I was seeing that once there was 1 white/blank line all the following rows would also show up blank.

This could be a side effect of high load on all the servers simultaneously. All clients are configured with the same default list, so as one gets busy they all get busy.

For myself I have replaced all the default servers with custom servers that I found. Since I made that change, everything appears to be working well for me.

daveschaefer commented 10 years ago

This could be a side effect of high load on all the servers simultaneously. All clients are configured with the same default list, so as one gets busy they all get busy.

This would be my guess also, but I'm definitely willing to look into it. Let me know if you're able to easily reproduce this, and I'll take another look at the code and tests.

Were you using the heimdal.herokuapp.com or nine-eyes.herokuapp.com notaries when you saw this happen? Do you remember if those two notaries had result lines?

PRabahy commented 10 years ago

Ok, I did some more tests. Looks like (right now) none of the networknotary.org servers are responding, but I can ping them from the command line. nine-eyes and heimdal seem responsive all the time.

perspectives perspectives2 perspectives3 perspectives4

daveschaefer commented 10 years ago

Thanks for checking! Do you remember if heimdal and nine-eyes were included in your list and returning responses when you first reported this?

The other thing might be: Perspectives sorts the replies so that notaries who did not reply are on the bottom. If you got no replies from any notary that might make it seem like the client was stopping.

ghost commented 10 years ago

Could you reproduce this behaviour? I didn't actually check it but I couldn't notice any of the mentioned behaviour while working on the querying functionality and I too think this is due to the sorting. => Close?

PRabahy commented 10 years ago

I would say close it. I haven't been able to reproduce the behavior, and I believe that I was just unaware of the sorting.

daveschaefer commented 10 years ago

Hey @PRab , thanks for reporting this all the same. I have created ticket #127 to sort the results alphabetically be notary name. Hopefully that will make things more clear in the future.

Cheers!