added socket server and interface for monotoncitiy marking