Added Topology WebSocket server implementation.
It allows remote applications (e.g., the GUI) to subscribe
for Topology-related events.
The URL is:
ws://hostname:8081/ws/onos/topology
When a new client opens a socket, the server transmits the whole topology.
From that moment on, the server sends topology events (deltas) if there
are any changes in the topology. Currently, all objects are encoded in JSON.
The default WebSocket port number is set to 8081
(configurable in conf/onos.properties)
NOTE: In the current implementation, the initial fetching of the topology,
and adding topology events for transmission are done by two different threads.
Hence, when a new client opens a socket, there is a small window of time
when some of the added events are "moving back in time".
The final result of applying all events will be technically correct, but
those "moving back in time" events are semantically incorrect.
This issue will be addressed in later iterations / refactoring of the
implementation.
Change-Id: Id2cbf72d1384208201d916e0aa1e5926659878ee
diff --git a/conf/onos.properties b/conf/onos.properties
index a19cee5..e2b0bdc 100644
--- a/conf/onos.properties
+++ b/conf/onos.properties
@@ -6,12 +6,14 @@
net.onrc.onos.core.intent.runtime.PathCalcRuntimeModule,\
net.onrc.onos.core.intent.runtime.PlanInstallModule,\
net.onrc.onos.core.registry.ZookeeperRegistry, \
-net.onrc.onos.core.metrics.OnosMetricsModule
+net.onrc.onos.core.metrics.OnosMetricsModule, \
+net.onrc.onos.apps.websocket.WebSocketModule
net.floodlightcontroller.restserver.RestApiServer.port = 8080
net.floodlightcontroller.core.FloodlightProvider.openflowport = 6633
net.floodlightcontroller.core.FloodlightProvider.workerthreads = 16
net.floodlightcontroller.forwarding.Forwarding.idletimeout = 5
net.floodlightcontroller.forwarding.Forwarding.hardtimeout = 0
+net.onrc.onos.apps.websocket.WebSocketModule.port = 8081
# NOTE: Do NOT modify or remove the line below. This value will be overwritten by onos.sh script.
net.onrc.onos.core.datagrid.HazelcastDatagrid.datagridConfig =
# Uncomment and list all the ZooKeeper instances after localhost on multi-instance deployment.