Q:

Would it be possible for a city floating on water to exist? 

Is there any way that a town or city could exist that has interconnecting houses floating on a body of water? 
I once read in a novel about a small village like that in a swamp, and was wondering if a similar thing could be adapted to a larger scale to exist on an ocean/sea/lake. 
Conditions for existing:

It would be a town/small city of different families living together peacefully, and would travel between different ports to trade. 
It is made up of individual houses/buildings that exist on their own floating vessel, that are interconnected with bridges to other adjacent vessels. 
Its main source of food is fishing, which it also uses to trade in the port cities for items they require. 
Normal towns and cities still exist on land. 
There are other towns/cities that are the same, and whilst not having any government that presides over these towns/cities there is a mutual understanding between them that they are civil with each other and do not attack each other (generally). 
They can live out at sea for up to months at a time without having to visit dry land. 
It exists in a medieval era world. 
It can distill fresh water from sea water using sunlight as an energy source. 
Children do not necessarily stay living in these towns/cities when they are grown up, but many of them do.  Other new families/individuals also sometimes join an existing flotilla, but only if they are trusted. 
Whilst there are other fishing boats, they generally stick close to land for shallow water fishing, and do not generally venture out for longer than a day.  Deep-fishing boats cannot compete with the capacity that these towns have for getting the fish that do not live close to shore. 
Trade and passenger ships still exist to get people and objects from one town to another, as they offer a direct route for delivery.  They can also visit the floating towns, but it is unlikely they would find a specific one because they could be anywhere out at sea. 

Considerations for existing:

What is the most reasonable body of water such a town/city could exist on?  Would an ocean have too volatile weather conditions for it to survive a large storm?  Would a lake not offer enough fishing opportunities for it to survive?  What conditions would a planet where this type of town exists need to have? 
To avoid scurvy, would it need its own farm using bought soil to grow vegetables for the long periods living out at sea?  Would it be possible to have such farms out at sea to grow vegetables if there is ample fresh water? 
What is the largest size such a city could grow to?  Would it eventually break down as a society?  Would it have to split itself into two smaller towns when it gets to a particular size? 
How would such a floating collection of vessels travel?  Would they need to co-ordinate a series of sails, or could they operate from a single large sail?  Would they need to use oars? 
Are there any other considerations that I have overlooked that need to be considered for such a society to exist? 

I also asked a question here about what a person would be like if they lived or grew up in such a city. 

A:

You got a lot a questions about our city, and like any grounder, you'r probably expecting that we've got answers for you.   But that's not the way things work out here.   Out here on the water, everything's always moving.   There are no answers.   We just do what we have to, to survive. 
Let's get the tourist crap out of the way first.   Why are we here?   We ran from shore to escape the black plaque.   Three hundred boats of all shapes and sizes.   We travelled together into the ocean's blue water, then waited to see which boats had brought plague with them.   The boats with sickness and their crews, burned and then sank, and we've been plague free ever since. 
Water was our first challenge.   We didn't have nearly enough but we couldn't go back for more.   So we sent a scout back into the nearest river mouth, to fill up jugs and water bags.   That worked for a while, then our merlin created a way to boil sea water with sunshine.   The water missions weren't needed anymore. 
During the winter, when the sun gets small, we bring back the water missions, visiting rivers for clean, sweet water.   It's like I said.   No answers, but we survive. 
Storms?   Yeh, they'r a problem.   It's no fun to be out on the water in a storm.   Still, there's usually some warning.   Some of the older sailers, our elders, watch the horizon for signs of trouble.   We can usually get most of our boats out of the way if we're warned.   If a boat isn't fast enough, or the wind is wrong and it has nor oars, that boat's crew will join a faster ship and they'll leave the slow boat to the storm. 
Are we a city?   maybe.   We're more a collection of boats or maybe a fleet.   But if you like the word "city", go ahead and use it.   Only don't be confused.   Our homes don't stay at any fixed address.   We move around as we need to.   Even among ourselves, we are always in motion; just like the sea. 
How big can we get?   I don know.   People come and go.   Smaller fleets join up and sometimes we splinter up.   We always split up when its time to trade with one of the shore towns.   A couple dozen boats, some with weapons, others with wares, seperates from the whole and heads in shallow to represent us.   Those are the best kinds of separations, because we all know that we'll join up again soon, once the trading is done. 
Yeh, life at sea has its challenges, but it is a good way to live.   No rules, no boundaries and no answers.   We just survive. 

A:

Does it help to know at least 15 and probably many more of these already exist? 
http://weburbanist.com/2012/08/20/water-worlds-15-real-floating-towns-ocean-cities/
Not sure if all of those qualify for what you are looking for...I'd go with the Thai one built on stilts as it is more independent from land.   I think the number would be significantly higher if the Tsunami in '05 didn't wipe a few of them out too.   They are not modern cities, nor do they have huge standing skyscrapers poking out.   Instead it's more of a flotilla of buildings and ships stuck together.   
Phuket (Thailand) is another great example and is one of my favorite destinations

A:

As Dustin Jackson said, people are working on it now. 
A modular city would probably be best.  Each block is a separate piece that can disconnect from its neighbors and move off independently.   
This would be useful during storms, since the bigger something is, the more structure/stronger materials need to used, especially when designing for torquing stress from waves.  After the storm the city would reassemble. 

This would also allow the city to grow easily, and be restructured if needed.  Need to add more businesses, just build more business tiles and push one of the residential tiles out.  Farm tiles could be added as well for produce and vitamin C.
The biggest hurdle would be navigation.  The currents would be able to push it pretty good, and sails could be added, but you wouldn't want to get very close to land if possible.  It would eventually be something of a nomad ship, going where the currents take it.  Probably not have set trade routes/schedules.  However, they could have ships that travel between land ports and the city, which means it wouldn't need to move much.