3 ms·
> Web standards (JSON-LD, microdata, RDFa) are inefficient, since you have to download the entire HTML to find a particular piece of data like a phone number.
by lolinder 5y ago
> Web standards (JSON-LD, microdata, RDFa) are inefficient, since you have to download the entire HTML to find a particular piece of data like a phone number.
You might have picked a bad demo project to show off the efficiency of NUM. It takes me 58 requests and (on my very fast connection) 5.3 seconds to download all the information for Barclays. Downloading a JSON blob with all the data for Barclays, parsing it, and displaying it, would take a fraction of the time.
Sure, NUM might be great if you knew ahead of time exactly which DNS record the user would need, but most cases where something like this would be helpful I'd rather see a complete list of all contact information so I can make the correct choice given all the options. Are there use cases you've thought of where the application would know exactly which DNS record to load and display, rather than displaying an index the way you do with companydirectory.uk?
- elliottinvent 5y ago> You might have picked a bad demo project to show off the efficiency of NUM. It takes me 58 requests and (on my very fast connection) 5.3 seconds to download all the information for Barclays. That’s very slow, I’d be interested how much of the delay is from the DNS calls and how much is overhead from the demo site. We’ve purposely chosen to demo this site because it’s an example of an intensive NUM implementation. > Downloading a JSON blob with all the data for Barclays, parsing it, and displaying it, would take a fraction of the time. Of course, but that data doesn’t exist. Barclays’ phone numbers are split over hundreds of web pages which would require much more data download. I think your argument is that we could supply the data in JSON form, but then developers building on top of this data, would have to count out on our JSON response being fast and reliable. What we’re describing here is the current state-of-the-art, it’s an API model where developers usually pay to access that data. Barclays is a massive organisation with a very complicated contact setup. Smaller businesses are obviously much simpler, with all of their contact data contained within a single UDP packet of maybe 300 bytes.
- lolinder 5y agoThe 5.3 second figure is the time from the start of the first API call to the completion of the final API call, as shown in Firefox's Network tab.
- elliottinvent 5y agoVery interesting, thanks for the data. “API call” being the first and last call to CloudFlare DoH? If so, there’s some throttling going on somewhere. It’s completing in around 1-1.5s for most I think.
- laralamp 5y agoI tried a few companies on the site and only AXA was slow for me - it looks like there are 4s delays for many of the queries to _num.axa.co.uk, so maybe they have some throttling/DDoS protection going on. They return a SERVFAIL status code.
- elliottinvent 5y agoThanks for reporting this. The protocol has a timeout when waiting for a response from the independent zone. It shouldn’t wait 4s for any response, so there could be a bug somewhere here. We’ll take a look.