Hacker News new | past | comments | ask | show | jobs | submit login

Great question. The app uses a combination of SSID and public IP address as identifiers to create unique channels so both your SSID and outgoing IP will need to match to access a chat.



So if your public IP address changes, do you (and everyone else in the chat) permanently lose access to it unless you can manage to get the IP back?


I have a dynamic IP from my ISP at home, so that wouldn't work?


Unfortunately this may not work at universities and other enterprise networks since each user is often given their own public IP for auditing purposes.


I wonder if he could also store the MAC address of the wireless AP against a unique key (eg a uuid). Then the calculation is something like:

  SELECT uuid
  WHERE ssid = ?
  AND (ap_mac = ? OR public_ip = ?)
if no results are returned then create a new uuid and add the public IP and access point's MAC address. If you do get a result then connect to that chat while checking that both the ap_mac and public_ip have records (if not, add them).

That way you cover dynamic IPs and multiple access points by gradually meshing them in your database.

There is, of course, the risk that if you have multiple APs each with their own public IPs but part of the same college campus then this wouldn't work. But then neither would the current solution either. I don't know how you'd fix that without inviting APs into a chat (which isn't desirable because that would mean you'd then want a chat administrator. By which point you're effectively just reinventing Slack et al). So you'd want some kind of automatic way of doing that. But I'm not sure how you could do that safely.

Also there is the risk that if each student has their own public IP then you might also have a situation where there is multiple different chats because different students created a new uuid on different APs before roaming around the campus. When that happens you'd need a way of the server identifying that a public IP has joined a new uuid with an existing but different ap_mac and ssid so the two chats need to be merged.

There's definitely going to be quite a few edge cases that need solving but it's one of those challenges that looks rather fun.

[edit: the BSSID might also work in place - or in addition to - the access points MAC address. However there are some caveats you'd need to take into account with BSSIDs]


my public IP might change, also my SSID because I like to do jokes with my wifi names, but my geo coordinates (with a proper tolerance distance radio) should remain the same.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: