A. Aka wrote:what are companies' strategies on this matter in general?
There are many, some of which Jeanne has already outlined.
What you (and we) really need to know is what you mean by "the cloud". If you just mean the big, bad Internet, there are many ways to simulate that kind of environment internally without having to "go outside" until you need to, and many companies will do that with a separate (probably NAT-ted)
RFC 1918 network (or networks; the 192.168 series allows you up to 256 of them) under the control of its own DNS server. That way, the connection
mechanism will be very similar to the regular Internet, but you don't need to release your code into a world where crackers and viruses abound. The other advantage is that you can also simulate things like DNS, service-provider, or database outages and "dead links" whenever you like.
This is generally an infrastructure decision though, so it will usually be under the control of your admins. You, as a
Java programmer (assuming that's what you are) should rarely have to worry about this sort of stuff. HTTP is HTTP, and if it works to an internal address, it should work to en external one - that's the whole reason RFC 1918 was invented - and if it doesn't, it usually indicates a problem that's beyond the scope of your Java program to handle.
On the other hand, you presumably want all your environments to use essentially the same code; and for that there are tools like dependency injection, which allow you to configure things like a "connection" or "the cloud" so that they can be supplied at runtime. Just one such tool is
Guice, but there are several others.
I'm only talking about regular client/server type environments though, because it's the only thing I have experience with. For peer-to-peer or distributed systems, there are almost certainly other things to consider. I've also only ever dealt with it for IPv4; although I'm pretty darn sure v6 will have all the same "goodies" (maybe even better ones) to help you out.
All I can say is that when I was an admin for this kind of set-up, migrating to "production" wasn't anywhere near as troublesome as I suspect you may be thinking it is.
It does help to have a few friendly "beta" testers out there in Web-land though.
Winston