Wednesday, February 13, 2008

iPhone wifi timetrials -- netcat over wifi

I've been doing some housecleaning in my dev-notes and came upon something worthy of a quick paste.
A while back I had noted the performance of the iPhone wifi sitting directly on top of the powerbook-17 1.2ghz running Leopard which was acting as the dedicated AP. I did my best to aim the iPhone at the antenna of the Powerbook on several trial runs to move the speed up or down by a margin of 10-20% by swiveling, rotating, propping, and relocating the iPhone.

Both of the nodes had each other's /etc/hosts sync'd up with the localnetwork default address. There was no default route, nothing but .75 duplex 2.6 ghz and .12 inches between them. (+ a USB cable for sleep prevention)
Netcat is as IO-bound as any program gets, so I am pretty sure this represents the iPhone and powerbook's 802.11g default configuration throughputs.
Scientifically speaking, this is one console-capture, but I ran a dozen partial and full trial runs tests with nearly identical K/s numbers and that was good enough for me.

currently, my iPhone is bone-stock 1.1.3 by accident, awaiting the iPhone SDK. This benchmark took place in December '07.

Setup:


On the iPhone:: socket-connect


# time  nc < /dev/disk0  -vvv   169.254.19.49 9999 
Foehammer.local 
[169.254.19.49] 9999 (distinct) 
open  sent 220610560, rcvd 0  
nc -vvv 169.254.19.49 9999 < /dev/disk0   
0.64s user 56.12s system 35% cpu  2:41.41 total    

On the Powerbook::

jim@Foehammer ~/ipod $ time nc -vvv  -w30 -l  -p 9999  >iphone.disk0.dmg
listening on [any] 9999 ...
connect to [169.254.19.49]
from iPhone-001CB36763B2.local [169.254.222.51] 49519
sent 0, rcvd 220546904

real 2m43.590s
user 0m0.638s
sys 0m9.693s

Google's math of the outcome

((220546904 bytes) / (((120 seconds)) + (43.59000 seconds))) / Mbps = 10.2857103 Mbps

The take-home

The end-goal was determining if Xbox XBMC could hook up to iPhone ftp/samba/upnp shares and play videos without preloading the Xbox hard drive. the answer is most MP4 which fall under 4Mbit, but due to CPU requirements, only "iPod" (768Kb/s) h.264 would be feasable (due to the Xbox's meager 733 MegaHamsterZ).

Higher media throughputs might work if the Xbox sits on the wifi AP connected by cat3 wire or better, and the compression is nil, but in reality mine sits usb-powering its portable d-link DWL-G730AP, and it bogs mightily under the dlink bargain wifi hardware curse.

post-script


The follow-on project to this experiment was to facilitate a python or ruby torrent client intermittently droning along on EDGE bandwidth, staging various file acquisition activities. That particular notion was not a success.
xvid-avis, wmv, etc under 4Mbits would likely work rock steady as well, but chances are they would only be there in the first place in the bittorrent completed files zone, since porting mplayer, vlc, or ffplay was not on any of my iPhone todo's (not prior to a Gentoo install).

The Diamond Age By Neal Stephenson


... and where are we today?

Man I have loved this book since the moment I read it on an 8 hour flight across the country. Any dedicated hacker that catches wind of the prevailing programming concepts[of self-seeding matter and molecules] can't help but begin to consider adopting the perspective that enables self-expanding works from recursive generative algorithms.

The Diamond Age By Neal Stephenson Reviewed at memoirs on a rainy day: "to put together something they call the Seed, a way of being independent of the Feed and liberating his society.

The Seed, an advanced technology that would allow decentralized compilation of matter (as opposed to the centralized pipelines that currently supply basic molecules through the “Feed”). The “Seed” technology would be advantageous for Chinese culture, which is grounded in peasant labor destroyed by Western industrial society..."

Competitive and self-expanding code Seed strategies prevail in Redcode like nowhere else.

In the world of software languages, brainfuck right up there with a potential to first define the primitives and then define the side effects from seed values plugged in to the primitives.


Tuesday, February 5, 2008

Distilled Network Mobility -- Patterns in Network Architecture: A Return to Fundamentals

I was browsing through a network mobility resource in oreilly safari ...


Patterns in Network Architecture: A Return to Fundamentals
BOOK
Patterns in Network Architecture: A Return to Fundamentals
By John Day

Table of Contents


... this book describes to a T the fundamentals of a distributed and mobile object namespace though tends to get irate about certain EITF shortcomings...

but the fact is that an IPv4 address with or without the euphamism of DNS is about as mobile as a tree-root. IPV4 traps the essence of distributed and mobile agent systems from all but the very highest layers of abstractions. I'm not sure I ever counted the number of abstractions rolled into one dissertation of a fused enterprise bus/mobile-distributed agent and namespace/high performance supercomputing swarm platform...

...the world of standards operates in concrete and encapsulated terms that number in the dozens when considering the challenges faced to mobilize code (web isn't even in the same ballpark, or more than a transient conduit) on an ipv4 baseline network... over the years I've seen language developing around concepts far too vastly compounded and complex to iterate when i first started employing these concepts. The language I've used to date is typically as terse as is necessary to pitch products with the benefits built in from patterning after the idealized distributed agent models, however only 1 in 1000's of software professionals or funding sources i've met has voiced or acted on any significant understandings and championing of mobile software agents.

...I found an interesting excerpt that describes the engineering process in general, and very strongly describes nearly every project I've contributed innovations into... I'd liken these analogous to metaphors of hunters and farmers.. or perhaps the options seekers vs. the procedural mindsets.

from John Day's book...

'If one looks carefully over this chronology, one is inexorably drawn to the conclusion that the Internet did not begin to stagnate at the turn of the century, but in the late 1970s. It is here that conservative behavior begins to take hold. It is here that each juncture is not seen as an opportunity to fulfill the earlier vision or to synthesize new insights with previous achievements to create a new innovative direction, but more the minimal change is made to solve the immediate problem and go no further. It begins to seem that people are the keepers of some flame and dare not tamper with what has been entrusted to them, the classic behavior of a "second generation" i.e., not the founding generation. Some will argue that this was the policy of small incremental change that has been a stalwart of Internet development. And they are right; caution in maintaining a production system is a necessity but a slow death for research and the research was far from done. But isn't that just what one would expect from the inheritors of the flame? Is that just a rationalization of a much deeper malaise?'

while I'm not really as incensed as John Day about the challenges of ipv4 or the common theme that those who seek job security often shy from loving their work, I do like the blunt picture of futility vetted succinctly and concisely in one chapter of a book underscoring the challenges of building 'timeless' software agent designs in a stunted and self-afflicted problem domain.


  • Stateless infrastructure stands a better chance of being flawless software foundation than API counterparts which exist as islands of similar base classes.
  • Databases are the doorstep of an enterprise, hardly the foundation, and boy can Oracle screw up a simple socket data delivery design...
  • The business plan is in the hands of its engineers.

Tuesday, January 29, 2008

Portable Resource Control in Java: Application to Mobile Agent Security

I work on an agent mobility platform also designed as an ESB. it is called owch2 on sourceforge.

while coding up a convention of bounded direct IO constant footprint i inadvertently came upon this reference, which is somehow uncannily relevant to the semantics of what I'm implementing, and has some relevant slides on transaction and security quota logic.

SEMAS01-slides.pdf (application/pdf Object)

Without being there with the lecture, much of it is a ambiguous without the J2SEAL codebase being cited until very late in the slide order.

Nonetheless slide shows are the right way to deliver any sort of mobile object discussion, due to the mind-bending nature of building mobile agents and thinking in terms of what can be accomplished by collective and adaptive computing and resource migration.

This as one of a handful of search results for memory quotas in java, 2 of which seem to be agent systems, illustrates the rarity of conservative and/or realtime java consideratins in the wild. a durn shame.

nice going guys!

props to the authors!