views:

127

answers:

2

I've this system that consists of lots of different stages piped together. Specifically, I've got lots of different processes that communicate via tcp-ip; messages are exchanged via a packet oriented protocol (more messages can be stuffed together in a single wire-protocol data unit if certains conditions are met); I've control flow queues too - sockets are non blocking, if I fail to send I queue messages or even coalesce them in the send queue; of course what happens at runtime depends on tcp ip control flow underneath, so I'd like to model the tcp ip queues, too. So the question is - can anyone share their thoughts on how to make a simulation for my system? I've thought to make a simulator for it - that is: a program with a queue data structure for every queue I have in my model, for each time tick I make the model evolve according to my understanding of the sytstem i.e. if the data structure for the tcp buffer in my model says it has space enough I decrement the message number in the output queue and decrease the available space counter in the tcp buffer model by the size of the message, and so on - then I make the tcp buffer empty at a rate based on the bandwidth for the tcp link (of course I'm making the hypothesis that I'm pumping lots of data and that the only parameter for the tcp link is bandwidth). Building such a thing seems a lot of effort and I'm not sure it is what I need. Maybe I'd better off with some kind of excel spreadsheet model, but I'm not sure how to structure it.

A: 

You might get a still useful but simpler to create model by using a discrete event simulation tool or library. You still have to duplicate most of the structure of your application in the form the model understands, but get tools for injecting different distributions of message rates and maybe can play with different scenarios more easily.

Pete Kirkham
A: 

You could use Ronald Szeto's TCP Simulator. It has a Java interface to it. I wouldn't try to get so complicated with paired queues. Just model your system, and then use this simulator to model the underlying network conditions, and link them together as you would have in your OS. I'm assuming you probably don't have separate network queues on your real system for every one in your application.

John Ellinwood