On Wed, Oct 1, 2008 at 7:53 AM, Andrew Lentvorski <[EMAIL PROTECTED]> wrote: > SJS wrote: >> >> begin quoting Andrew Lentvorski as of Tue, Sep 30, 2008 at 01:48:53PM >> -0700: >>> >>> Unfortunately, everybody forgets that TCP/IP is two state machines on >>> different computers that are in *absolute lockstep* with one another. >>> >>> Not exactly loose coupling ... >> >> This just doesn't sit right with me, for some reason. Implementation >> difficulty or adherence to an interface isn't the primary measure of >> coupling -- rather, it's how easy (or hard) it is to rip out one >> implemenation and replace it with another. > > Well, the continuing frustratation^Wmigration from IPv4 to IPv6 shows this > is *very* tightly coupled. It is not very easy to rip out. The problem, of > course, if the fact that you have to replace the state machines on *both* > sides simultaneously.
Right. >> If the Internet isn't loosely coupled -- and don't get me wrong, I think >> this is an interesting viewpoint to consider, and I'd like to beat it to >> death -- then just what would you consider to be loosely coupled? > > I would probably define "Loosely coupled" in the context of the IntarWeb as > the ability to replace *one side* of the system with an alternative and have > it still work. Agree. > So, SMTP qualifies as loosely coupled because you can replace either side of > the system (MUA or MTA) and it still works. Similarly, web servers and > clients. Correct the WWW is loosely coupled, because HTTP is stateless. Again see also Roy Fielding's thesis, which comment has been completely ignored: http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm especially Chapter 5 "Representational State Transfer (REST)" http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm OK, if you won't follow the link I will make an appeal to authority. Who is Roy Fielding? See http://www.faqs.org/rfcs/rfc2616.html I think this guy understands the issues. > TCP/IP is obviously not loosely coupled. Stateful web stuff is probably > pushing the boundaries. I haven't seen an AJAX system that actually allows > you to rip out one side or the other without significant pain. Probably not > loosely coupled. BitTorrent--probably not loosely coupled in spite of the > number of clients--most of them suck donkey balls. You got it. > Generally, the issue is that of *state*. Probably a good measure of > coupling is to take the number of states per link side (n) and consider the > coupling to be (n*n)!. Ouch, but yes. > It really doesn't take very many states before your coupling turns to tar. > For example, web--pretty much 2 states per side (wait-respond and > send-wait) is a complexity of 4! and counts as loosely coupled. TCP/IP has > 11 states per side (not counting some implied stuff) with a complexity of > 121! and has the coupling of cured concrete. > > This tends to match my experience. Any man+dog can write a text web >server > or client--TCP/IP stacks tend to be rare as hen's teeth and rife with > obscure bugs. Very good review Andy, State is the problem. Maybe a way to tackle the problem is to ask how do I guarantee that two coupled state machines track each other. I really need to find a better way to say that but I gotta get back to more mundane work. BobLQ -- KPLUG-LPSG@kernel-panic.org http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg