I'm rubbish I know... Takes me forever to actually post anything on my blog. Let me throw you a small bone.
Scotch on the Rocks 2011 was a marvelous event, even if I did manage to trash my ankle stepping off the train on the Wednesday night. Not that you care, but if you saw me hopping around, it turns out that I actually chipped a bit of bone off my ankle when I twisted my ankle. I'm sure you'll be ecstatic to know that after two and a half month I'm finally back to biking to work again. Anyway....
Very brief blog post.
I've been working on my longpolling blog posts trying to resolve why I'm having problems with the dynamic channel creation with ColdFusion 9.0.1.
I've been trying to call my application from Firefox and Chromium on the same laptop. Firefox has been working beautifully, but Chromium 10 has not been playing nice.
Finally (I can be a stubborn fool sometimes) I decided to check from Internet Explorer, Safari and Firefox from my desktop all of which work first time, but Chrome just wasn't working.
For the record this is the change :
In FABridge.js if you change:
if (/Explorer/.test(navigator.appName) || /Konqueror|Safari|KHTML/.test(navigator.appVersion))
if((!(/Chrome/.test(navigator.appVersion))) && ((/Explorer/.test(navigator.appName) || /Konqueror|Safari|KHTML/.test(navigator.appVersion))))
Thank you Tom! Much appreciated! Only wish I'd looked sooner!
I'm sorry to say that I've been putting this post off. Why? Well to be honest I've been struggling with getting my head around how to actually use longpolling. Its all very well understanding the mechanics, but how can you use it effectively.
Part of the problem I've been having is the nature of sending messages and filtering them with BlazeDS. What I keep forgetting is that long poll messaging is "fire and forget". You don't send a message and expect an immediate response. You send a message and a response might be broadcast to all event listeners with a specific filter. If you want a request and response, call a webservice or a make an ajax request. Don't use long polling and event gateways.
I'm rubbish! I really am... I promise and I promise to keep on top of Blog Round-ups, but I never seem to quite manage it.
I would really like to keep writing this round-ups ever week, but its quite an effort. Can I persuade anyone to co-author these posts with me? Leave me a comment. Drop me an email. Shout me on Twitter.
Anyway, on with the round-up.
In my last post on long polling I went through the basic set up of ColdFusion and BlazeDS before getting into too much code.
This part I want to get a basic connection and a couple of simple messages being sent and received.
One of several pieces of functionality we'd like is to have is real time notifications of workflow changes. The way it was described was "we want to push alerts to the users".
I decided to have a look at how we actually addressed this "problem". We didn't really need to "push" alerts to users, so the solution was traditional polling or long polling.