|
James Todd[Gonzo] :: Consistently Random
[rss] java == platform independence xml == application independence jxta == network independence |
[ [ gonzo@java.net ] [ jxta ] [ myjxta ] [ planetsun ] [ java.net ] [ java.sun ] |
| "Ice Cube said check yourself before you wreck yourself, Placebo say hang on to your IQ." | ||
|
JXTA for the REST of the world :: MeerKat :: chat about it
one of my first ah-ha moments w/ jxta was when, for me at least, i envisioned it being, at it's lowest level, a socket. a kick a$$ socket, but a socket none the less. a socket that slurps up late binding and constantly changing addresses of varying protocols w/ ease. of course, there is more to jxta but for me, it was the socket perspective that intrigued me the most. now, sockets are fine an all, w/ jxta socket being the tastiest of all, but it is what you do w/ said socket that matters. having worked on tomcat in the day (ahhhhh, good times), built a number of ecom systems (i *hate* the letter e as a result), and an interesting application at a startup (shudder) it's pretty obvious that http is, for the most part, fine. various protocols are stacked on http which are subject of debate, but http is, well, simple, and simple is good. can i get an amen! w/ that as backing context and having an itch that has needed scratching for 2+ years now, and having a very real need to simply the $%^@ out of a current gig i opted to lay down some code that takes my tomcat experience and binds it squarely over the jxta socket keeping in mind all the while tha ease of use is paramont ... as i'm going to use this stuff myself. i've been talking about this for awhile now but talk is, well, cheap. so, what did i end up with? here's the skinny. there is a server and a client component, probably more approriately noted as requester and responder moving forward in a jxta context as "this ain't your father's server." here's what the server looks like:
the basic idea is that one can start up a server (listener) socket and accept inbound connections. a series of "peerlets" can be registered, not entirely unlike a servlet, that will be selected as the connection handler delegate based on some regex mojo as specified by the key, a "webapp context" in servlet parlance. that's about it.
now, this is just a prototype as this point in time but, again, taking my past experience into account (mom taught me well, learn from life's lessons and be nice to people) here's what a peerlet looks like today (read hell'a simple):
now, the client side is where the fun starts to happen. well, it's all fun to be honest, but this is where my juices really start to flow. here's the basisc:
basically, given a uri with a specified protocol, in this case "p2pp," we can now use java-only classes to connect to the server and open input and output streams. in my case, i have a little rest engine baked into the mix which simply shuttle mime messages across the wire. which is precicely what i need right now, no, wait, i needed that like 2 years back. since my folding space-time continuum device is presently in for repairs i only have the present ... the result can be summarise as "meerkat," tomcat's fleet footed sibling. i'll expand on this more in following thread. till then, here's a joyous run:
not perfect but if one conciders how simple it was to get to this point it, well, thrills the heck out of me. the "jxta url protocl handler" can back pretty much anything, as my deep thinking compadre bblfish and i have discussed, well, since our paths first crossed via bloged code sling'age. on top of meerkat we can project any number of flavorful content, of which foaf:rdf looks the most attractive. myjxta has already start to shuttle about rdf data so we have an app with which to readily test pilot these ideas further. MyJXTA :: use it - learn it - do it
Java == platform independence in my ears: Death In Vegas/Death In Vegas/Days Go By [2005-09-15 14:16:58.0] Permalink Comments [7]
Trackback URL: http://blogs.sun.com/gonzo/entry/jxta_for_the_rest_of1
Post a Comment: |
Posted by Mark Baker on October 05, 2005 at 07:24 AM PDT #
Posted by gonzo on October 06, 2005 at 02:55 AM PDT #
Posted by Brad Neuberg on October 20, 2005 at 03:42 PM PDT #
Posted by gonzo on October 20, 2005 at 06:28 PM PDT #
Posted by 10 on May 30, 2006 at 04:30 PM PDT #
Posted by 216.82.206.190 on October 27, 2006 at 03:06 PM PDT #
Posted by chenliguo on November 29, 2006 at 07:56 PM PST #