evri - search less. understand more?

Posted by admin on June 27, 2009 under Semantic | Be the First to Comment

Over the past year i’ve been looking into  the ‘semantic web‘ and what applications us mere mortals can use to tag content, autolink content and so on without getting into ontologies, triples, RDF,SPARQL endpoints and other terms I still dont understand. I bought and tried reading a introduction book but fell asleep …. 

I’ve played with the Open Calais and more recently the AlchemyAPI from Orchestr8 also. Both are very interesting but dont quite meet my needs. I use a Zemanta plugin to autotag this blog content too.

So what are my needs? Well, Sports media is my business and especially Football ( the Soccer version!). Most of the products/apis out there are very US based and tend to work well on US Sports but ignore or have limited data on the rest of the world.

The other day i found a new player called evri by accident. I plugged in a few BBC Football ‘gossip’ stories about possible player transfers and low and behold i was amazed to see how good the results were.

I have added an evri sidebar to this blog and when I get some decent content for it search on then it should be great!   

evri - search less. understand more? Well yes, at first impressions its better for my purposes than the others. Hopefully i’ll get stuck into their API too and see how that pans out.

 

 

Reblog this post [with Zemanta]

Share/Save/Bookmark

Openfire, BOSH and StropheJS configuration

Posted by admin on February 14, 2009 under Coding, Jabber XMPP | 10 Comments to Read

I am playing around with some open source Jabber/ XMPP servers and decided to start off with Ignite realtime’s server called Openfire. It’s supposed to have ‘out-of the-box’ BOSH support, so I thought I’d see how easy it would be to get it all working.

Openfire Server set-up

Openfire is a simple download from their website. Installation on my Windows XP laptop was a breeze and the Jabber server was up and running in a few minutes.

The BOSH configuration or rather “HTTP Bind” as Openfire calls it, is also simple to setup from their admin console. Using the defaults you get:-

Openfire's admin console

Openfire

BOSH Client

I chose to try the Strophe Javacript client from http://code.stanziq.com/cgit/strophe/strophejs/snapshot/strophejs-master.zip

Unzip into your webserver  folder, I’m using Apache 2.2.8 by the way, and checkout the examples folder where you have a choice of a basic and echobot clients.

If we look at the Javascript code there is a variable BOSH_SERVICE in both examples.

var BOSH_SERVICE = '/xmpp-httpbind';

Openfire uses a different service name, called ‘/http-bind’ and not ‘/xmpp-httpbind’ .  So we simply edit and all should now work, right?

var BOSH_SERVICE = '/http-bind';

No, it doesn’t. If we try to browse to http://localhost/http-bind then all we get is an “HTTP 404 Page Not Found” error i.e. there’s nothing there to talk to.

Wait a minute, the Openfire admin console configuration shows that port 7070 is used for this service, so let’s try:-

http://localhost:7070/http-bind

HTTP ERROR: 400
BAD_REQUEST
RequestURI=/http-bind/
Powered by Jetty://

Ah something different, and we have HTTP 400 Error ‘powered by Jetty://’

So this is not working but that’s not entirely suprising as my local Apache server knows nothing about Openfire, or what it’s offering by way of services, nor should it of course.

Hmm, so Openfire must, and indeed does, have its own server that exposes /http-bind on port 7070 hence the ‘Powered by Jetty://’ in the HTTP 400 Error.

Ok, getting somewhere, so how do we get the StropheJS client to connect to port 7070?

There’s nothing we can edit, I tried looking into the source and many other failed attempts at hacking something I decided that  I’d have to think, or at least have some coffee, another coffee and lots of Googling and more coffee.

Hidden deep in the Igniterealtimes support forums ( which must be the worst on the planet, sorry guys) was some advice. The fact it took so long to find it was the reason I decided write this blog entry.

All we need to do is to get Apache to forward all requests from the StropheJS client to to http://localhost/http-bind onto to http://localhost:7070/http-bind and that should work.

Ensure the Apache proxy modules are loaded in your httpd.conf

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Then add:-

ProxyRequests Off
ProxyPass /http-bind http://127.0.0.1:7070/http-bind/
ProxyPassReverse /http-bind http://127.0.0.1:7070/http-bind/

And that worked for me! The StropheJS echobot client logged into my Openfire server as soon as I’d restarted Apache and echo’d back anything i sent it.

By the way, I tried the client in Firefox 3.0.6, IE 7, Opera 9.6 and all worked as expected.

However, Safari 3.2.1 logged into Openfire correctly, but the echobot didn’t echo anything. As yet, I don’t know why…..

Reblog this post [with Zemanta]

Share/Save/Bookmark

Welcome to my blog

Posted by admin on February 12, 2009 under General | Be the First to Comment

 

Welcome to my blog. I will be posting anything interesting that ‘ve been working on.

 

Currently I spend my time developing widgets and web applications using  Jquery on XMPP - Pubsub ( Publish Subscribe)  BOSH and playing around with Semantic Web stuff when i get time …. 

 

The blog title is supposed to mean “keep it simple, stupid” which describes my approach to most things, especially software. Hopefully I can stick with the theme and post solutions, notes, code excerpts I have found for the problems I have faced. If it saves others time, then all the better.  

 

 

 

 

Reblog this post [with Zemanta]

Share/Save/Bookmark

This blog contributes to the web with Nofollow Reciprocity.