Wednesday, September 15, 2010

Empire Building on the Internet

So you want to build yourself an empire on the Internet.  You have a great idea for a new product, you scrape together some money, get a web site built, and open your first Internet storefront.  Time to conquer the competition.  Things start off well.  Your site makes a splash, people love your product, and they start coming in droves.  One problem: your site can't handle the load.

Waiting time for a queuing system (Brian Tung)
You've just encountered the harsh realities of queuing theory. Imagine you own a bakery, and you employ one clerk to staff the store.  The clerk is fairly efficient and takes about a minute to handle a customer.  Some customers will take longer, because they have a special order.  If two customers arrive within 30 seconds of each other, clearly the second will have to wait until the first one is finished.  If customers keep arriving quickly, a line will form.  Queuing theory says that if customers start arriving close to the capacity of the store (1 customer per minute), delays will quickly grow and waiting time will become infinite.  The remarkable thing is that this happens before the store reaches its capacity, because some customers take longer to service than one minute, and because sometimes customers arrive sooner than the average.  The same situation holds whether you run a bakery, a web server, or a highway.  (See Brian Tung's excellent blog entry explaining why this happens for freeway traffic.)


Internet caching

Clearly, if you want to build an Internet empire, you need to be able to create a scalable system, one that can handle significantly large increases in demand.  The general rule of thumb is that scaling problems are best handled using a hierarchy.  If you are the king of an empire, you can't possibly settle the requests of every commoner in person.  You need a hierarchy of lords and nobles to handle these matters for you, and as your empire grows you'll need trusted governors who can manage the far-flung outposts of your realm.  On the Internet, this translates into creating a hierarchy of caches.  The server running a large web site will often push its data into caches distributed around the Internet; each cache holds a copy of the same information the web site would normally provide.  When a customer needs to access the site, it instead uses a cache, spreading the demand across all the caches.  (Note: The same thing also happens in reverse.  Web browsers access the Internet through a cache run by their ISP, so typically a customer's cache is talking to the server's cache.)

Hierarchies of caches are everywhere in computing, because scalability is such an important trait. What role did hierarchy play as civilizations tried to "scale up" to become empires?  How did the evolution of communication affect the feasibility of these structures?

6 comments:

Unknown said...

Thanks for the information on why servers get overloaded and crash--I've often wondered why as I'm sitting at my computer and drumming my fingers in frustration as I attempt to register for classes while the BYU server crashes for the upteenth time. Perhaps BYU needs a more scaleable system. Or maybe I just need to learn patience.

Communication plays a huge role in building any empire; as the empire expands beyond what is feasible for control by one person, tasks are delegated to others, who must have an effective means of communication for the empire to run smoothly. With faster, more extensive means of communication, a large empire becomes much more conceivable.

James Wilcox said...

This is an interesting concept that we were disusing in my Information Systems Class yesterday. We were talking about maximizing the use of space and the importance of elimination duplicate entries of any kind. The two main reasons we discused you would ever want to have duplicates is for backup purposes and to send out copies closer to the end user like in your diagram above. I feel like my two classes are merging in together.

Madeline K. Rupard said...

You know, its a wonder why this kind of basic computer/internet science isn't considered a crucial part of education these days. Nearly everyone experiences this problem at some point or another, and since the internet is such a large part of the modern man/woman's life, this stuff should be taught like any other mainstream knowledge about mathematics and literature would be taught. I never knew what a cache was, but I heard the term all my life. I still don't understand many things about the internet, but I rely on it so much.

kristina said...

To answer this question: What role did hierarchy play as civilizations tried to "scale up" to become empires? I would say, hierarchies played an organizational role. There was someone who wanted to be king or accepted the title of king and then he needed people to help manage the requests, issues, wants and desires of the people in his kingdom. The kingdom was too large for him to fill every "order" (going bake to the bakery analogy) and so he employed other people to help him run his kingdom. These people were lords and were given a stewardship over part of the kingdom. They would fill the requests of the people of a certain area and would keep the king informed. just as the king would give the lords instructions for the lords to give to the people. So, lords and other nobles are like caches. They are given a copy of the king's authority, stewardship, and instructions. I like this analogy.

Unknown said...

Kristina, I really like this analogy too, the hard part is that I'm pretty sure caches don't have minds of their own and will rule how they see it, and not how the king wants it run. I can see this as how the Great Apostasy came about, because the caches were people, and not computers, making emotional decisions.

Unknown said...

Kristina and Erin ... the analogy is certainly not perfect, but I like it. Ideally, a lord or noble is supposed to do exactly what the king wants, and he may suffer the consequences if he doesn't.

Ariel, I agree that communication plays an important role here, and that improving technologies can result in better scalability, both of empires and other systems. Modern corporations are mini-empires, in a sense.

Madeline, I'm definitely giving it some thought.

Post a Comment