Ankit Chaudhari wrote:Putting the architecture's cap on, Is it a good approach to declare a new IP address as an unique user?
I'd say no, for all the reasons already given. An IP address is just that: an address; you're trying to force it to "be" something different - a user - and that rarely works in the long run. You may also run into situations where the IP address either
(a) isn't visible, or
(b) changes from login to login (for example, if it's allocated by a DHCP server).
Java is an object-oriented language, so why not create a User class tailored to the needs of your app? How and where you store it are up to you; but it's a secondary consideration compared to what it means for your system.
As far as "catchall" users are concerned, Unix has a guest user that is often used as a default. You might want to try something similar.
Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here