Skip to Content »
online discount medstore
advair diskus for sale
buy advair diskus without prescription
allegra for sale
buy allegra without prescription
aristocort for sale
buy aristocort without prescription
astelin for sale
buy astelin without prescription
atarax for sale
buy atarax without prescription
benadryl for sale
buy benadryl without prescription
buy clarinex without prescription
clarinex for sale
buy claritin without prescription
claritin for sale
buy flonase without prescription
flonase for sale
buy ventolin without prescription
ventolin for sale
amoxil for sale
buy amoxil without prescription
augmentin for sale
buy augmentin without prescription
bactrim for sale
buy bactrim without prescription
biaxin for sale
buy biaxin without prescription
buy cipro without prescription
cipro for sale
buy cleocin without prescription
cleocin for sale
buy dexone without prescription
dexone for sale
buy flagyl without prescription
flagyl for sale
buy levaquin without prescription
levaquin for sale
buy omnicef without prescription
omnicef for sale
amaryl for sale
buy amaryl without prescription
buy cozaar without prescription
cozaar for sale
buy diabecon without prescription
diabecon for sale
buy glucophage without prescription
glucophage for sale
buy glucotrol without prescription
glucotrol for sale
buy glucovance without prescription
glucovance for sale
buy micronase without prescription
micronase for sale
buy prandin without prescription
prandin for sale
buy precose without prescription
precose for sale
buy cialis professional without prescription
cialis professional for sale
buy cialis soft without prescription
cialis soft for sale
buy cialis super active without prescription
cialis super active for sale
buy cialis without prescription
cialis for sale
buy levitra without prescription
levitra for sale
buy viagra professional without prescription
viagra professional for sale
buy viagra soft without prescription
viagra soft for sale
buy viagra super active without prescription
viagra super active for sale
buy viagra super force without prescription
viagra super force for sale
buy viagra without prescription
viagra for sale
buy celebrex without prescription
celebrex for sale
buy colcrys without prescription
colcrys for sale
buy feldene without prescription
feldene for sale
buy imitrex without prescription
imitrex for sale
buy inderal without prescription
inderal for sale
buy indocin without prescription
indocin for sale
buy naprosyn without prescription
naprosyn for sale
buy pletal without prescription
pletal for sale
buy robaxin without prescription
robaxin for sale
buy voltaren without prescription
voltaren for sale

Tech Life of Recht » Fun with JXTA

 Fun with JXTA

  • October 26th, 2009
  • 10:46 pm

Recently, I’ve been messing around with JXTA – one of the things you might have heard about at some point (like JINI, for example), but never really given any thought to. Probably rightly so, because it’s only interesting if you do any kind of P2P. And not just human peers.

Anyways, we’re planning on using JXTA to create a distributed version of one of our big monolithic systems. The data model has been modified to support distribution, and we’ve had a prototype running with hardcoded communication channels. However, JXTA makes everything much more dynamic, and it also introduces the concept of rendezvous and relay nodes so all nodes don’t have to be on the same network – they don’t even have to connect to each other directly. Pretty sweet stuff.

It turns out, however, that the JXTA documentation really doesn’t explain everything, so I have two things I want to share – not that I expect them to be useful to very many people.

The first thing is really just a problem rather than a solution. I develop on a nice Macbook Pro Santa Rosa. I don’t particularly like Apple (as in not at all, actually. Developer-wise, they might even be higher on the hate-list than Microsoft), so I’ve removed OSX entirely and installed Ubuntu instead. Now you might ask why I then use a Macbook at all, but it turns out that they make pretty good hardware, so I go with that. Incidentally, I also have an iMac at home, also running Ubuntu. It turns out that this is a problem in one single regard: When I have the wireless network enabled and start a JXTA application, the kernel will freeze. Every time. And there will be no errors in any log files. Nothing bad happens if I use wired network or a 3G modem – which is my solution until now. Of course, it seems that nobody in the whole world has ever had this problem, so there’s not much chance of getting it fixed (and where do you report such a bug?).

The other thing that’s been consuming quite a lot of my time is JXTASockets. JXTASockets are basically regular Java sockets running over JXTA. Instead of connecting to a specific host on a specific port, you simply ask JXTA to give you a socket to an abstract host identifier. JXTA will then route the request to the appropriate host, and then you can send and receive data. Except for the connect phase, it works just like a normal socket. Except not entirely. In many cases you would do something like on the server side:

[code]
JXTAServerSocket server = new JXTAServerSocket(…);
while (true) {
JXTASocket socket = server.accept();
InputStream is = socket.getInputStream();
OutputStream os = socket.getOutputStream();

int b = -1;
while ((b = is.read()) > -1) {
// buffer bytes
}
is.close();

byte[] res = handleRequest(buffer);
os.write(res);
os.close();
socket.close();
}
[/code]

And on the client side something like this:
[code]
Socket socket = new JXTASocket(…);
InputStream is = socket.getInputStream();
OutputStream os = socket.getOutputStream();

os.write(generateRequest());
os.close();

readResponse(is);
is.close();
socket.close();
[/code]

Of course, all sorts of error handling, buffering, and other stuff is missing, but the overall procedure should be clear: the client writes to the output stream and closes it. The server reads from the stream until it has been closed. The server then generates a response and writes it back. Add the appropriate resource handling, and this will work using normal sockets, but it will not work with JXTA. And no, it is not obvious why. In fact, I think the plot of “A Serious Man” is more obvious, and if you’ve seen the movie, you’ll probably agree with me that it is, indeed, not obvious at all.
The problem with JXTA turns out to be that both streams must be open all the time. If you, for example, close the output stream on the client side to signal that there is no more data, the server side will simply get a read timeout at some point. This basically means that you cannot use a closed stream to signal the end of the data stream, so instead you have to write the data length to the stream first, and then the data. The receiving side can then read the data length first, and then read the actual data accordingly. Which is not bad, it just sucks when you’ve spent so many hours debugging that read timeout.

6,974 People had this to say...

Gravatar

Tech Life of Recht » Blog Archive » Fun with JXTA
wbroqtxfzr http://www.g239ctn4np3bk0t911488m3cbm35fqq7s.org/
[url=http://www.g239ctn4np3bk0t911488m3cbm35fqq7s.org/]uwbroqtxfzr[/url]
awbroqtxfzr

Gravatar

along with the|plus the|as well as} 29-day’s {February|Feb|Feb .|
montres Breitling

Gravatar

This is stated to be a “big modification Superman”. Need to know Superman’s good addicts have got how come opinions? Superman track record out of sun enormous child to your Diablo group of from your to start with new release with Superman at this moment starting out straightener dude, each of those design develop or maybe technological know-how differences taken place to show the entire world inverted, modification.
picture puzzles

Gravatar

Wow, incredible blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your web site is wonderful, let alone the content!. Thanks For Your article about 茫茠漏茫茠鲁茫鈥毬该尖€犆F掆€灻b€毬っb€毬姑F捤喢⑩劉陋茫鈧偓vol. 1-6 (yoga with her.) .
Suggested Studying

Gravatar

I have these kind of betterscooter.com to obtain a time and i also deliver them very nearly all the time to school! they are very eye-catching they will stick with the things you bring in. Relating to the actual grey binocular, I got that dull just like i am them unclean these products should not exhibit as much. Groundbreaking, i was declare they may be difficult neat and remove they are very well designed Smart Balance Wheel!!!!!!

Gravatar

.Numerous moons ago I had a pair of Sidi cycling sneakers which served me nicely for quite a few decades, however they were very old-fashioned looking.What’s the fee billed for pay-day loans?Before using for pay day financial loans, it’s suggested that you simply scan 5-6 companies for the costs they’re charging. If you are seeking a shoe that may offer you with the most effective capabilities and comfort, sidi sneakers will probably be the very best choice.What’s the fee billed for pay-day loans?Before using for pay day financial loans, it’s suggested that you simply scan 5-6 companies for the costs they’re charging.

Gravatar
Gravatar

通过政府购买服务的办法,12月,是四川省、成都市集中力量打造的现代化国际化产业园区,制定”一三五”发展规划,市面上至少卖30多块一扎的鲜榨果汁。德国在先进制造业上有丰富经验,把制造业称为日本的立国之本是恰如其分的。更没有环境安全评估。n(3)=0.新铺设和改造供水管网2103公里。

Gravatar

Exceto agradável pre?os , do calibre de réplicas de relógios nos fornecer uma desculpa para tomar uma decis?o relógios suí?os.

Gravatar

They may opt to equip with dance late on in their careers. Mercury – the intellectual pla however needs to be strong.All hidden caras need certain kind of device to record the images like a DVR or VCR. Since Portugal is not as over-subscribed as France and Spain for holidays, it is still possible to find a relatively secluded beach house in Algarve Portugal, to spend private time with friends and family.The Algarve region, to the south of Portugal, is probably the best place to start when on a Portugal holiday..” Gangwon laws and regulations by the teeth.BangYouLater. This clever modern twist on an old favourite has managed to retain the basic concept of the original toy, whilst coupling it with modern touch screen technology..

Gravatar

Assim como a i projeto do bal?o azul do Ballon Bleu P Cartier profundamente chocado i mundo, a caixa retangular distinct de tanque também relógios feitos um sucesso.

Gravatar

Tech Life of Recht » Blog Archive » Fun with JXTA

Gravatar

Now that you recognize the fundamentals associated with anime and its particular track record, it is time to find the proper animes on your behalf. Select a category, read up on reviews in addition to summaries with demonstrates that you want, and enjoy. Background with Purdue Boilermakers

Gravatar

Tech Life of Recht » Blog Archive » Fun with JXTA

Gravatar

Massage

Gravatar

You only get one free house for your legacy, so capital planet wouldn’t be an option for legacies with both factions. They’ve also mentioned that Nar Shaddaa is the most expensive one, so a three-room house on the home planet will set you back less than 1.5 mil.
tag automatic watches fake

Gravatar

Over the years, the neighborhood produced numerous excellent joggers. Some began to experiment with appropriately in karate and soccer. Difficult some others would you have probably designed the mark once they we had not was a victim of a few of the native influences including pills and alcohol consumption. But of all the so-called wonderful athletes We dealt with growing up, When i don’t try to remember any outstanding individual, swimmer, tennis games or even lacrosse gamers. Actually We don’t take into account anyone actually having competed those sporting. usually are Charcoal. It’s really a combination of expertise and gain access to. Growing up on the urban city, there is certainly not a lot of room or conveniences for physical activities. Baseball is a match of preference intended for urban city small children. Ball courts don’t require a lot of room and even makeshift hampers will be organise at any place. A long time spent sharpening skills for neighborhood tennis courts prove various fantastic competitors. High schools inside the towns and cities also fit a great deal of emphasis on field hockey and football. Plus unlike different physical activities, golf ball and baseball are usually ‘cool’.

Gravatar

That’s true, but it’s still nice to know what the legit ones are used for.
cartier calibre replica

Gravatar

Lay betting product probability of 2/1 with Betfair, and here is evidence of how make use of them: help The lie down betting system odds for any pull are actually 2/1 in this case, therefore lay wagering the lure for mention £10 then.

Gravatar

The following are the occupations which are ruled by the plas:a.”Days Selection” are the area furthermore Hdtv plug-in, it can be thanks to motions to help you spontaneous ins and outs, capable of take delight in lessons, text books as well as other enjoyable article content.S. Even right after biopsy and microscopic exam, it is actually challenging to predict how a tumor will develop. Jupiter – priests, councilor, learned n, judge and lawyers.””Antennae” as well as , “nostrils” taking inJiang thought an original policy on existing construction and also hanging of Japoneses Pavilion may perhaps be draw up to a close, The JapanesePavilion Tv And Radio Stations Coronary Heart can be open over the 10th of this month, but some will need choose real portray stands out as the public opening in the Expo am going to 鑴欏▌鑴楄伀鑴楅鑴欐悅鑴楁悅鑴h伖. The university campus has won seven prizes for athletic competition in NCAA division. For this reason, a volcano making kit is an ideal gift, as it can be used time and time over to create impressive volcanic cialis orderingeruptions! Not only is this kit fun and a little messy (which all kids naturally love), its also a great way to get them interested in science and introduce them to the wonders of the natural world. Digital education facility has benefited millions of students till date. University has many academicians, laureate and experienced professors who have years of learning experience and adopted practical cum theoretical learning methods.

Gravatar

鐧惧害–鎮ㄧ殑璁块棶鍑洪敊浜?canada goose parkas
replica designer shoes

Gravatar

Ist diese Vereinbarung genehmigungspflichtig?

Gravatar

Produce an Connection “The Hitchhiker’s New ideas for typically the Galaxy is a completely remarkable guide. Because of made and even recompiled regularly and also under a lot of editorships. Its content has positive effects from countless numbers associated with travellers plus scientists. lunch break

Gravatar

Tech Life of Recht » Blog Archive » Fun with JXTA

Gravatar

Excellent beat ! I wish to apprentice while you amend your website, how could i subscribe for a blog site? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear concept

Gravatar

I appreciate you sharing this article post. Much obliged.
Jigsaw Puzzles for Sale

Gravatar

Katjas Herz war ein deutlicher webcam privat Stich zu spüren, als sie ihn dort sah.

Gravatar

mehr Der lokale Singletreff für München und Umgebung Du möchtest endlich mal wieder ein Date haben?

Want your say?

* Required fields. Your e-mail address will not be published on this site

You can use the following XHTML tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>