Saturday, March 22, 2014

Shazzam!

Shazzam!  While cleaning my office today, I stumbled across a fun piece of memorabilia...

About four years ago, when I was still working for ServiceNow, I wrote a piece of software that I called “Shazzam” as a sort of code name while I was developing it.   Shazzam turned out to be one of the more successful improvements I made to the Discovery product, making one particular aspect significantly faster and more reliable than it was (technical details below for the 3.5 readers who might care).  When the time came to actually ship Shazzam, we never changed the name – so Shazzam became part of the released product.  And I became known throughout the company (and many of its customers) as the guy who wrote Shazzam.

When I retired last year, someone photoshopped my head onto the graphic below, and used it for the cover of a card my colleagues signed (the “good riddance!” card):


So what does Shazzam do?  Its job is to probe a range of IP addresses to see which ones have a device active on it.  The result of running Shazzam is a list of active IP addresses that need to be investigated more deeply.

Prior to Shazzam, the Discovery product accomplished this by “pinging” each IP address.  In order to keep the code as pure Java, it did this by invoking the “ping” utility for the particular platform it was running on.  Using ping has several disadvantages, not least of which is that some devices have ICMP (which ping runs on) disabled.  It's also outrageously slow, because a separate process has to be started for the ping of each address being scanned.

Shazzam takes a completely different approach: it checks to see if each IP address responds to any of the TCP or UDP ports used for the deeper investigation.  For example, it checks for SSH ports being listened on (because that's how a UNIX server would be investigated) and for SNMP ports responding (because that's how a piece of network gear would be investigated).  It makes all those tests using Java's NIO package, which is designed for high-speed I/O while consuming just one thread.  All of this worked very well, even for customers with very large scale deployments (many thousands of devices).

I don't mind being known as the Shazzam guy :)

8 comments:

  1. My students will love this graphic!

    ReplyDelete
  2. Love the history lesson Tom... aka Shazzam guy :)

    ReplyDelete
  3. Sheesh, Dave - are you four years behind on your reading? (look at the post's date!)

    ReplyDelete
    Replies
    1. Hey Tom -- I took a ServiceNow hiatus for several years (hence the lag time in keeping up with you!) I teach Disco classes now (the product, not the 70's dance) and still grin when I teach class and have to explain what the Shazzam phase does. :) Miss working with you buddy -- its been sooo long ago!

      Delete
  4. Well, I'm up in northern Utah these days, near the town of Paradise. Should you ever get up this way, give me a holler!

    At this point I can just barely remember how Shazzam works. :) I still do a lot of programming at home, just for fun stuff, a lot on Raspberry Pis. I even jumped back into C, so I can do some lower level stuff that's not so easy in Java. But every once in a while I've worked on something that reminds me of Discovery, usually either Shazzam or the SSH rewrite I did...

    Very glad to hear you're not teaching disco dancing! :)

    ReplyDelete
  5. Thanks for share this post with us. It is clear and interesting. I undestand now the purpose of Shazzam.

    ReplyDelete
  6. Great to find the author and this lovely blog! I'm starting to study SN Discovery and ITOM now in 2020 and got curious about the probe. May all the IT people by light hearted and good writers as you. This page was a delight to read. Thanks Shazzam!!

    ReplyDelete
  7. Hi, Mario! And thank you for the nice words....

    I'm actually a bit surprised to hear that my code is still being used - it's getting pretty old now. Maybe software really does live forever :) I rarely post to my blog any more, as I have many more readers on Twitter (@SlightlyLoony1) than I ever did on my blog.

    ReplyDelete