What the? I hear you ask. No it's not some new techno-bable...well ok perhaps it is, but it's very very cool. Geek cool that is.
XMPP is a protocol for doing instant messaging. Ok that's cool. But it's also based on XML. Yep that's cool too. Better still, it is the protocol used by Google Talk which if I can be honest, is also cool.
I decided some time ago to run my own XMPP chat server. Mainly to keep company communications within the company and to allow tie in of cool things like monitoring alerts into the system.
I have that working fine but something that my system couldn't do was communicate with the outside world.
Until now.
I have managed (though I don't know exactly how) to get XMPP federation working which is the method where different XMPP servers can talk to each other.
This means my internal account can now talk to my google account and vice versa. This means I can take advantage of the fact that Google has enabled chatting from within the gmail webpage. Thus whilst checking my gmail I can also chat with work colleages which is a funky thing.
Well, ok it's also another instance of work tying me down and stuff but it's still handly to be able to communicate like that. IF I'm off at a client site perhaps and can't (for some reason) log into my internal chat service, I can just chat to work people via Google Talk.
Pretty cool if you ask me. But you probably won't, so that's ok.
Monday, 27 November 2006
Friday, 17 November 2006
Dynamic SVG
Further to my earlier post about SVG I have now managed to get a dynamic SVG image happening. My eventual plan is to have a psudo real-time graph of network load displayed in a pretty dial format.
To check it out here. Be warned you need a SVG enabled browser such as Firefox or IE with the Adobe SVG plugin installed.
The image is built up of a few basic items (the circle and the legend up the top left). All the rest of the image is created dynamically using javascript. I am now almost at the stage of getting AJAX working with this by having the page fetch network load figures from another script (written in PHP) and using those figures to update the two needles on the dial.
So far I'm impressed about how its come together. I wouldn't say it's easy but it's certainly been easier the more I learn about both SVG and javascript.
Probably the only issue that I have come up against so far is that javascript won't allow the AJAX code to pull data from a different domain that the one the original page was pulled from. This means I need an extra step to pull data from my SNMP gateway (generating the network load figures) through to the website that the SVG graph is hosted on. Once I have that figured I will have a handy almost real-time graph that shows the network bandwidth for any port I choose to point it it.
Since there is no built-in way to measure the bandwidth usage on a Cisco device, I need to take two measurements of the total octets so far and subtract them giving an octet rate which I can then run through a formula to give utilization.
So far I like the combination of technology here. I am using AJAX with SVG to create a dynamic image of network load. Later I will be using SOAP to take the network load information from the SNMP gateway through to the website.
Yet through all this I have achieved my aim of pulling together information from multiple sources into a single simple interface.
More news next time!
To check it out here. Be warned you need a SVG enabled browser such as Firefox or IE with the Adobe SVG plugin installed.
The image is built up of a few basic items (the circle and the legend up the top left). All the rest of the image is created dynamically using javascript. I am now almost at the stage of getting AJAX working with this by having the page fetch network load figures from another script (written in PHP) and using those figures to update the two needles on the dial.
So far I'm impressed about how its come together. I wouldn't say it's easy but it's certainly been easier the more I learn about both SVG and javascript.
Probably the only issue that I have come up against so far is that javascript won't allow the AJAX code to pull data from a different domain that the one the original page was pulled from. This means I need an extra step to pull data from my SNMP gateway (generating the network load figures) through to the website that the SVG graph is hosted on. Once I have that figured I will have a handy almost real-time graph that shows the network bandwidth for any port I choose to point it it.
Since there is no built-in way to measure the bandwidth usage on a Cisco device, I need to take two measurements of the total octets so far and subtract them giving an octet rate which I can then run through a formula to give utilization.
So far I like the combination of technology here. I am using AJAX with SVG to create a dynamic image of network load. Later I will be using SOAP to take the network load information from the SNMP gateway through to the website.
Yet through all this I have achieved my aim of pulling together information from multiple sources into a single simple interface.
More news next time!
Tuesday, 14 November 2006
SVG Joy Part 1
My latest project has involved the funky image technology, SVG.
SVG, for those uneducated out there, stands for Scalable Vector Graphics. Perhaps you are already familiar with vector graphics? Programs out there like Corel Draw and Visio use vector graphics to enable drawings that scale to any resolution.
SVG is a technology that allows the use of vector graphics in all sorts of place such as web browsers and even desktop icons.
SVG allows funky things like animation and scripting with javascript which means making funky images that animate is now available to all of us that never learned flash!
So thus I have been playing with SVG trying to get something working that could use as a network bandwidth meter (similar to Cisco OpenWorks if anyone has seen that).
So far I don't have much but it's a start.
The concept I am working with is to create a graph similar to a cars speedo in SVG and then use javascript to update the needle according to a particular network switches bandwidth usage. So far I have managed to only get a ring of boxes drawn and even that was tricky.
I am using firefox 2.0 and it turns out that if you do something wrong in javascript it will just stop executing and not report any errors at all. Which makes debugging very difficult. But I eventually got there to the result you can see down that link. The link should work in firefox 2.0 or IE 7.0 both of which have basic SVG support built in.
I will keep you updated on how it all goes.
SVG, for those uneducated out there, stands for Scalable Vector Graphics. Perhaps you are already familiar with vector graphics? Programs out there like Corel Draw and Visio use vector graphics to enable drawings that scale to any resolution.
SVG is a technology that allows the use of vector graphics in all sorts of place such as web browsers and even desktop icons.
SVG allows funky things like animation and scripting with javascript which means making funky images that animate is now available to all of us that never learned flash!
So thus I have been playing with SVG trying to get something working that could use as a network bandwidth meter (similar to Cisco OpenWorks if anyone has seen that).
So far I don't have much but it's a start.
The concept I am working with is to create a graph similar to a cars speedo in SVG and then use javascript to update the needle according to a particular network switches bandwidth usage. So far I have managed to only get a ring of boxes drawn and even that was tricky.
I am using firefox 2.0 and it turns out that if you do something wrong in javascript it will just stop executing and not report any errors at all. Which makes debugging very difficult. But I eventually got there to the result you can see down that link. The link should work in firefox 2.0 or IE 7.0 both of which have basic SVG support built in.
I will keep you updated on how it all goes.
Friday, 10 November 2006
SOAP
I've been a bit of a slow convert over to the world of XML and specifically SOAP. I've never been one to be on the wave of a trend as it sweeps the world be it fashion or techie stuff. So it's only now that I've started playing with SOAP and all the fun things that it can do.
This is mostly due to having recently studied it during my uni degree (which has taken 14yrs so far).
Anyway, I've now decided having gotten SOAP working this week that it's a really cool thing and something worthy of my first post on my new blog.
For those of you that don't know SOAP is a another way of getting a remote machine to do work for you. Now perhaps you are thinking that well hey, we do this all the time with web pages, why do I need some special protocol to do the same thing.
Well, one problem with say having a script on a website that you perhaps pass some data to and it does some work and spits out some results is one of data validation. Your script needs to make sure that the data passed is what is expected.
Whilst this isn't that hard, you certainly have to be careful about it.
SOAP on the other hand, if done properly, allows you to publish an specification of what data should be passed to you (like a function call) and it's up to the sender to make sure the data is formatted correctly.
At my work I have an intranet which most things happen through, yet for some specific tasks I have a handful of machines spattered around the place. The intranet system needs to communicate with these other systems to get them to do useful things.
Until now I didn't really have a nice structured way of doing this until I discovered SOAP.
I use PHP for my scripting language and thus calling a 'function' on a remote machine looks exactly like calling a local function on the intranet. It's that easy.
Check out http://www.php.net/soap for more details.
The hardest part of the process was getting the WSDL file correct. This is a file that describes the functions available on the remote machine. For people new to XML it can be a bit daunting but I find it easy to steal from someone else who already has it working. Google is a good example. They allow you to make searches via SOAP. With PHP this is very easy to do, simply pass in the WSDL file and call the search function.
Anyway, this is my first post and I don't really know what else to say, I'm not much of a journalist yet so I'm still finding my style.
I will post more techie stuff as time goes on.
Feel free to comment on this if you wish. I'd like to hear from you.
This is mostly due to having recently studied it during my uni degree (which has taken 14yrs so far).
Anyway, I've now decided having gotten SOAP working this week that it's a really cool thing and something worthy of my first post on my new blog.
For those of you that don't know SOAP is a another way of getting a remote machine to do work for you. Now perhaps you are thinking that well hey, we do this all the time with web pages, why do I need some special protocol to do the same thing.
Well, one problem with say having a script on a website that you perhaps pass some data to and it does some work and spits out some results is one of data validation. Your script needs to make sure that the data passed is what is expected.
Whilst this isn't that hard, you certainly have to be careful about it.
SOAP on the other hand, if done properly, allows you to publish an specification of what data should be passed to you (like a function call) and it's up to the sender to make sure the data is formatted correctly.
At my work I have an intranet which most things happen through, yet for some specific tasks I have a handful of machines spattered around the place. The intranet system needs to communicate with these other systems to get them to do useful things.
Until now I didn't really have a nice structured way of doing this until I discovered SOAP.
I use PHP for my scripting language and thus calling a 'function' on a remote machine looks exactly like calling a local function on the intranet. It's that easy.
Check out http://www.php.net/soap for more details.
The hardest part of the process was getting the WSDL file correct. This is a file that describes the functions available on the remote machine. For people new to XML it can be a bit daunting but I find it easy to steal from someone else who already has it working. Google is a good example. They allow you to make searches via SOAP. With PHP this is very easy to do, simply pass in the WSDL file and call the search function.
Anyway, this is my first post and I don't really know what else to say, I'm not much of a journalist yet so I'm still finding my style.
I will post more techie stuff as time goes on.
Feel free to comment on this if you wish. I'd like to hear from you.
Welcome to Nurd Land
Firstly I should introduce myself. I won't tell you my name 'cos, well, I like it that way but I will tell you that I live in Sydney, Australia work for an large IT company and am a self confessed geek.
Secondly, I already have a me blog but I figured that the people that know me and read that blog don't really care about geek stuff and thus I have created this blog.
Thirdly, I believe geek should be celebrated not frowned upon. I enjoy geeking it up and knowing more useless detail than the next geek. Its a measure of mental capacity if you ask me.
Ok. So that's a bit about me and about why I'm here. Perhaps people will post on here if I offer something useful. I plan on talking about all the projects and stuff that I'm working on and problems and how I've solved them (assuming that I have managed to).
So there it is, let me know if I'm providing useful information and I'll try and tone it down.
Enjoy.
Secondly, I already have a me blog but I figured that the people that know me and read that blog don't really care about geek stuff and thus I have created this blog.
Thirdly, I believe geek should be celebrated not frowned upon. I enjoy geeking it up and knowing more useless detail than the next geek. Its a measure of mental capacity if you ask me.
Ok. So that's a bit about me and about why I'm here. Perhaps people will post on here if I offer something useful. I plan on talking about all the projects and stuff that I'm working on and problems and how I've solved them (assuming that I have managed to).
So there it is, let me know if I'm providing useful information and I'll try and tone it down.
Enjoy.
Subscribe to:
Posts (Atom)