Skip to content

chak89/processing-channel-zaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

DAT320 - Operating Systems

Mandatory Lab 5: Processing Channel Zaps

Implementation of a Zap Event Processing Server(in Golang including RPC client and server) that processes events generated by a simulated traffic generator that broadcast to the multicast address and port 225.224.0.1.130:10000 .


Below is shown a few samples of the message format of the zap events generated:

2013/07/20, 21:57:48, 98.202.244.97, FEM, TVNORGE
2013/07/20, 21:57:44, 12.23.36.158, Canal 9, MAX
2013/07/20, 21:57:46, 81.187.186.219, TV2 Bliss, TV2 Zebra
2013/07/20, 21:57:42, 61.77.4.101, TV2 Film, TV2 Bliss

Field No. Field Name Description
1 Date The date that the event was sent.
2 Time The time that the event was sent.
3 IP The IPv4 address of the sending set-top box unit.
4 FromChan The previous channel of the set-top box.
5 ToChan The new channel of the set-top box.

Source files description:

File Description
src/DAT320/lab5/UDP_server/UDP_server.go Main program.
src/DAT320/lab5/zaplab/Store_Zap_Events/Stores_Zap_Events.go Data structure for storing individual zap events.
src/DAT320/lab5/zaplab/zstorage/zstorage.go Slice-based storage solution.
src/DAT320/lab5/zaplab/zmap/zmap.go Map-based storage solution.
src/DAT320/lab5/zaplab/SortMap/SortMap.go Algorithm to compute top-10 channels.
src/DAT320/lab5/RPCserver/RPCserver.go RPC server
src/DAT320/lab5/RPCclient/RPCclient.go RPC client


How to run:


UDP_server.go

There are two storage methods, map-based and slice-based. Map-based storage solution is activated by default.
Activating/deactivaing can be done under func handleClient(conn *net.UDPConn)

Compute top-10 channels are aslo activated by default. Different features like memory profiling can be activated by uncommenting those functions under main().


RPCserver.go

Run as usual, default port is set to 55555.


RPCclient.go
Takes two arguments, IP and portnumber.

An example:
If RPCserver.go is run on the same computer as RPCclient.go then input 127.0.0.1:55555 as arguments.


The user will then be prompted for a name and desired refreshrate on the subscription.
To unsubscribe from the server and exit hold down the keys "CTRL + C".
To exit without unsubscribing hold down the keys "CTRL + Z".



About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages