Thursday, April 14, 2011

Packets, Supply Chains, and the Road to Alexandria

Packets are discrete units of data that are transmitted over certain types of communication networks. Packets can also contain metadata used to route, decode, and assemble the data. Large data payloads can be broken up and transmitted using multiple packets. The receiver can use the information in the packets to reassemble the full data on the other side.


Ann was traveling to the famed library of Alexandria. If any single location in the known lands held information about the coming darkness, it would be the library of Alexandria. Ann had heard the library described in a whispered reverent tone since she was a little girl. It was rumored to have almost 100,000 scrolls!


As she approached the great Mississoppoly river, she saw something that surprised her. The road traveled straight to the river's edge and stopped. There was no bridge. Ann saw a cluster of people and carts standing near the river's edge.


"Where is the bridge?" she asked.


An old man gave her careful look. "There is no bridge." he finally answered.


"But, how can I get across?" Ann inquired. The very core of her mission was threatened if she were trapped on the western side of the Mississoppoly.


"Ferries." responded the man.


"Fairies?" inquired Ann, scanning the air around her to see if there were any flying nearby. Ann loved fairies. They were such wonderful magical creatures. She had once met the Fairy King in the royal palace when he had come to visit her dad.


"Yep." said the man.


"But, I don't see any." responded Ann. At the same time, she was struggling to figure out how a fairy could help her cross the river. They could not exactly care very much. And, despite the stories, fairy dust was nothing more than sparkly dust that was almost impossible to get out of your clothes.


The man pointed out across the river at a few small boats slowly making their way across the river. A few were heading toward the opposite shore and a few were coming toward Ann.


"Oh. Ferries. I see." Ann was disappointed.


"It'll be 'bout a 2 hour wait." the man advised.


Ann nodded an acknowledgement and dismounted her horse. She led the horse over to a shady patch with long grass. While the horse chewed at the grass, Ann sat and watched the boats come in. The first boat to arrive held 8 crates of supplies. Two soldiers unloaded the boat, placing the crates on a a half empty train of carts nearby. As soon as they had finished, they returned to waiting against the last cart. Twenty minutes later, another boat arrived with 4 more crates of supplies and a third soldier. Together, the three soldiers moved the crates onto a cart. Ann was intrigued.


"Excuse me." she called. "What are you doing?"


The soldiers looked confused. "Shipping supplies." one of them answered as though it was the most obvious thing in the world.


"Yes. I understand that." agreed Ann. "But, why do you send them over different boats? Why not just ride one boat over?"


"Too much stuff." called the old man from behind her. "You can't fit all that on the boat."


"Then why not use bigger boats?" asked Ann.


"Ah. Right. Why did I never think of that?" laughed the old man, who Ann now realized was the ferry master. "Just use bigger boats."


Suddenly, his face got serious. "You know what big boats cost to run? Or how long they take to load and unload? I could end up holding up a tiny shipment for days while I am loading a bigger boat. And how big a boat should I get? No matter how big a boat I pick, someone will always have a bigger shipment to get across. No, no, no. Better to use packets."


"Packets?" asked Ann.


"Yes. That's the name of these here smaller boats. Sure, we have to split up some shipments to get them across, but it is a tradeoff. Sometimes we have a lot of little trips to make and the boats have some empty space. And sometimes we have bigger loads. But as long as we can break the loads up and put them on packets, I can get them across. It just means that someone has to wait at the other side for all the packets to arrive and then reassemble their shipment. "


"But what if you have a HUGE supply train?" asked Ann.


"Then I send a lot of packets across, don't I?"


"I guess so." agreed Ann. There was a simplicity to the system. "But doesn't a large shipment slow everything down?"


"The nice part about using many small boats is I can do multiple shipments in parallel. If I am shipping a hundred packets worth of wheat across the river and someone comes on their way to the hospital, I can send them off in parallel. That is one of the beautiful things about using a lot of small boats. I do not need to finish loading one huge boat before starting the next. I can have multiple streams of shipments going on at once. Of course, there is some per-boat overhead; you need to get it into the dock in the first place. So, really tiny boats would be too much coordination."


Ann had to admit that the system did sound flexible. She remembered hearing that her brother had to wait for three days before his first ocean voyage, because it took that long to load the boat. She could not imagine such delays being feasible for a river crossing.


"And they just go back and forth all day?" she confirmed.


"Mostly. Although there is a little more to it than just the cargo and the boat. The captains can get instructions to travel upstream or downstream a bit - to different landings, you know. There are four on this side and three on the other. This particular landing gets most of the traffic, because of the road."


"Are there any south of here? Closer to Alexandria?" inquired Ann.


"Sure. I can send a packet to the landing at Gretock. It is a nice, little, basket-weaving village. Might save you a few hours if you are on your way to Alexandria. It will still be about a two hour wait though."


Ann was thrilled. She continued to watch the small boats flow in-to and out-of the landing for the next two hours. Then, when her turn arrived, she happily boarded one of the boats and continued on her journey.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.