15 July 2006

Asynchronous + Message Bus

Think Asynchronous, not Synchronous; Message Bus, not Point To Point.

It's a moment of epiphany when I realized the two related concepts are the key to many, many nagging software engineering problems of mine. Neither of them are alien to me, and I'm aware of them for quite a while. It's just that I've never realized how universal the patterns are, and how it applied to so many things. asdfe

Consider: how would you elegantly show the progress of a large file copy across several different user interfaces? (e.g. text, GUI, web?) It's tempting to get lost in low level details like Dependency Injection, when it's better to decouple the file copy process and the progress display into two asynchronous thread or process, and then send out periodic progress events to a Message Bus where interested user interfaces can display them. Caveat: this only applies to slow operations. This even allows for more than one user interface (listener) per operation. Traditionally, the file copy operation would be the same process that updates the User Interface's progress bar synchronously.

That was just the beginning as I found more and more problems can be elegantly solved by thinking asynchronously. AJAX web interfaces. dbus's interface between network events and the NetworkManager applet. Qt's Signals and Slots. Pipelining. Everyone of them are related.

Phrasing their definition to relate to each other:

Asynchronous: issue a request, but don't expect an immediate response. You'll get notified when the response is completed.

Message Bus: don't choose what component to talk to directly, instead send and forget to the bus (aka Message Queue, Channel, Slot), and other interested components themselves to choose to listen to the bus.

23 comments:

  1. I'm suprised you don't mention event-based pattern, which how I read here.

    Anyway, you might want to look into OSGi (http://www.osgi.org) and Whiteboard pattern.

    ReplyDelete
  2. Anonymous1:46 AM

    http://isater.com/news/categ-health_insurance_quote_tennessee-3544.html - health insurance quote tennessee
    health insurance quote tennessee

    ReplyDelete
  3. Anonymous9:15 AM

    My bad,
    you got the particular job :)
    There were a post and author have to make cartolina animate
    Hm.. we need to harvest relative sites about http://cartoline-sex.biglietti-auguri.net/ - cartoline sex

    May be I looked for a few :-/
    Respect.

    ReplyDelete
  4. Anonymous9:30 AM

    New content here,
    you have a brilliant information xD
    There were a post and author was have to learn corsi
    Hm.. we was not able to harvest unique resources of http://corso-fotografia.corsi-online.ws/ - corso fotografia

    I presume, We surf a few :(

    ReplyDelete
  5. Anonymous5:03 AM

    Really loved your sait. Well done.

    http://cigarettes.worldhinduforum.info/
    http://diet.worldhinduforum.info/
    http://baseball.worldhinduforum.info/
    picture of cigarette
    prescription diet pill
    baseball hat

    ReplyDelete
  6. Anonymous8:39 AM

    Hello !.
    might , probably very interested to know how one can make real money .
    There is no need to invest much at first. You may begin to receive yields with as small sum of money as 20-100 dollars.

    AimTrust is what you thought of all the time
    AimTrust represents an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

    It is based in Panama with structures around the world.
    Do you want to become an affluent person?
    That`s your choice That`s what you wish in the long run!

    I`m happy and lucky, I started to take up income with the help of this company,
    and I invite you to do the same. It`s all about how to choose a proper partner who uses your savings in a right way - that`s the AimTrust!.
    I earn US$2,000 per day, and what I started with was a funny sum of 500 bucks!
    It`s easy to start , just click this link http://nysilatyjo.envy.nu/afygyfy.html
    and go! Let`s take our chance together to feel the smell of real money

    ReplyDelete
  7. Anonymous1:05 PM

    Good day !.
    You may , probably very interested to know how one can reach 2000 per day of income .
    There is no need to invest much at first. You may begin earning with as small sum of money as 20-100 dollars.

    AimTrust is what you need
    The company represents an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

    It is based in Panama with structures everywhere: In USA, Canada, Cyprus.
    Do you want to become a happy investor?
    That`s your chance That`s what you wish in the long run!

    I`m happy and lucky, I started to get real money with the help of this company,
    and I invite you to do the same. It`s all about how to select a proper partner who uses your funds in a right way - that`s it!.
    I earn US$2,000 per day, and what I started with was a funny sum of 500 bucks!
    It`s easy to start , just click this link http://ododinaxe.s-enterprize.com/ucacydi.html
    and go! Let`s take this option together to become rich

    ReplyDelete
  8. Anonymous4:58 AM

    Hello !.
    You may , perhaps very interested to know how one can collect a huge starting capital .
    There is no need to invest much at first. You may commense to receive yields with as small sum of money as 20-100 dollars.

    AimTrust is what you need
    AimTrust represents an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

    It is based in Panama with affiliates around the world.
    Do you want to become a happy investor?
    That`s your chance That`s what you wish in the long run!

    I`m happy and lucky, I began to get income with the help of this company,
    and I invite you to do the same. If it gets down to select a correct partner who uses your money in a right way - that`s the AimTrust!.
    I take now up to 2G every day, and what I started with was a funny sum of 500 bucks!
    It`s easy to start , just click this link http://gahyhoje.wtcsites.com/idujas.html
    and go! Let`s take this option together to get rid of nastiness of the life

    ReplyDelete
  9. Anonymous6:23 PM

    Good day !.
    might , probably curious to know how one can collect a huge starting capital .
    There is no need to invest much at first. You may begin to get income with as small sum of money as 20-100 dollars.

    AimTrust is what you haven`t ever dreamt of such a chance to become rich
    The firm incorporates an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

    It is based in Panama with offices around the world.
    Do you want to become an affluent person?
    That`s your chance That`s what you wish in the long run!

    I`m happy and lucky, I started to take up income with the help of this company,
    and I invite you to do the same. If it gets down to select a proper companion utilizes your savings in a right way - that`s AimTrust!.
    I earn US$2,000 per day, and what I started with was a funny sum of 500 bucks!
    It`s easy to start , just click this link http://jofasiqyn.freehostyou.com/ewybysi.html
    and lucky you`re! Let`s take our chance together to become rich

    ReplyDelete
  10. Anonymous8:58 AM

    Hi !.
    might , probably very interested to know how one can manage to receive high yields .
    There is no initial capital needed You may start to get income with as small sum of money as 20-100 dollars.

    AimTrust is what you need
    AimTrust incorporates an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

    It is based in Panama with offices everywhere: In USA, Canada, Cyprus.
    Do you want to become an affluent person?
    That`s your chance That`s what you desire!

    I`m happy and lucky, I started to get real money with the help of this company,
    and I invite you to do the same. It`s all about how to select a proper companion utilizes your funds in a right way - that`s the AimTrust!.
    I earn US$2,000 per day, and what I started with was a funny sum of 500 bucks!
    It`s easy to join , just click this link http://utuvufodo.lookseekpages.com/jiwinu.html
    and lucky you`re! Let`s take this option together to become rich

    ReplyDelete
  11. Anonymous10:42 PM

    Hello !.
    You re, I guess , probably curious to know how one can collect a huge starting capital .
    There is no initial capital needed You may start to receive yields with as small sum of money as 20-100 dollars.

    AimTrust is what you haven`t ever dreamt of such a chance to become rich
    AimTrust incorporates an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

    Its head office is in Panama with structures everywhere: In USA, Canada, Cyprus.
    Do you want to become really rich in short time?
    That`s your choice That`s what you wish in the long run!

    I`m happy and lucky, I began to get real money with the help of this company,
    and I invite you to do the same. It`s all about how to choose a correct companion who uses your savings in a right way - that`s it!.
    I take now up to 2G every day, and my first investment was 500 dollars only!
    It`s easy to join , just click this link http://yqakisusuw.uvoweb.net/xexemi.html
    and lucky you`re! Let`s take our chance together to become rich

    ReplyDelete
  12. Anonymous9:44 PM

    test222 reaspolurevedazaser

    ReplyDelete
  13. Anonymous7:21 AM

    Hi!
    You may probably be very curious to know how one can make real money on investments.
    There is no initial capital needed.
    You may begin to get income with a money that usually is spent
    on daily food, that's 20-100 dollars.
    I have been participating in one company's work for several years,
    and I'll be glad to let you know my secrets at my blog.

    Please visit my pages and send me private message to get the info.

    P.S. I make 1000-2000 per daily now.

    [url=http://theblogmoney.com] Online investment blog[/url]

    ReplyDelete
  14. Anonymous11:50 AM

    Good day, sun shines!
    There have been times of hardship when I felt unhappy missing knowledge about opportunities of getting high yields on investments. I was a dump and downright stupid person.
    I have never imagined that there weren't any need in large starting capital.
    Nowadays, I feel good, I begin to get real income.
    It gets down to choose a proper partner who uses your money in a right way - that is incorporate it in real business, and shares the income with me.

    You can ask, if there are such firms? I have to tell the truth, YES, there are. Please be informed of one of them:
    [url=http://theblogmoney.com] Online investment blog[/url]

    ReplyDelete
  15. Anonymous1:59 AM

    Yes undoubtedly, in some moments I can say that I approve of with you, but you may be making allowance for other options.
    to the article there is stationary a without question as you did in the go over like a lead balloon a fall in love with publication of this beg www.google.com/ie?as_q=hardcopy pro 3.0.1 ?
    I noticed the catch-phrase you suffer with not used. Or you functioning the dark methods of inspiriting of the resource. I have a week and do necheg

    ReplyDelete
  16. Anonymous7:07 PM

    Online casino guide provides current review of Platinum Play Casino, offering details on how to receive free bonus, wagering requirements, software type, casino games and more. Learn more
    [URL=http://durakoff.net/gforum/link/online%20casino%20gambling/1_gambling2.html][IMG]http://durakoff.net/gforum/imggforum/online%20casino%20gambling/1_gambling2.png[/IMG][/URL]
    [url=http://jqtuooi.angelcities.com/index.html]carbamazepine [/url]

    ReplyDelete
  17. Anonymous8:13 PM

    Howdy,

    When ever I surf on web I come to this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]Plenty of useful information on szap.blogspot.com. I am sure due to busy scedules we really do not get time to care about our health. Let me show you one truth. Recent Scientific Research presents that almost 80% of all USA grownups are either fat or weighty[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] So if you're one of these citizens, you're not alone. Infact many among us need to lose 10 to 20 lbs once in a while to get sexy and perfect six pack abs. Now the question is how you are planning to have quick weight loss? [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss[/url] is not like piece of cake. Some improvement in of daily activity can help us in losing weight quickly.

    About me: I am blogger of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also health expert who can help you lose weight quickly. If you do not want to go under hard training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for effortless weight loss.

    ReplyDelete
  18. Anonymous7:30 AM

    Patients should never exceed the prescribed dosage, as an overdose could be fatal. Although the medicine is beneficial, side effects do occur and should be reported to a physician. [url=http://www.phentermine37-5.com/]buy phentermine 37.5 online no prescription[/url] They can include vomiting, diarrhea, swelling of the ankles and legs, or bad taste in the mouth. Some patients report experiencing constipation, upset stomach, or dry mouth.

    ReplyDelete