Authors

Chris Amin

Based in Amsterdam, Netherlands

6

Articles

0

Likes on articles

About the author

I am a senior software developer working on RIPE Atlas, DNSMON and other RIPE NCC projects.

Links & Social

Published tags

• Reply to Stéphane Bortzmeyer on RIS Live BGP Message Stream by Chris Amin

“Here is an asynchronous version of a Python client so you can do other things while waiting for updates. (In that case, we just display a timestamp.) #!/usr/bin/env python3 PERIOD = 5 RFC3339 = '%Y-%m-%dT%H:%M:%SZ' import sys import json import time import asyncio # https://websockets.readthedocs.io/ import websockets class RISliveWebsocket(): def __init__(self, router, asn): self.router = router self.asn = asn async def __aenter__(self): self._conn = await websockets.connect("wss://ris-live.ripe.net/v1/ws/?client=asynchronous-python-script-by-me") opening = json.dumps({"type": "ris_subscribe", "data": {"host": self.router, "path": self.asn}}) await self._conn.send(opening) print("Connected, %s sent" % opening) return self async def __aexit__(self, *args, **kwargs): print("Goodbye") pass async def send(self, message): await self._conn.send(message) async def receive(self): print("Trying to receive") return await self._conn.recv() async def tick(): while True: await asyncio.sleep(PERIOD) print("Waking up, it is %s" % time.strftime(RFC3339, time.gmtime(time.time()))) async def main(router, asn): sock = RISliveWebsocket(router, asn) async with sock as feed: while True: print(await feed.receive()) if __name__ == '__main__': if len(sys.argv) != 3: print("Usage: %s RIS-router ASn" % sys.argv[0], file=sys.stderr) sys.exit(1) try: loop = asyncio.get_event_loop() loop.run_until_complete(asyncio.wait([main(sys.argv[1], sys.argv[2]), tick()])) except KeyboardInterrupt: pass # Does not call __aexit__?”

Thanks, Stéphane! At some point I may add extra examples to the documentation. Is it okay if I include something based on your example?

• Reply to Stéphane Bortzmeyer on RIPE Atlas Measurement Tagging by Chris Amin

“It seems a very good and useful feature. But calling it "tags" is a bad idea since it already means something else for RIPE Atlas :-(”

Thanks for the feedback. Indeed we now have "measurement tags" as well as "probe tags". We decided that it would be somewhat arbitrary to come up with a new name for something which conceptually is the same thing, but applied to a different object (measurements rather than probes). We will try to be clear throughout the documentation and user interface(s) whether we are talking about "measurement tags" or "probe tags" and avoid just saying "tags" in places where it could be ambiguous. If you see anything in particular that could be confusing then please let me know!

• Reply to Stéphane Bortzmeyer on RIPE Atlas Measurement Tagging by Chris Amin

“The link to "RIPE Atlas API v2 manual" goes to atlas-ui-dev.atlas.ripe.net, which times out. (It is probably an internal site.)”

Fixed, thank you!

• Reply to Paul Hoffman on New RIPE Atlas Root Zone DNS Measurements by Chris Amin

“Issuing requests for the top 50 sites from our Atlas probes could open us to some privacy issues due to the content at some of those sites. For example, today pornhub.com is #53, but I'm pretty sure it was higher in the list just a few years ago. It could be difficult to explain to one's boss why the IT Department's trace of your office internet access was accessing such a site. Please consider making the list of the 50 not based on "end-user usage" but on what names might not get us in trouble.”

Hi Paul, just replicating the response that I sent via email for the benefit of anybody else who reads the article: Sorry, I should have referred to the actual list of domains in the articles. I sent a mail to the RIPE Atlas and MAT-WG mailing lists last month (link below*) proposing the list of domains and asking for any objections. Indeed pornhub or other porn sites are not in the top 50, but in any case I explicitly excluded such sites from the 25 "backup" options in case any of the top 50 were to be excluded for political or other reasons. Rest assured, we had these kind of concerns in mind when setting up these measurements, and the list is fully manual and domains won't automatically float into it, but please do let us know if you have any further concerns. Kind regards, Chris * https://www.ripe.net/ripe/mail/archives/mat-wg/2017-February/000721.html

Showing 4 comment(s)

Previous
1
Next