Text this: Optimal Topology Management for Software-Defined Networks Minimizing Latency and Using Network Slicing