Evented jQuery. April 20th, 2009 Over the past several years, I’ve been actively using jQuery for a variety of things. Early on, I shared the frustration that people had around using jQuery for more substantial projects. Starting with version 1.2 and continuing with version 1.3, however, jQuery provides a powerful evented model that can be used to build up fairly complex applications using evented, as opposed to traditional objected oriented programming.
The basic idea is that by leveraging asynchronous events, it is easier to model the fundamentally asynchronous nature of client-side web applications. Also, by writing components of your application to simply emit and handle events, it becomes a lot easier to extend or modify behavior down the road. To illustrate this point, I’m going to show how you can build a tab widget using evented techniques, and show how it can be extended in several useful ways. First, a few general principles The core of the tabs plugin will not handle any DOM manipulation. Step 1. Real world event based solutions using MINA and Scala Actors. In the QCon London track, Architectures in Financial Applications, Oracle presented an interesting solution that seeks to transform the reconciliation process from an inherently batch process to an incremental event driven asynchronous one. They presented a solution based on Coherence, their data grid that addresses the capacity challenge by spreading trades across servers and the availability challenge through the resilience of continuous replication that Coherence supports.
As part of the presentation, the Coherence based solution touched upon one important paradigm, which can be adopted even outside grid based architectures to improve system performance and throughput. Asynchronous processing .. Enter Event based Reconciliation .. And this proposed solution uses commodity tools and frameworks, good old proven techniques of asynchronous event processing, and never claims to be as scalable as the grid based one proposed by Coherence.
Asynchronous IO abstractions, MINA and Scala actors .. Scala Event Mapping. LibEvent. Thoughts On Scalable XMPP Bots archives | metajack.im. It used to be that chat bots were toy projects written by young programmers to impress their friends in their favorite IRC channel. These days, some bots are much more ambitious projects. For example, both identi.ca and Twitter are using XMPP bots to distribute messages to users in real-time. At Chesspark, we have chess playing bots that must be able to play hundreds of games at a time. It's no longer good enough just to have a bot; now the bots have to scale. Client Bots The first step along the bot programmer's journey is to write the bot as an XMPP client. There is a huge problem with client bots - rosters. First, querying large rosters from persistent storage is an expensive task for the XMPP server.
Second, a large roster means an enormous stanza in the connection startup. Both of these issues affect startup only. What can the bot developer do? Component Bots A component is a trusted piece of an XMPP server that can send and receive arbitrary stanzas. S2S Bots Further Thoughts.