After the user browses the network in my application and selects the service instance they wish to use, I should save that IP address in my applications preference file, right?
Wrong. This is a common mistake. With DHCP (and with link-local addressing) it is not safe to assume that the service instance will have the same IP address tomorrow. Addresses can change. Service names are the intended stable identifiers for a service instance. Save the instance name (name, type, and domain) in your application’s preference file, then Resolve it on demand each time the user accesses the service. Note also that you should not store the host name and port number, because you shouldn’t assume that the service instance will necessarily be running on the same port number tomorrow. Instead of storing the host name, store the service instance name (name, type, and domain) and then when you Resolve the service instance name at the time of use you are sure to get the up-to-date IP address and port number.
Related Questions
- After the user browses the network in my application and selects the service instance they wish to use, I should save that IP address in my applications preference file, right?
- If a user is from a recognized on-campus IP address, can they be considered as a full service level API user?
- Will FusionVM perform buffer overflows/denial of service attacks against my network application?