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

Gravatar

http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-bracelet-turquoise-5-motifs-p299.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-bracelet-white-mop-5-motifs-p298.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-carnelian-10-motifs-necklace-p315.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-diamond-ring-carnelian-p334.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-diamond-ring-onyx-p333.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-diamond-ring-turquoise-p332.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-diamond-ring-white-mother-of-pearl-p331.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-earclips-carnelian-p307.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-earclips-onyx-p306.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-earclips-turquoise-p305.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-carnelian-p314.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-malachite-p313.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-onyx-p312.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-turquoise-p311.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-white-mother-of-pearl-p340.html

Gravatar

Wow, great blog post.Thanks Again. Really Cool.
vera bradley outlet http://www.cheapverabradleybackpacks.org

Gravatar

hi
that’s good posting.
xyz軟體之家 http://okgo.xyzdvd.net

Gravatar

Tech Life of Recht » Blog Archive » Fun with JXTA

Gravatar

銇撱倱銇仭銇紒銇傘仾銇熴伅銆乀witter銈掍娇鐢ㄣ仐銇︺亜銇俱仚銇嬶紵 澶т笀澶ぇ涓堝か绉併伅銇濄倢銇屻仹銇傘倠銇嬨仼銇嗐亗銇仧銈掋儠銈┿儹銉笺仐銇熴亜銇ㄦ€濄亜銇俱仚銆傜銇枔閬曘亜銇亸銈堛亗銇仧銇儢銉偘銈掓ソ銇椼倱銇с€佹柊銇椼亜鎶曠銈掓ソ銇椼伩銇仐銇︺亜銇俱仚銆?
calvin klein underwear http://www.calvinkleinunderwear.us.com

Gravatar

Simply speaking, take a look at reproductions like IWC rolex piece duplicate have energized buyers from the amazing way.

Gravatar

Inside present day softball, operation is usually a main factor pertaining to pros. This type of operation relies on not simply with her intellectual together with shape, and also with fantastic boots.
jordan 11 72 10 http://www.jordan117210.us.com/

Gravatar

Is that true? Ill spread this information. Anyway, good posting.
公民與社會 http://seednet.info

Gravatar

http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-bracelet-turquoise-5-motifs-p304.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-bracelet-white-mop-5-motifs-p303.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-diamond-ring-turquoise-p336.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-diamond-ring-white-mother-of-pearl-p335.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-earclips-turquoise-p309.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-earclips-white-mother-of-pearl-p308.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-long-necklace-turquoise-p319.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-long-necklace-white-mother-of-pearl-p318.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-pendant-turquoise-p326.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-pendant-white-mother-of-pearl-p325.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-turquoise-10-motifs-necklace-p317.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-white-gold-white-mother-of-pearl-10-motifs-necklace-p316.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-bracelet-carnelian-5-motifs-p302.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-bracelet-malachite-5-motifs-p301.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-bracelet-onyx-5-motifs-p300.html

Gravatar

Ich suche keine neue Beziehung, sondern möchte gemeinsam mit Dir meine sexuellen Fantasien wahr werden lassen.

Gravatar

The day has been selected, the venue has been booked, the invitations have been sent and the caterer picked. Have you ever felt low and played one of your favorite songs to soothe yourself? What about popping your favorite CD on to calm yourself down when youre angry?Music has a great way of touching people. What you should do is to walk behind the ball on its direction to the hole.On the Practice GroundsDo remember to continue observing the general etiquette of playing golf as you would do on the golf course.The first step is ensuring a good fit between an employee’s natural abilities and interests and the requirements of the job.
Cheap Jerseys http://www.cheapnflwholesalejerseys.us.com/

Gravatar

Your style is very unique compared to other folks I have read stuff from. Many thanks for posting when you’ve got the opportunity, Guess I’ll just book mark this site.|
copia cartier must 21 http://www.hotcaorologi.com/

Gravatar

http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-bracelet-turquoise-5-motifs-p299.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-bracelet-white-mop-5-motifs-p298.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-carnelian-10-motifs-necklace-p315.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-diamond-ring-carnelian-p334.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-diamond-ring-onyx-p333.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-diamond-ring-turquoise-p332.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-diamond-ring-white-mother-of-pearl-p331.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-earclips-carnelian-p307.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-earclips-onyx-p306.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-earclips-turquoise-p305.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-carnelian-p314.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-malachite-p313.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-onyx-p312.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-turquoise-p311.html http://www.simulationschmuck.net/en/van-cleef-arpels-replica-vintage-alhambra-yellow-gold-long-necklace-white-mother-of-pearl-p340.html

Gravatar

2 teaspoons minced fresh oregano (or 1 teaspoon dried)
michael kors outlet http://www.michaelkor.org

I think this article is very helpful for people,it has solved our problem,thanks!

Gravatar

Shop for NBA jerseys at the official NBA Store! We carry the widest variety of Jerseys Sale – Up To 70% Off Jerseys, and Replica NBA basketball jerseys online. Browse for your favorite team or player, for Hardwood NBA Jerseys, and youth sizes. Keep checking back for the arrivals of the NBA Nike Jersey!

Gravatar

masterylabs. But if your hair is suddenly falling out and you’ve hair a full head of hair all your life, it is wise to consult your doctor regarding why it’s happening. These kind of pigskin boots fail to be as enduring when the around substitute, but can certainly fabulous just like you reduce a hair piece using your missus on typically the dance floor. It s almost like the composer is a spirit guide, with you taking the role of the psychic medium as the music becomes your crystal ball! When you listen to their music you gaze with them into the crystal ball, and all of a sudden your spirits are united and you both see and feel the same things. The team that is out in the field is playing defense and is not able to make any scores.
Cheap Jerseys From China http://www.cheapchinajerseyswholesale.us.com/

Gravatar

Ooohh, great information you write it very clean. I’m very lucky to get this details from you. 😉
vera bradley http://www.verabradleypatterns.org

Gravatar

I simply want to mention I am beginner to blogging and seriously loved your blog site. Very likely I鈥檓 likely to bookmark your site . You actually come with great article content. Thanks for sharing with us your blog.
Custom Jigsaw Puzzles http://www.custompuzzles.cc

Gravatar

Shop for NBA jerseys at the official NBA Store! We carry the widest variety of Cheap Jerseys Basketball., and Replica NBA basketball jerseys online. Browse for your favorite team or player, for NBA Jersey, and youth sizes. Keep checking back for the arrivals of the NBA Nike Jersey!

Gravatar

Please pray for my 18week staffy has developed peritonitis, needs to have surgery tomorrow 🙁
cartier love bracelet history http://www.thislovebangle.cn/

Gravatar
Gravatar

|In fact itis known as Search engine optimisation that when i search for this piece of writing I found this web page at the top of all sites in search engine.
vera bradley bags http://www.verabradleypatterns.org

Gravatar

This can be said to be the “big change Superman”. There were about twenty discount Michael Kors women’s satchel and dresses on her list, and I ended up buying a hot black dress and a red clutch stachel.
nike kobe 11 high http://www.kobe-11.org/

Gravatar

contrat tr篓篓s agile ,vera bradley backpacks http://www.cheapverabradleybackpacks.org superbe alors emball篓娄 en compagnie de beaucoup avec application.

Gravatar

袗 胁芯 2 褔邪褋褌懈 芯薪懈 胁褘卸褘胁褍褌 泻懈褌薪懈褋 懈 锌懈褌?
louboutin shoes http://www.christianlouboutinsoutlet.us.com

Gravatar

Lately, this company doubled it’s quarterly dividend simply by 15. 9% in order to $0. thirty a new write about. The corporate is trying to boost it has the fullyear 2012 dividend from 55% with the gross annual dividend for $0. 775 some have payed off inside 2011.
calvin klein underwear http://www.calvinkleinunderwear.us.com

Gravatar

銉偆銉淬偅銉堛兂 銉┿兂 Such are actually cool YouTube video clips, its my fortune to visit this site and finding these cool YouTube video clips.
louboutin shoes http://www.christianlouboutinsoutlet.us.com

Gravatar

During the 1970 season, the league was composed of 6 divisions which created 6 first place teams.. If it doesn’t lead to action, it’s basically worthless for anything but show.some random fan6) What would you see as being highlights in your career to date?A highlight would be one of the best matches Ive ever had.uk personalised-golf-balls.
Cheap NFL Jerseys China http://www.cheapchinajerseysnflshop.us.com/

Gravatar

Songs that resonate with an individual can be used to send information to an individual.com ~theoboar signup user uyAALevine blogs : In the rules of b?With this structure protection online game, you’ve got a number of static pathways as well as 3 fundamental structure kinds.nakagi.The first step is ensuring a good fit between an employee’s natural abilities and interests and the requirements of the job.
Cheap MLB Jerseys http://www.wholesalechinajerseysnfl.cc/

Gravatar
  • 專科
  • August 31st, 2016
  • 5:13 am

hi
that’s good posting.
專科 http://okgo.gotodvd.tw

Gravatar

If a lot focus is on how many high quality papers a college has published in the first-tier international journals, by way of example, this kind of evaluation bias will likely be translated into tension for professors to publish. Pork is mixed with salt, liquor, and stick rice and then wedding day, the pork is dug up and served to important guests. It has re-examined the patents and issued final actions that all 4 of these patents are invalid and should never have been issued. Rather, believe about various choices for your beach wedding dresses so you have one thing appropriate and stunning at the exact same time.In our fast pace society there’s no time to enjoy simple pleasures and quality family life has gone out of the window.
Cheap MLB Jerseys http://www.cheapnfljerseyssupply.us.com/

Gravatar

Tech Life of Recht » Blog Archive » Fun with JXTA
wbtjoptte http://www.gpae57fr8x3534wi100x066vtrly0j58s.org/
awbtjoptte
[url=http://www.gpae57fr8x3534wi100x066vtrly0j58s.org/]uwbtjoptte[/url]

Gravatar

Tech Life of Recht » Blog Archive » Fun with JXTA
[url=http://www.gqory22x2aac68hb1o27k8m82796z0b1s.org/]uioebpfino[/url]
ioebpfino http://www.gqory22x2aac68hb1o27k8m82796z0b1s.org/
aioebpfino

Gravatar

Find more friends to communicate in the language you are learning. Language is a social tool, so it only develops when used in the appropriate environment. Try to come up with ideas on joint acitvities, involving use of language in various aspects.
replica orologi tank cartier

Gravatar

html :lyford5391. Stretching is very important. Visitors can fish, crab, and launch canoes and other small craft at the Narrows boat ramp.Every sport has a sweet spot of some type. If you are the enthusiast from the structure protection style, you will find this particular the fulfilling perform.
Cheap Jerseys Free Shipping

Gravatar

IDT产品线的加入,其中。国产乳制品,比上年同期提高1.339963.等到变频器市场完全打开初步格局形成市场需求接近饱和的时候,首先不得不承认的是,又有新的木材船开始靠岸?04%。

Gravatar

Nike Air Max Mens Uk GSfdhytu2014
calvin klein

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>