Updated: 17/4/07; 10:45:57.
James Strachan's Weblog
Ramblings on Open Source, Java, Groovy, XML and other geeky malarkey
        

Monday, September 16, 2002

Perfect balance. As our portal product at some point will be clustered, I've begun thinking about load-balancing. The normal approach seems to be to use a concentrator thingy in front of all the webservers, which delegates to them based on a round-robin (maybe with weighting) scheme.

That sounds stupid to me. Wouldn't it be better if the webservers hooked up into the load-balancer (LB) and told it: here, I have 5 threads, so please don't send more than 5 requests to me at a time. When all servers have done this, the LB will have a bunch of "tokens" that it can use to dispatch requests into the cluster. When a request is dispatched a token is removed. When the request has finished rendering the token is added again to the LB. The LB can also check rendering times in order to automatically prioritize what servers to call.

If I'm not completely wrong this should provide perfect load-balancing, since there's no guessing going on: the LB always knows which server to dispatch to.

The hooking up could be implemented using Jini (i.e. no configuration necessary), and the "token-counter" in the webserver could be done as a servlet filter. Shouldn't be that hard to do.

What do you think? Is this "old news"? Is there an LB available already that works along this way? If not, would it make sense to build one like this? [Random thoughts]

In practice just having a clever load balancer that dynamically changes its weightings to different servers based on their responsiveness would be my preference. Also to really get optimal performance with a modern servlet engine, it'd be using async IO, so you'd want the servlet engines to have plenty of requests buffered up so that as soon as a worker thread is available its ready to dispatch. i.e. even if there's only 5 worker threads, under heavy load you'd want at least 7 to 10 requests dispatched to the engine so that as soon as a worker thread is free, it has a request to process.

Based on the behaviour of the Servlet engines the LB should be able to deduce how many concurrent requests per engine seems like an optimal number, changing this number based on experience. (e.g. one thread in a servlet engine could block indefinitely).


2:24:09 PM    comment []

Messenger looks cool
.

Firstly, have you seen Messenger? Its an easy to use JMS facade that does pooling for you together with a simple lightweight JMS application server for managing subscriptions designed for the web tier, so no EJB required. So you can write Message Driven Objects which are lightweight non-EJB equivalents of MDBs. With Messenger you can even use to Servlets or JSP to process JMS messages :-). So its an ideal way of integrating the use of JMS into the web tier without requiring an EJB container.

Secondly Jelly supports Messenger and will ultimately have libraries for performing HTTP, SMTP and WSDL interactions. The werkflow project is integrating Jelly support (as I hope OSWorkflow will also), so working with JMS, HTTP, SMTP or SOAP from inside a workflow should be pretty trivial.

Hopefully there can be some investigation into connecting (say) Messenger and werkflow and/or OSWorkflow so that workflows can define JMS and SOAP service subscriptions (rather like BPEL does) and that can generate the necessary plumbing to consume messages and create and manage workflow instances.
[James Strachan]

This is awesome! I was just looking for a JMS provider that could run in a servlet engine the other day, and came up empty! This could open up a whole new class of federated content web apps. I'll have to take a look to see if you can do things like set up durable subscribers to topics.... This could allow a web app to subscribe to content from another web app and get it whenever it's online. This all ties in with the RSS syndication somehow.... [Jason Carreira]

The Quality of Service, such as durable subscription, whether you want queue semantics (only 1 consumer gets each message) or topic semantics (all consumers get each message) are all configured via the XML deployment descriptor.

Most decent JMS providers should work fine inside a servlet engine. e.g. my employers JMS provider, SpiritWave works totally fine in an applet, application, servlet or EJB server.


2:05:10 PM    comment []

My 2 cents on Maven-blindness

First off Maven has some very cool features. In fact I use it on a project. However, I don't think everything should use it and here's why:

  1. It seems to take longer to run a simple build with Maven. The startup time can be irritating.
  2. It doesn't seem to handle zip files well.
  3. It can be a pain mapping libs from the repo directory to an IDE like ( IDEA )
  4. It can really over-complicate a small project

Please don't mavenize WebWork!

But I do thing adding just the DVSL (Velocity) doc generation to WebWork would be nice. Of course you don't need maven for this

[Miceda]

1. Maven isn't even at 1.0 yet. By 1.0 I'm sure it will be at least as fast as Ant.

2. In what way?

3. There are plugins for most major IDE's that automatically generate the project descriptors for the IDE. Works for eclipse, jbuilder and IDEA I think. Type maven -g and look for your IDE in the list.

4. The Jakarta Commons project contains many small projects. Using Ant they are a PITA to build. With Maven they are a breeze, just type 'maven'. I guess its a subjective thing though. Once you've learnt Ant you're gonna find it easy to use. I'm sure the same will be true of Maven once you've used it a bit.

Finally a project can if it wishes support both an Ant build system and a Maven build. If you were to Maven-ize a project you're not taking anything away or loosing anything.

Also a Maven-ized project can auto-generate an Ant build file so that Ant users can still build your project using vanilla Ant. The auto-generation uses the Maven descriptor to download all the dependent jars and set the correct classpath etc.


8:24:48 AM    comment []

© Copyright 2007 James Strachan.
 
September 2002
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
Aug   Oct




Click to see the XML version of this web page.
Subscribe to "James Strachan's Weblog" in Radio UserLand.
Click here to send an email to the editor of this weblog.
blogchalk: James/Male/31-35. Lives in United Kingdom/London/Islington and speaks English. Spends 60% of daytime online. Uses a Fast (128k-512k) connection.
this site is a java.blog

currently subscribed to:

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. <big>kev's</big> catalogue of this and that.

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. /\ndy's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. /dev/null

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ::Manageability::

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Abe Fettig's Web Workshop

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Absurdities and nonsenses

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. All Things

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. All Things Distributed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Andres Aguiar's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Aslak Hellesoy's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. bayard

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Be Blogging

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Blaug Blawg Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Blogging Pubbitch

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. bob mcwhirter

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brett Morgan's Insanity Weblog Zilla

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Behlendorf's Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Jepson's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Maso's Tecno-Geek Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Bright Eyed Mister Zen

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Cafe con Leche XML News and Resources

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. CapeBlog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Citations for : squishy

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Clemens Vasters: Indigo'ed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Cocoon and more

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Code Feed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Code:Q

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Codito ergo sum

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. corporate eejit

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Coty's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Craig Burton: logs, links, life, and lexicon

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. crazybob.org - web log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Crowbar Tech

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. cwinters.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Darren Hobbs

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. deem

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. deep:code

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dion

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dive into mark

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. DJ's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Don Box's Spoutlet

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Don Park's Daily Habit

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dorodok

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Doug Kaye: Web Services Strategies

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Eclectic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Eric Alexander

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ericfreeman.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Erik Hatcher - Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Erik's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Fast Takes

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Forwarding Address: OS X

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Free XML tools

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Glen Daniels

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Gordon Weakliem's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. graham glass: what's next?

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. gru's logic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. grubbel

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Guido Casper's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. IKVM.NET Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jason Carreira

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Java Testing, Tools, and Engineering

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. java.sun.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. JavaGu(i)(y)

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jeff Turner's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jelly

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jeremiahcode

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jeremy Allaire's Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Joe's Jelly

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Joel on Software

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jon's Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jon's StudioZ.tv Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. josh lucas' Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jutopia

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. kdub's log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ken Bereskin's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Knowing .NET

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. mabo

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mac Net Journal

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. MacSlash

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. manicwave

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mark O'Neill's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Martin Dulisch's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Matt Croydon::postneo

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Memory Dump

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. meta-douglasp

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. miceda

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Michael J. Radwin's blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mike Clark

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mitch Kapor's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mozquito XForms

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Nathan Torkington's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Nicholas Riley's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. nickminutello

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ockham's Flashlight

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Off the beaten track

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ongoing

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Organic BPEL

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Otaku, Cedric's weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Outer Web Thought Log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ovidiu Predescu's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Part of the problem.....

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Patrick Chanezon's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Patrick Logan's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Peter Drayton's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. PragDave

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. PSquad's Corner

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Pushing the envelope

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Raible Designs ~ We Build Web Apps

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Random thoughts

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ray Ozzie's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rebelutionary

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Remus

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Rick Salsa's Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rinkrank

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Rod Waldhoff's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rosewater

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Royle's Random Ruminations

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sam Ruby

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sanjiva Weerawarana's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sean McGrath, CTO, Propylon

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Service Oriented Enterprise

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. skizz.biz

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sklires Skepsis...

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Small Values of Cool

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Spike's GeekBlog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Steve Conover's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Steve's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Technomagica

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ted Leung on the air

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Blue Pill

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Fishbowl

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Mountain of Worthless Information

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Occasional Blogger

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. TheArchitect.co.uk - Jorgen Thelin's weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. TheServerSide.Com: Your J2EE Community Forum

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. thinair

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Thinking About Computing

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Tobiased thoughts

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Tomalak's Realm

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. toolbox

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. transMorphic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Vincent Massol Think Tank

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Weblog for Costin Manolache

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Weblog: Morgan Delagrange

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. WebMink

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Whispering

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. X180

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. XMLhack

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. xpzen.com: what's on my mind

Here's how this works.