Given that it's difficult to ship oil without pirates appearing on the horizon I think it will be difficult to create a floating state without weapons, standing armies, police, judges... and before you know it your in the mess we are in. am I being too pessimistic?
I think conflating pirates and governmental invasion misses the point. If pirates attack, you can shoot them (and modern-day pirates, at least, seem easily deterred by bigger guns). If a state attacks, such as what happened with Tonga, you're likely to be attacked by other states if you successfully defend yourself.