Sam’s Network Simulation Cradle Blog

25 Aug 2005

Another network simulator of note

Filed under: Network Simulation Cradle — sammydre @ 9:12 pm

GTNetS simulator — the simulation “scripts” are actually written in C++, which is interesting.

Doesn’t look to be actively maintained? Not sure. I think I’ve probably encountered it before…

12 Aug 2005

TCP disconnect

Filed under: Network Simulation Cradle, Optical Networking — sammydre @ 12:51 am

ns-2 has some basic web traffic models that seem to be a SURGE implementation. Coding wise they are a bit nasty, with callbacks to OTcl from C++ everywhere. I imagine that has a significant performance impact? But lets ignore that, it isn’t critical.

The models seem to work fine with the normal one-way TCP, but get some nasty errors when using FullTcp.

0.100090: FullTcpAgent::recv(_o659): bad ACK for our SYN:  [24:2.1>0.1] 
(hlen:40, dlen:0, seq:1002, ack:2, flags:0x18 (<PSH,ACK>), salen:0, reason:0x0)
0.100120: FullTcpAgent::recv(_o660) got packet lacking ACK (state:3): [29:0.1>2.1]
(hlen:40, dlen:0, seq:2, ack:0, flags:0x0 (<null>), salen:0, reason:0x0)

While I often try and stay away from the FullTcp-based models, I see it as a requisite when:

  1. We are doing bidirectional data transfer – the request has a size too!
  2. The unidirectional TCP models don’t segment data over packets properly. Each data packet is always full size. So if the MSS is 1000 and you want to send 1001 bytes, you end up sending two full size packets. This seems quite ridiculous to me and makes it very hard to control the presented load on the network.

So I wrote my own SURGE based model in C++ for ns-2. I stayed away from OTcl. It seemed to be working fine, then I wanted to add the functionality of actually doing a connection establishment for every page and object. Or at least every page. Connecting is easy, it is the disconnecting that is annoying. The API is not exposed to C++ and then the entire process seems very buggy. I just want my FullTcp agent to disconnect properly and reset itself so it may be re-used for the next connection. But no, trying to get the combination of FINS correct seems to be very hard. I don’t know what the FullTcp agent is doing, but it looks very wrong. A way to get around this problem is just to keep allocating new TCP objects whenever a new connection is required. This is how the other model works as far as I know. Seems like a silly solution when you could just reuse the existing stuff.

This was supposed to be an easy activity I would have coded up quickly this morning. It is now almost 2pm and I don’t have a good answer.

Someone should get some real world network stacks that work properly, and put them in a network simulator. Wouldn’t that be a good idea!

6 Aug 2005

Back on track

Filed under: Network Simulation Cradle, Optical Networking — sammydre @ 1:15 am

Enough of the non-CS related stuff for now.

A paper on statistical distributions for traffic generation in simulation. Well, talks about generating self-similar traffic in network simulation and compares some methods.

1 Aug 2005

A bit of Linux kernel code in user space for testing

Filed under: Network Simulation Cradle — sammydre @ 7:49 pm

IBM Project ‘nfsim’

Something not related to computer science for once

Filed under: General — sammydre @ 7:10 am

For some reason I have the want to “blog” in a what might be described as a more traditional sense. So I am not writing to keep a log of what I am doing in my research, instead I intend to write about my cullinary adventures.

I wanted to cook something Singaporean. Something inspired by Wok Fried Kway Teow, perhaps, but with less frying in pig fat. Certainly noodle based.

I had a look around and found this recipe for Singapore Noodle Curry Shrimp on allrecipes.com. Looked interesting, I thought!

Earlier today I had been shopping and had got some ingrediants I thought would be needed. I was right, but I was also missing a lot of stuff if I go by that recipe. So in normal Sam cooking fashion, I just winged it. Note: the noodles I had were egg noodles, not rice noodles.

I chopped up some ginger and garlic and chucked it in a frying pan (yes, I didn’t even bother with a wok). Got this cooking in some vegetable oil, then chucked the rest of my chopped veges in: red capsicum, 2 spring onions, and one small carrot, all chopped up into thin slices or small pieces. I let this cook for a while, stirring whenever I could, while I formulated a plan for the rest of the recipe. I referred back to the original recipe and found it wanted curry powder. Nope, don’t have any, but I found some Tandoori seasoning. In it goes. Oh look, seasame oil! I’ll chuck a bit of that in too, the veges are looking lonely in there. Just a couple of teaspoons of each.

I got some chicken breast meat and half a punnet of shrimps from the freezer and managed to thaw them out a bit. Also started making the sauce stuff mentioned in the above recipe. Hot water, chicken seasoning, way too much dark soy sauce, salt and sugar. Probably about a cup of water, a couple of teaspoons of chicken stock, about 6 teaspoons of soy sauce, two or three of sugar and a tiny amount of salt. I combined this in a seperate bowl and left it alone. Put the meat in with the veges, turned the heat up, and sauteed to me hearts content. Or did I stir fry? Anyway, once the meat was looking like it was pretty much cooked (doesn’t take long with small pieces of chicken and shrimp. Did I say I cut the chicken up into bits?) I dumped the sauce stuff in. It was supposed to have oyster sauce in it too, but I don’t have any of that.

Let this simmer for a minute or two while I looked at the noodles and wondered what to do with them. They require a bit of boiling in water to become tender, of course. I started getting another pot for them, then thought, “nah, they can go in with the stuff that is currently simmering in water”. I think the original recipe may have called for this. Anyway, I put the noodles in there and the pan was very full. It took a while, but the noodles ate up all the watery saucy stuff and eventually became nice and tender. I mixed it all together once the noodles were unstuck and gave it an extra minute cooking, mixing it about a lot. At some point during this process I also put a teaspoon of chilli powder in.

Then straight into a bowl and I ate it. The noodles absorbed a lot of flavour, which was good, but the soy sauce was too strong I think, they tasted a bit too much like that. Overall it was quite strong and slightly hot, I certainly felt like a drink afterwards, though it was far from hot enough to actually produce any burning sensation in the mouth. Quite enjoyable, less liberal use of soy sauce might make it rather nice.

See the finished product!

Powered by WordPress