A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
I am monitoring certain types of events that can happen multiple times per second. What I want to do is generate a graph to show the number of times these happen.
Is there a pattern or process out there that will help me out here? I'm sure this has been done many times before, but I'm just not quite sure how to search for what I'm after. And I'm pretty sure that what I could code up off the top of my head would not be the ideal solution.
Fowler's book, Analysis Patterns, has a section on temporal patterns. I don't remember if it covers this specific situation, as the book was quite dense.
If you are using Java, you may find the Google Collections library to be helpful - they have Sets that count occurences, etc.
Friday, June 06, 2008
This reminds me of some analysis I had to do for a telecoms company. I needed to show the number of circuits (calls) open on the switch against time. From the call records you get the start time and the duration.
I felt sure there must be an "clever" way to do this, but couldn't find it at the time. So, I did it by brute force. Create a table with one row per second of the day of interest, then for each call record (about a million a day at that time), increment the counter for the appropriate seconds. It was a trivial solution, but took a while to run.
I was trying to prove to a third-party supplier that their equipment wasn't working. They sold my client a "black box" that was supposed to compress eight calls into each line, so the quality wasn't great, but it was cheaper. They said that they had been monitoring our box remotely and it was delivering a consistent 7-8 calls per line. Of course, they were lying, as my analysis showed. The switch was only getting 5-6 calls into each line, so the cost/benefit failed. The client got a rebate, based on my work, so my day of work paid off big time.
That was an interesting project. They were trying to break the state-owned telecoms monopoly in Cyprus. Nobody else was allowed to be a telecoms operator then, but they got around it by some clever tricks. It was probably "illegal" in Cyprus, but they were making so much money doing this from the UK, that they didn't care.
It worked by making data calls from London, via BT ISDN, to Cyprus (which was expensive), then using the data connection to pass several voice calls over each data line (using the black-box compression). This meant the high cost of the data connection was shared across lots of calls. Once the call got to the UK, it could be sent anywhere in the world at low cost on the client's own global fibre network.
It worked well from the customer's point of view, as calls with the state monopoly were very expensive. It was even cheaper to call elsewhere in Cyprus via London.
I learned a lot working for those guys. They had all sorts of interesting things going on.
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz