Roland Besserer
unread,Jan 30, 2013, 12:08:37 PM1/30/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I would like to solicit suggestions for the 'best' mechanism (in terms of
scalability and performance) to use for the following problem:
The code monitors multicast packets on a port. The packets are parsed into
a data definition that extracts a set of fields which are a mix of Strings
and binary values. For example:
data XXXmessage = XXXmessage {
sessionName ∷ String,
connectionInfo ∷ String,
catgeoryName ∷ String,
transportPort ∷ Int,
mcm ∷ String,
bitrate ∷ Int
} deriving (Show, Read, Eq)
The packets arrive at highly variable rates ranging from a few packets per
seconds to a few thousand per second. There is also a high rate of
duplication (aka identical packets). At the higher repetition rates, the
number of unique packets is in range of a few dozen to possibly a few
thousand.
One thread monitors the multicast port. Only unique packets (in terms of
sessionName & sessionCategory from the above declaration) are retained.
Other threads access the list (map) of unique packets and perform a number
of operations on them, including a simple gui that lists them. Each packet
is also tagged whenever it is encountered in the stream and another thread
will remove a packet from the list of know unique packets when it has not
been seen for a specific time period.
I am wondering about the most appropriate way of encapsulating the parsed
unique packets is in terms of performance and scalability considering the
fact that the size and access rates (for tagging) vary greatly.
Regards