diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index 127b2c0..5e07018 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -35,7 +35,7 @@
 import net.onrc.onos.core.topology.LinkEvent;
 import net.onrc.onos.core.topology.Port;
 import net.onrc.onos.core.topology.Switch;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 import net.onrc.onos.core.util.PortNumber;
 import net.onrc.onos.core.util.SwitchPort;
 
@@ -66,7 +66,7 @@
     private IControllerRegistryService controllerRegistryService;
 
     private ITopologyService topologyService;
-    private Topology topology;
+    private MutableTopology mutableTopology;
     private IPathCalcRuntimeService pathRuntime;
     private IntentMap pathIntentMap;
     private IntentMap highLevelIntentMap;
@@ -218,7 +218,7 @@
 
         packetService.registerPacketListener(this);
 
-        topology = topologyService.getTopology();
+        mutableTopology = topologyService.getTopology();
         highLevelIntentMap = pathRuntime.getHighLevelIntents();
         highLevelIntentMap.addChangeListener(highLevelIntentChangedHandler);
         pathIntentMap = pathRuntime.getPathIntents();
@@ -263,7 +263,7 @@
 
         // FIXME #getHostByMac() is a blocking call, so it may be better way
         // to handle it to avoid the condition.
-        Host hostObject = topology.getHostByMac(
+        Host hostObject = mutableTopology.getHostByMac(
                 MACAddress.valueOf(destinationMac));
 
         if (hostObject == null) {
@@ -293,7 +293,7 @@
 
         @Override
         public void run() {
-            Host hostObject = topology.getHostByMac(MACAddress.valueOf(eth.getDestinationMACAddress()));
+            Host hostObject = mutableTopology.getHostByMac(MACAddress.valueOf(eth.getDestinationMACAddress()));
             if (hostObject == null) {
                 log.debug("wait {}ms and host was not found. " +
                         "Send broadcast packet and the thread finish.",
diff --git a/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java b/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
index 2593a59..8410b43 100644
--- a/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
+++ b/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
@@ -32,7 +32,7 @@
 import net.onrc.onos.core.topology.ITopologyService;
 import net.onrc.onos.core.topology.Port;
 import net.onrc.onos.core.topology.Switch;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 import net.onrc.onos.core.util.Dpid;
 import net.onrc.onos.core.util.PortNumber;
 import net.onrc.onos.core.util.SwitchPort;
@@ -67,7 +67,7 @@
     private IRestApiService restApi;
 
     private ITopologyService topologyService;
-    private Topology topology;
+    private MutableTopology mutableTopology;
     private IPacketService packetService;
 
     private short vlan;
@@ -283,7 +283,7 @@
 
         restApi.addRestletRoutable(new ArpWebRoutable());
         packetService.registerPacketListener(this);
-        topology = topologyService.getTopology();
+        mutableTopology = topologyService.getTopology();
 
         //
         // Event notification setup: channels and event handlers
@@ -432,10 +432,10 @@
         arpRequests.put(target, new ArpRequest(
                 new HostArpRequester(arp, dpid, inPort), false));
 
-        topology.acquireReadLock();
-        Host targetHost = topology.getHostByMac(
+        mutableTopology.acquireReadLock();
+        Host targetHost = mutableTopology.getHostByMac(
                 MACAddress.valueOf(arp.getTargetHardwareAddress()));
-        topology.releaseReadLock();
+        mutableTopology.releaseReadLock();
 
         if (targetHost == null) {
             if (log.isTraceEnabled()) {
diff --git a/src/main/java/net/onrc/onos/core/hostmanager/HostManager.java b/src/main/java/net/onrc/onos/core/hostmanager/HostManager.java
index a5e3bd9..155c3cf 100644
--- a/src/main/java/net/onrc/onos/core/hostmanager/HostManager.java
+++ b/src/main/java/net/onrc/onos/core/hostmanager/HostManager.java
@@ -26,7 +26,7 @@
 import net.onrc.onos.core.packet.Ethernet;
 import net.onrc.onos.core.topology.ITopologyService;
 import net.onrc.onos.core.topology.Port;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 import net.onrc.onos.core.util.Dpid;
 import net.onrc.onos.core.util.PortNumber;
 import net.onrc.onos.core.util.PortNumberUtils;
@@ -52,7 +52,7 @@
             Executors.newSingleThreadScheduledExecutor();
 
     private ITopologyService topologyService;
-    private Topology topology;
+    private MutableTopology mutableTopology;
 
     public enum HostUpdateType {
         ADD, DELETE, UPDATE;
@@ -141,17 +141,17 @@
         // then don't add the host
         // TODO We probably don't need to check this here, it should be done in
         // the Topology module.
-        topology.acquireReadLock();
+        mutableTopology.acquireReadLock();
         try {
-            if (topology.getOutgoingLink(dpid, portNum) != null ||
-                    topology.getIncomingLink(dpid, portNum) != null) {
+            if (mutableTopology.getOutgoingLink(dpid, portNum) != null ||
+                    mutableTopology.getIncomingLink(dpid, portNum) != null) {
                 log.debug("Not adding host {} as " +
                         "there is a link on the port: dpid {} port {}",
                         srcHost.getMacAddress(), dpid, portNum);
                 return Command.CONTINUE;
             }
         } finally {
-            topology.releaseReadLock();
+            mutableTopology.releaseReadLock();
         }
 
         Long mac = eth.getSourceMAC().toLong();
@@ -175,10 +175,10 @@
         @Override
         public void run() {
             log.debug("called HostCleaner");
-            topology.acquireReadLock();
+            mutableTopology.acquireReadLock();
             try {
                 Set<net.onrc.onos.core.topology.Host> deleteSet = new HashSet<>();
-                for (net.onrc.onos.core.topology.Host host : topology.getHosts()) {
+                for (net.onrc.onos.core.topology.Host host : mutableTopology.getHosts()) {
                     long now = System.currentTimeMillis();
                     if ((now - host.getLastSeenTime() > agingMillisecConfig)) {
                         if (log.isTraceEnabled()) {
@@ -198,7 +198,7 @@
                 // all exceptions here.
                 log.error("Exception in host cleanup thread:", e);
             } finally {
-                topology.releaseReadLock();
+                mutableTopology.releaseReadLock();
             }
         }
     }
@@ -259,7 +259,7 @@
         floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
         hostListeners = new CopyOnWriteArrayList<IHostListener>();
         topologyService = context.getServiceImpl(ITopologyService.class);
-        topology = topologyService.getTopology();
+        mutableTopology = topologyService.getTopology();
 
         setHostManagerProperties(context);
     }
@@ -280,9 +280,9 @@
     @Override
     public void deleteHostByMac(MACAddress mac) {
         Host deleteHost = null;
-        topology.acquireReadLock();
+        mutableTopology.acquireReadLock();
         try {
-            net.onrc.onos.core.topology.Host host = topology.getHostByMac(mac);
+            net.onrc.onos.core.topology.Host host = mutableTopology.getHostByMac(mac);
 
             for (Port switchPort : host.getAttachmentPoints()) {
                 // We don't handle vlan now and multiple attachment points.
@@ -295,7 +295,7 @@
                 break; // NOPMD
             }
         } finally {
-            topology.releaseReadLock();
+            mutableTopology.releaseReadLock();
         }
 
         if (deleteHost != null) {
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntime.java b/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntime.java
index d4452e1..194327c 100644
--- a/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntime.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntime.java
@@ -18,7 +18,7 @@
 import net.onrc.onos.core.intent.PathIntentMap;
 import net.onrc.onos.core.intent.ShortestPathIntent;
 import net.onrc.onos.core.topology.Switch;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 import net.onrc.onos.core.util.Dpid;
 
 import org.slf4j.Logger;
@@ -30,16 +30,16 @@
  * It calculates shortest-path and constrained-shortest-path.
  */
 public class PathCalcRuntime implements IFloodlightService {
-    private Topology topology;
+    private MutableTopology mutableTopology;
     private static final Logger log = LoggerFactory.getLogger(PathCalcRuntime.class);
 
     /**
      * Constructor.
      *
-     * @param topology a topology object to use for the path calculation.
+     * @param mutableTopology a topology object to use for the path calculation.
      */
-    public PathCalcRuntime(Topology topology) {
-        this.topology = topology;
+    public PathCalcRuntime(MutableTopology mutableTopology) {
+        this.mutableTopology = mutableTopology;
     }
 
     /**
@@ -55,7 +55,7 @@
         HashMap<Switch, ConstrainedBFSTree> spfTrees = new HashMap<>();
 
         // TODO optimize locking of Topology
-        topology.acquireReadLock();
+        mutableTopology.acquireReadLock();
 
         for (IntentOperation intentOp : intentOpList) {
             switch (intentOp.operator) {
@@ -70,8 +70,8 @@
                     }
 
                     ShortestPathIntent spIntent = (ShortestPathIntent) intentOp.intent;
-                    Switch srcSwitch = topology.getSwitch(new Dpid(spIntent.getSrcSwitchDpid()));
-                    Switch dstSwitch = topology.getSwitch(new Dpid(spIntent.getDstSwitchDpid()));
+                    Switch srcSwitch = mutableTopology.getSwitch(new Dpid(spIntent.getSrcSwitchDpid()));
+                    Switch dstSwitch = mutableTopology.getSwitch(new Dpid(spIntent.getDstSwitchDpid()));
                     if (srcSwitch == null || dstSwitch == null) {
                         log.debug("Switch not found. src:{}, dst:{}",
                                 spIntent.getSrcSwitchDpid(),
@@ -163,7 +163,7 @@
             }
         }
         // TODO optimize locking of Topology
-        topology.releaseReadLock();
+        mutableTopology.releaseReadLock();
 
         return pathIntentOpList;
     }
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/web/ShortestPathResource.java b/src/main/java/net/onrc/onos/core/intent/runtime/web/ShortestPathResource.java
index 1abd61d..2910c3d 100644
--- a/src/main/java/net/onrc/onos/core/intent/runtime/web/ShortestPathResource.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/web/ShortestPathResource.java
@@ -10,7 +10,7 @@
 import net.onrc.onos.core.topology.Link;
 import net.onrc.onos.core.topology.LinkEvent;
 import net.onrc.onos.core.topology.Switch;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 import net.onrc.onos.core.util.Dpid;
 
 import org.restlet.representation.Representation;
@@ -51,11 +51,11 @@
         // Do the Shortest Path computation and return the result: a list of
         // links.
         //
-        Topology topology = topologyService.getTopology();
-        topology.acquireReadLock();
+        MutableTopology mutableTopology = topologyService.getTopology();
+        mutableTopology.acquireReadLock();
         try {
-            Switch srcSwitch = topology.getSwitch(srcDpid);
-            Switch dstSwitch = topology.getSwitch(dstDpid);
+            Switch srcSwitch = mutableTopology.getSwitch(srcDpid);
+            Switch dstSwitch = mutableTopology.getSwitch(dstDpid);
             if ((srcSwitch == null) || (dstSwitch == null)) {
                 return null;
             }
@@ -66,7 +66,7 @@
             }
             List<Link> links = new LinkedList<>();
             for (LinkEvent linkEvent : path) {
-                Link link = topology.getLink(
+                Link link = mutableTopology.getLink(
                         linkEvent.getSrc().getDpid(),
                         linkEvent.getSrc().getPortNumber(),
                         linkEvent.getDst().getDpid(),
@@ -78,7 +78,7 @@
             }
             return eval(toRepresentation(links, null));
         } finally {
-            topology.releaseReadLock();
+            mutableTopology.releaseReadLock();
         }
     }
 }
diff --git a/src/main/java/net/onrc/onos/core/packetservice/BroadcastPacketOutNotification.java b/src/main/java/net/onrc/onos/core/packetservice/BroadcastPacketOutNotification.java
index 4f96302..f7629d8 100644
--- a/src/main/java/net/onrc/onos/core/packetservice/BroadcastPacketOutNotification.java
+++ b/src/main/java/net/onrc/onos/core/packetservice/BroadcastPacketOutNotification.java
@@ -2,7 +2,7 @@
 
 import java.util.Map;
 
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 import net.onrc.onos.core.topology.Port;
 import net.onrc.onos.core.util.Dpid;
 import net.onrc.onos.core.util.PortNumber;
@@ -84,17 +84,17 @@
 
     @Override
     public Multimap<Long, Short> calculateOutPorts(
-            Multimap<Long, Short> localPorts, Topology topology) {
+            Multimap<Long, Short> localPorts, MutableTopology mutableTopology) {
         Multimap<Long, Short> outPorts = HashMultimap.create();
 
         for (Map.Entry<Long, Short> entry : localPorts.entries()) {
             Port globalPort;
-            topology.acquireReadLock();
+            mutableTopology.acquireReadLock();
             try {
-                globalPort = topology.getPort(new Dpid(entry.getKey()),
+                globalPort = mutableTopology.getPort(new Dpid(entry.getKey()),
                     PortNumber.uint16(entry.getValue()));
             } finally {
-                topology.releaseReadLock();
+                mutableTopology.releaseReadLock();
             }
 
             if ((!entry.getKey().equals(inSwitch) ||
diff --git a/src/main/java/net/onrc/onos/core/packetservice/PacketModule.java b/src/main/java/net/onrc/onos/core/packetservice/PacketModule.java
index 61fa735..ce79994 100644
--- a/src/main/java/net/onrc/onos/core/packetservice/PacketModule.java
+++ b/src/main/java/net/onrc/onos/core/packetservice/PacketModule.java
@@ -25,7 +25,7 @@
 import net.onrc.onos.core.topology.ITopologyService;
 import net.onrc.onos.core.topology.Port;
 import net.onrc.onos.core.topology.Switch;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 import net.onrc.onos.core.util.Dpid;
 import net.onrc.onos.core.util.PortNumber;
 import net.onrc.onos.core.util.SwitchPort;
@@ -51,7 +51,7 @@
     private final CopyOnWriteArrayList<IPacketListener> listeners;
 
     private IFloodlightProviderService floodlightProvider;
-    private Topology topology;
+    private MutableTopology mutableTopology;
     private IDatagridService datagrid;
     private IFlowPusherService flowPusher;
 
@@ -76,7 +76,7 @@
                 }
             }
             Multimap<Long, Short> outPorts = value.calculateOutPorts(
-                    localPorts, topology);
+                    localPorts, mutableTopology);
             sendPacketToSwitches(outPorts, value.getPacketData());
         }
 
@@ -164,13 +164,13 @@
         Switch topologySwitch;
         Port inPort;
         try {
-            topology.acquireReadLock();
+            mutableTopology.acquireReadLock();
             Dpid dpid = new Dpid(sw.getId());
             PortNumber p = PortNumber.uint16(inport);
-            topologySwitch = topology.getSwitch(dpid);
-            inPort = topology.getPort(dpid, p);
+            topologySwitch = mutableTopology.getSwitch(dpid);
+            inPort = mutableTopology.getPort(dpid, p);
         } finally {
-            topology.releaseReadLock();
+            mutableTopology.releaseReadLock();
         }
 
         if (topologySwitch == null || inPort == null) {
@@ -217,7 +217,7 @@
             throws FloodlightModuleException {
         floodlightProvider =
                 context.getServiceImpl(IFloodlightProviderService.class);
-        topology = context.getServiceImpl(ITopologyService.class)
+        mutableTopology = context.getServiceImpl(ITopologyService.class)
                 .getTopology();
         datagrid = context.getServiceImpl(IDatagridService.class);
         flowPusher = context.getServiceImpl(IFlowPusherService.class);
diff --git a/src/main/java/net/onrc/onos/core/packetservice/PacketOutNotification.java b/src/main/java/net/onrc/onos/core/packetservice/PacketOutNotification.java
index b92518a..2a577f3 100644
--- a/src/main/java/net/onrc/onos/core/packetservice/PacketOutNotification.java
+++ b/src/main/java/net/onrc/onos/core/packetservice/PacketOutNotification.java
@@ -3,7 +3,7 @@
 import java.io.Serializable;
 import java.util.Arrays;
 
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 
 import com.google.common.collect.Multimap;
 
@@ -54,11 +54,11 @@
      * instance.
      *
      * @param localPorts the map of locally-controlled ports
-     * @param topology an instance of the global topology
+     * @param mutableTopology an instance of the global topology
      * @return a multimap of ports that the packet should be sent out,
      * in the form
      * {@code {dpid1 => {portnum1, portnum2, ...}, dpid2 => {portnum1}, ...}}
      */
     public abstract Multimap<Long, Short> calculateOutPorts(
-            Multimap<Long, Short> localPorts, Topology topology);
+            Multimap<Long, Short> localPorts, MutableTopology mutableTopology);
 }
diff --git a/src/main/java/net/onrc/onos/core/packetservice/SinglePacketOutNotification.java b/src/main/java/net/onrc/onos/core/packetservice/SinglePacketOutNotification.java
index 0521434..e9bb7a4 100644
--- a/src/main/java/net/onrc/onos/core/packetservice/SinglePacketOutNotification.java
+++ b/src/main/java/net/onrc/onos/core/packetservice/SinglePacketOutNotification.java
@@ -1,6 +1,6 @@
 package net.onrc.onos.core.packetservice;
 
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.Multimap;
@@ -72,7 +72,7 @@
 
     @Override
     public Multimap<Long, Short> calculateOutPorts(
-            Multimap<Long, Short> localPorts, Topology topology) {
+            Multimap<Long, Short> localPorts, MutableTopology mutableTopology) {
         Multimap<Long, Short> outPorts = HashMultimap.create();
 
         if (localPorts.containsEntry(outSwitch, outPort)) {
diff --git a/src/main/java/net/onrc/onos/core/topology/BaseTopology.java b/src/main/java/net/onrc/onos/core/topology/BaseTopology.java
new file mode 100644
index 0000000..6b2bef8
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/topology/BaseTopology.java
@@ -0,0 +1,217 @@
+package net.onrc.onos.core.topology;
+
+import java.util.Collection;
+
+import net.floodlightcontroller.util.MACAddress;
+import net.onrc.onos.core.util.Dpid;
+import net.onrc.onos.core.util.PortNumber;
+import net.onrc.onos.core.util.SwitchPort;
+
+// TODO move to appropriate package. under api??
+/**
+ * BaseTopology interface common to both {@link ImmutableTopology} and {@link MutableTopology}.
+ */
+public interface BaseTopology {
+
+    /**
+     * Gets the switch for a given switch DPID.
+     *
+     * @param dpid the switch dpid.
+     * @return the switch if found, otherwise null.
+     */
+    public Switch getSwitch(Dpid dpid);
+
+    /**
+     * Gets all switches in the network.
+     *
+     * @return all switches in the network.
+     */
+    public Iterable<Switch> getSwitches();
+
+    /**
+     * Gets the port on a switch.
+     *
+     * @param dpid   the switch DPID.
+     * @param portNumber the switch port number.
+     * @return the switch port if found, otherwise null.
+     */
+    public Port getPort(Dpid dpid, PortNumber portNumber);
+
+    /**
+     * Gets the port on a switch.
+     *
+     * @param port port identifier
+     * @return the switch port if found, otherwise null.
+     */
+    public Port getPort(SwitchPort port);
+
+    /**
+     * Gets all ports on a switch specified.
+     *
+     * @param dpid Switch dpid
+     * @return ports.
+     */
+    public Collection<Port> getPorts(Dpid dpid);
+
+    /**
+     * Gets the outgoing link from a switch port.
+     * <p/>
+     * FIXME As a temporary workaround, it will look for type "packet" and
+     * returns it if found, else return whichever link is found first.
+     *
+     * @param dpid   the switch DPID.
+     * @param portNumber the switch port number.
+     * @return the outgoing link if found, otherwise null.
+     */
+    public Link getOutgoingLink(Dpid dpid, PortNumber portNumber);
+
+    /**
+     * Gets the outgoing link from a switch port.
+     *
+     * @param dpid   the switch DPID.
+     * @param portNumber the switch port number.
+     * @param type   type of the link
+     * @return the outgoing link if found, otherwise null.
+     */
+    public Link getOutgoingLink(Dpid dpid, PortNumber portNumber, String type);
+
+    /**
+     * Gets the outgoing link from a switch port.
+     * <p/>
+     * FIXME As a temporary workaround, it will look for type "packet" and
+     * returns it if found, else return whichever link is found first.
+     *
+     * @param port port identifier
+     * @return the outgoing link if found, otherwise null.
+     */
+    public Link getOutgoingLink(SwitchPort port);
+
+    /**
+     * Gets the outgoing link from a switch port.
+     *
+     * @param port port identifier
+     * @param type type of the link
+     * @return the outgoing link if found, otherwise null.
+     */
+    public Link getOutgoingLink(SwitchPort port, String type);
+
+    /**
+     * Gets all the outgoing link from a switch port.
+     *
+     * @param port port identifier
+     * @return outgoing links
+     */
+    public Collection<Link> getOutgoingLinks(SwitchPort port);
+
+    /**
+     * Gets the incoming link to a switch port.
+     * <p/>
+     * FIXME As a temporary workaround, it will look for type "packet" and
+     * returns it if found, else return whichever link is found first.
+     *
+     * @param dpid   the switch DPID.
+     * @param portNumber the switch port number.
+     * @return the incoming link if found, otherwise null.
+     */
+    public Link getIncomingLink(Dpid dpid, PortNumber portNumber);
+
+    /**
+     * Gets the incoming link to a switch port.
+     * <p/>
+     * FIXME As a temporary workaround, it will look for type "packet" and
+     * returns it if found, else return whichever link is found first.
+     *
+     * @param dpid   the switch DPID.
+     * @param portNumber the switch port number.
+     * @param type type of the link
+     * @return the incoming link if found, otherwise null.
+     */
+    public Link getIncomingLink(Dpid dpid, PortNumber portNumber, String type);
+
+    /**
+     * Gets the incoming link to a switch port.
+     * <p/>
+     * FIXME As a temporary workaround, it will look for type "packet" and
+     * returns it if found, else return whichever link is found first.
+     *
+     * @param port port identifier
+     * @return the incoming link if found, otherwise null.
+     */
+    public Link getIncomingLink(SwitchPort port);
+
+    /**
+     * Gets the incoming link to a switch port.
+     *
+     * @param port port identifier
+     * @param type type of the link
+     * @return the incoming link if found, otherwise null.
+     */
+    public Link getIncomingLink(SwitchPort port, String type);
+
+    /**
+     * Gets all the incoming link from a switch port.
+     *
+     * @param port port identifier
+     * @return incoming links
+     */
+    public Collection<Link> getIncomingLinks(SwitchPort port);
+
+    /**
+     * Gets the outgoing link from a switch and a port to another switch and
+     * a port.
+     *
+     * @param srcDpid   the source switch DPID.
+     * @param srcPortNumber the source switch port number.
+     * @param dstDpid   the destination switch DPID.
+     * @param dstPortNumber the destination switch port number.
+     * @return the outgoing link if found, otherwise null.
+     */
+    public Link getLink(Dpid srcDpid, PortNumber srcPortNumber,
+                        Dpid dstDpid, PortNumber dstPortNumber);
+
+    /**
+     * Gets the outgoing link from a switch and a port to another switch and
+     * a port.
+     *
+     * @param srcDpid   the source switch DPID.
+     * @param srcPortNumber the source switch port number.
+     * @param dstDpid   the destination switch DPID.
+     * @param dstPortNumber the destination switch port number.
+     * @param type      type of the link
+     * @return the outgoing link if found, otherwise null.
+     */
+    public Link getLink(Dpid srcDpid, PortNumber srcPortNumber,
+                        Dpid dstDpid, PortNumber dstPortNumber,
+                        String type);
+
+    /**
+     * Gets all links in the network.
+     * <p/>
+     *
+     * @return all links in the network.
+     */
+    public Iterable<Link> getLinks();
+
+    /**
+     * Gets the network device for a given MAC address.
+     *
+     * @param address the MAC address to use.
+     * @return the network device for the MAC address if found, otherwise null.
+     */
+    public Host getHostByMac(MACAddress address);
+
+    /**
+     * Gets all devices in the network.
+     *
+     * @return all devices in the network
+     */
+    public Iterable<Host> getHosts();
+
+    /**
+     * Gets all devices on specified port.
+     *
+     * @param port port which the device is attached
+     * @return all devices attached to the port.
+     */
+    public Collection<Host> getHosts(SwitchPort port);
+}
diff --git a/src/main/java/net/onrc/onos/core/topology/ITopologyService.java b/src/main/java/net/onrc/onos/core/topology/ITopologyService.java
index ecb1212..26b6212 100644
--- a/src/main/java/net/onrc/onos/core/topology/ITopologyService.java
+++ b/src/main/java/net/onrc/onos/core/topology/ITopologyService.java
@@ -11,7 +11,7 @@
      *
      * @return the global Topology object
      */
-    public Topology getTopology();
+    public MutableTopology getTopology();
 
     /**
      * Adds a listener for topology events.
diff --git a/src/main/java/net/onrc/onos/core/topology/ImmutableTopology.java b/src/main/java/net/onrc/onos/core/topology/ImmutableTopology.java
index 0f7ab96..ed5678e 100644
--- a/src/main/java/net/onrc/onos/core/topology/ImmutableTopology.java
+++ b/src/main/java/net/onrc/onos/core/topology/ImmutableTopology.java
@@ -1,216 +1,10 @@
 package net.onrc.onos.core.topology;
 
-import java.util.Collection;
-
-import net.floodlightcontroller.util.MACAddress;
-import net.onrc.onos.core.util.Dpid;
-import net.onrc.onos.core.util.PortNumber;
-import net.onrc.onos.core.util.SwitchPort;
-
+//TODO move to appropriate package under api
 /**
- * ImmutableTopology.
+ * ImmutableTopology, which could be accessed without locking, etc.
  */
-public interface ImmutableTopology {
+public interface ImmutableTopology extends BaseTopology {
 
-    /**
-     * Gets the switch for a given switch DPID.
-     *
-     * @param dpid the switch dpid.
-     * @return the switch if found, otherwise null.
-     */
-    public Switch getSwitch(Dpid dpid);
-
-    /**
-     * Gets all switches in the network.
-     *
-     * @return all switches in the network.
-     */
-    public Iterable<Switch> getSwitches();
-
-    /**
-     * Gets the port on a switch.
-     *
-     * @param dpid   the switch DPID.
-     * @param portNumber the switch port number.
-     * @return the switch port if found, otherwise null.
-     */
-    public Port getPort(Dpid dpid, PortNumber portNumber);
-
-    /**
-     * Gets the port on a switch.
-     *
-     * @param port port identifier
-     * @return the switch port if found, otherwise null.
-     */
-    public Port getPort(SwitchPort port);
-
-    /**
-     * Gets all ports on a switch specified.
-     *
-     * @param dpid Switch dpid
-     * @return ports.
-     */
-    public Collection<Port> getPorts(Dpid dpid);
-
-    /**
-     * Gets the outgoing link from a switch port.
-     * <p/>
-     * FIXME As a temporary workaround, it will look for type "packet" and
-     * returns it if found, else return whichever link is found first.
-     *
-     * @param dpid   the switch DPID.
-     * @param portNumber the switch port number.
-     * @return the outgoing link if found, otherwise null.
-     */
-    public Link getOutgoingLink(Dpid dpid, PortNumber portNumber);
-
-    /**
-     * Gets the outgoing link from a switch port.
-     *
-     * @param dpid   the switch DPID.
-     * @param portNumber the switch port number.
-     * @param type   type of the link
-     * @return the outgoing link if found, otherwise null.
-     */
-    public Link getOutgoingLink(Dpid dpid, PortNumber portNumber, String type);
-
-    /**
-     * Gets the outgoing link from a switch port.
-     * <p/>
-     * FIXME As a temporary workaround, it will look for type "packet" and
-     * returns it if found, else return whichever link is found first.
-     *
-     * @param port port identifier
-     * @return the outgoing link if found, otherwise null.
-     */
-    public Link getOutgoingLink(SwitchPort port);
-
-    /**
-     * Gets the outgoing link from a switch port.
-     *
-     * @param port port identifier
-     * @param type type of the link
-     * @return the outgoing link if found, otherwise null.
-     */
-    public Link getOutgoingLink(SwitchPort port, String type);
-
-    /**
-     * Gets all the outgoing link from a switch port.
-     *
-     * @param port port identifier
-     * @return outgoing links
-     */
-    public Collection<Link> getOutgoingLinks(SwitchPort port);
-
-    /**
-     * Gets the incoming link to a switch port.
-     * <p/>
-     * FIXME As a temporary workaround, it will look for type "packet" and
-     * returns it if found, else return whichever link is found first.
-     *
-     * @param dpid   the switch DPID.
-     * @param portNumber the switch port number.
-     * @return the incoming link if found, otherwise null.
-     */
-    public Link getIncomingLink(Dpid dpid, PortNumber portNumber);
-
-    /**
-     * Gets the incoming link to a switch port.
-     * <p/>
-     * FIXME As a temporary workaround, it will look for type "packet" and
-     * returns it if found, else return whichever link is found first.
-     *
-     * @param dpid   the switch DPID.
-     * @param portNumber the switch port number.
-     * @param type type of the link
-     * @return the incoming link if found, otherwise null.
-     */
-    public Link getIncomingLink(Dpid dpid, PortNumber portNumber, String type);
-
-    /**
-     * Gets the incoming link to a switch port.
-     * <p/>
-     * FIXME As a temporary workaround, it will look for type "packet" and
-     * returns it if found, else return whichever link is found first.
-     *
-     * @param port port identifier
-     * @return the incoming link if found, otherwise null.
-     */
-    public Link getIncomingLink(SwitchPort port);
-
-    /**
-     * Gets the incoming link to a switch port.
-     *
-     * @param port port identifier
-     * @param type type of the link
-     * @return the incoming link if found, otherwise null.
-     */
-    public Link getIncomingLink(SwitchPort port, String type);
-
-    /**
-     * Gets all the incoming link from a switch port.
-     *
-     * @param port port identifier
-     * @return incoming links
-     */
-    public Collection<Link> getIncomingLinks(SwitchPort port);
-
-    /**
-     * Gets the outgoing link from a switch and a port to another switch and
-     * a port.
-     *
-     * @param srcDpid   the source switch DPID.
-     * @param srcPortNumber the source switch port number.
-     * @param dstDpid   the destination switch DPID.
-     * @param dstPortNumber the destination switch port number.
-     * @return the outgoing link if found, otherwise null.
-     */
-    public Link getLink(Dpid srcDpid, PortNumber srcPortNumber,
-                        Dpid dstDpid, PortNumber dstPortNumber);
-
-    /**
-     * Gets the outgoing link from a switch and a port to another switch and
-     * a port.
-     *
-     * @param srcDpid   the source switch DPID.
-     * @param srcPortNumber the source switch port number.
-     * @param dstDpid   the destination switch DPID.
-     * @param dstPortNumber the destination switch port number.
-     * @param type      type of the link
-     * @return the outgoing link if found, otherwise null.
-     */
-    public Link getLink(Dpid srcDpid, PortNumber srcPortNumber,
-                        Dpid dstDpid, PortNumber dstPortNumber,
-                        String type);
-
-    /**
-     * Gets all links in the network.
-     * <p/>
-     *
-     * @return all links in the network.
-     */
-    public Iterable<Link> getLinks();
-
-    /**
-     * Gets the network device for a given MAC address.
-     *
-     * @param address the MAC address to use.
-     * @return the network device for the MAC address if found, otherwise null.
-     */
-    public Host getHostByMac(MACAddress address);
-
-    /**
-     * Gets all devices in the network.
-     *
-     * @return all devices in the network
-     */
-    public Iterable<Host> getHosts();
-
-    /**
-     * Gets all devices on specified port.
-     *
-     * @param port port which the device is attached
-     * @return all devices attached to the port.
-     */
-    public Collection<Host> getHosts(SwitchPort port);
+    // no additional interface needed.
 }
diff --git a/src/main/java/net/onrc/onos/core/topology/Topology.java b/src/main/java/net/onrc/onos/core/topology/MutableTopology.java
similarity index 72%
rename from src/main/java/net/onrc/onos/core/topology/Topology.java
rename to src/main/java/net/onrc/onos/core/topology/MutableTopology.java
index 464f463..7372bcb 100644
--- a/src/main/java/net/onrc/onos/core/topology/Topology.java
+++ b/src/main/java/net/onrc/onos/core/topology/MutableTopology.java
@@ -4,13 +4,20 @@
 
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+//TODO move to appropriate package under api
 /**
+ * MutableTopology, which this instance can be updated to new view.
+ * <p>
+ * Requires read-lock to access any information on this topology view.
+ * <p>
+ * Note: This is still read-only view of the topology.
+ * <p>
  * The northbound interface to the topology. This interface
  * is presented to the rest of ONOS. It is currently read-only, as we want
  * only the discovery modules to be allowed to modify the topology.
  */
 @JsonSerialize(using = TopologySerializer.class)
-public interface Topology extends ImmutableTopology {
+public interface MutableTopology extends BaseTopology {
 
     /**
      * Acquire a read lock on the entire topology. The topology will not
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java b/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java
index 5411a1b..b50bf48 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java
@@ -33,7 +33,7 @@
 /**
  * Class to represent an instance of Topology Snapshot.
  */
-public class TopologyImpl implements Topology, TopologyInternal {
+public class TopologyImpl implements MutableTopology, TopologyInternal {
 
     private static final Logger log = LoggerFactory.getLogger(TopologyImpl.class);
 
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyInternal.java b/src/main/java/net/onrc/onos/core/topology/TopologyInternal.java
index e712795..292e260 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyInternal.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyInternal.java
@@ -8,10 +8,13 @@
 import net.onrc.onos.core.util.PortNumber;
 import net.onrc.onos.core.util.SwitchPort;
 
+// FIXME This Class hierarchy is wrong.
+// - We need BaseTopology + access to self-contained *Event objects.
+//   abstract class implementing BaseTopology?
 /**
  * Interface to reference internal self-contained elements.
  */
-public interface TopologyInternal extends Topology {
+public interface TopologyInternal extends MutableTopology {
     /**
      * Gets a SwitchEvent.
      *
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyManager.java b/src/main/java/net/onrc/onos/core/topology/TopologyManager.java
index 31933e4..62228f0 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyManager.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyManager.java
@@ -130,11 +130,11 @@
     }
 
     /**
-     * Get the Topology.
+     * Get the MutableTopology.
      *
-     * @return the Topology.
+     * @return the MutableTopology.
      */
-    Topology getTopology() {
+    MutableTopology getTopology() {
         return topology;
     }
 
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyModule.java b/src/main/java/net/onrc/onos/core/topology/TopologyModule.java
index 07ba2cf..7913fc5 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyModule.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyModule.java
@@ -67,7 +67,7 @@
     }
 
     @Override
-    public Topology getTopology() {
+    public MutableTopology getTopology() {
         return topologyManager.getTopology();
     }
 
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java b/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
index 7675aae..d27d68e 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
@@ -69,7 +69,7 @@
 
     private IHostService hostService;
 
-    private Topology topology;
+    private MutableTopology mutableTopology;
 
     private static final String ENABLE_CLEANUP_PROPERTY = "EnableCleanup";
     private boolean cleanupEnabled = true;
@@ -142,7 +142,7 @@
          * registry.
          */
         private void switchCleanup() {
-            Iterable<Switch> switches = topology.getSwitches();
+            Iterable<Switch> switches = mutableTopology.getSwitches();
 
             if (log.isTraceEnabled()) {
                 log.trace("Checking for inactive switches");
@@ -440,7 +440,7 @@
                                 byte[].class,
                                 TopologyEvent.class);
 
-        topology = topologyService.getTopology();
+        mutableTopology = topologyService.getTopology();
 
         // Run the cleanup thread
         String enableCleanup =
diff --git a/src/main/java/net/onrc/onos/core/topology/web/HostsResource.java b/src/main/java/net/onrc/onos/core/topology/web/HostsResource.java
index 301fb9e..70db064 100644
--- a/src/main/java/net/onrc/onos/core/topology/web/HostsResource.java
+++ b/src/main/java/net/onrc/onos/core/topology/web/HostsResource.java
@@ -2,7 +2,7 @@
 
 import static net.onrc.onos.core.topology.web.TopologyResource.eval;
 import net.onrc.onos.core.topology.ITopologyService;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 
 import org.restlet.representation.Representation;
 import org.restlet.resource.Get;
@@ -24,12 +24,12 @@
             (ITopologyService) getContext().getAttributes()
                 .get(ITopologyService.class.getCanonicalName());
 
-        Topology topology = topologyService.getTopology();
-        topology.acquireReadLock();
+        MutableTopology mutableTopology = topologyService.getTopology();
+        mutableTopology.acquireReadLock();
         try {
-            return eval(toRepresentation(topology.getHosts(), null));
+            return eval(toRepresentation(mutableTopology.getHosts(), null));
         } finally {
-            topology.releaseReadLock();
+            mutableTopology.releaseReadLock();
         }
     }
 }
diff --git a/src/main/java/net/onrc/onos/core/topology/web/LinksResource.java b/src/main/java/net/onrc/onos/core/topology/web/LinksResource.java
index 6d910a8..d5fc52c 100644
--- a/src/main/java/net/onrc/onos/core/topology/web/LinksResource.java
+++ b/src/main/java/net/onrc/onos/core/topology/web/LinksResource.java
@@ -2,7 +2,7 @@
 
 import static net.onrc.onos.core.topology.web.TopologyResource.eval;
 import net.onrc.onos.core.topology.ITopologyService;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 
 import org.restlet.representation.Representation;
 import org.restlet.resource.Get;
@@ -24,12 +24,12 @@
             (ITopologyService) getContext().getAttributes()
                 .get(ITopologyService.class.getCanonicalName());
 
-        Topology topology = topologyService.getTopology();
-        topology.acquireReadLock();
+        MutableTopology mutableTopology = topologyService.getTopology();
+        mutableTopology.acquireReadLock();
         try {
-            return eval(toRepresentation(topology.getLinks(), null));
+            return eval(toRepresentation(mutableTopology.getLinks(), null));
         } finally {
-            topology.releaseReadLock();
+            mutableTopology.releaseReadLock();
         }
     }
 }
diff --git a/src/main/java/net/onrc/onos/core/topology/web/SwitchesResource.java b/src/main/java/net/onrc/onos/core/topology/web/SwitchesResource.java
index dfb381e..3eeadbb 100644
--- a/src/main/java/net/onrc/onos/core/topology/web/SwitchesResource.java
+++ b/src/main/java/net/onrc/onos/core/topology/web/SwitchesResource.java
@@ -2,7 +2,7 @@
 
 import static net.onrc.onos.core.topology.web.TopologyResource.eval;
 import net.onrc.onos.core.topology.ITopologyService;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 
 import org.restlet.representation.Representation;
 import org.restlet.resource.Get;
@@ -24,12 +24,12 @@
             (ITopologyService) getContext().getAttributes()
                 .get(ITopologyService.class.getCanonicalName());
 
-        Topology topology = topologyService.getTopology();
-        topology.acquireReadLock();
+        MutableTopology mutableTopology = topologyService.getTopology();
+        mutableTopology.acquireReadLock();
         try {
-            return eval(toRepresentation(topology.getSwitches(), null));
+            return eval(toRepresentation(mutableTopology.getSwitches(), null));
         } finally {
-            topology.releaseReadLock();
+            mutableTopology.releaseReadLock();
         }
     }
 }
diff --git a/src/main/java/net/onrc/onos/core/topology/web/TopologyResource.java b/src/main/java/net/onrc/onos/core/topology/web/TopologyResource.java
index 8068552..7406075 100644
--- a/src/main/java/net/onrc/onos/core/topology/web/TopologyResource.java
+++ b/src/main/java/net/onrc/onos/core/topology/web/TopologyResource.java
@@ -1,7 +1,7 @@
 package net.onrc.onos.core.topology.web;
 
 import net.onrc.onos.core.topology.ITopologyService;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 
 import org.restlet.engine.io.BufferingRepresentation;
 import org.restlet.representation.Representation;
@@ -23,12 +23,12 @@
             (ITopologyService) getContext().getAttributes()
                 .get(ITopologyService.class.getCanonicalName());
 
-        Topology topology = topologyService.getTopology();
-        topology.acquireReadLock();
+        MutableTopology mutableTopology = topologyService.getTopology();
+        mutableTopology.acquireReadLock();
         try {
-            return eval(toRepresentation(topology, null));
+            return eval(toRepresentation(mutableTopology, null));
         } finally {
-            topology.releaseReadLock();
+            mutableTopology.releaseReadLock();
         }
     }
 
diff --git a/src/main/java/net/onrc/onos/core/topology/web/serializers/TopologySerializer.java b/src/main/java/net/onrc/onos/core/topology/web/serializers/TopologySerializer.java
index b241ee4..2e21ab6 100644
--- a/src/main/java/net/onrc/onos/core/topology/web/serializers/TopologySerializer.java
+++ b/src/main/java/net/onrc/onos/core/topology/web/serializers/TopologySerializer.java
@@ -5,7 +5,7 @@
 import net.onrc.onos.core.topology.Host;
 import net.onrc.onos.core.topology.Link;
 import net.onrc.onos.core.topology.Switch;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
 
 import org.codehaus.jackson.JsonGenerator;
 import org.codehaus.jackson.map.SerializerProvider;
@@ -14,25 +14,25 @@
 /**
  * JSON serializer for Topology objects.
  */
-public class TopologySerializer extends SerializerBase<Topology> {
+public class TopologySerializer extends SerializerBase<MutableTopology> {
     /**
      * Default constructor.
      */
     public TopologySerializer() {
-        super(Topology.class);
+        super(MutableTopology.class);
     }
 
     /**
      * Serializes a Topology object in JSON.  The resulting JSON contains the
      * switches, links and ports provided by the Topology object.
      *
-     * @param topology the Topology that is being converted to JSON
+     * @param mutableTopology the Topology that is being converted to JSON
      * @param jsonGenerator generator to place the serialized JSON into
      * @param serializerProvider unused but required for method override
      * @throws IOException if the JSON serialization process fails
      */
     @Override
-    public void serialize(Topology topology,
+    public void serialize(MutableTopology mutableTopology,
                           JsonGenerator jsonGenerator,
                           SerializerProvider serializerProvider)
         throws IOException {
@@ -42,21 +42,21 @@
 
         // Output the switches array
         jsonGenerator.writeArrayFieldStart("switches");
-        for (final Switch swtch : topology.getSwitches()) {
+        for (final Switch swtch : mutableTopology.getSwitches()) {
             jsonGenerator.writeObject(swtch);
         }
         jsonGenerator.writeEndArray();
 
         // Output the links array
         jsonGenerator.writeArrayFieldStart("links");
-        for (final Link link : topology.getLinks()) {
+        for (final Link link : mutableTopology.getLinks()) {
             jsonGenerator.writeObject(link);
         }
         jsonGenerator.writeEndArray();
 
         // Output the hosts array
         jsonGenerator.writeArrayFieldStart("hosts");
-        for (final Host host : topology.getHosts()) {
+        for (final Host host : mutableTopology.getHosts()) {
             jsonGenerator.writeObject(host);
         }
         jsonGenerator.writeEndArray();
