Developing distributed applications by semantics based automatic replication