blob: 60d291177349768d76f256403c234f8459ae32ec [file] [log] [blame]
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<h2>ZeroConf (Zero Configuration)</h2>
<p>One of the hardest parts of any network-based application is configuring which bits connect to what, and how
do they connect to each other. Each device that can be connected <emphasis>to</emphasis> already knows
the configuration details required to connect to it, but every other device that may wish to connect to it
will need to be provided with this information so the connection can be established.
ZeroConf aims to eliminate the time-consuming aspect of connecting devices together. The device broadcasts the
configuration details reqired to connect or work with the service over a multicast protocol. You probably already have
devices on your local network such as printers that are automatically discovered by your computer.
Zeroconf is an open-standard that many vendors are using to reduce cost of configuration. The <b>JmDNS</b> project
is an Apache 2.0 licensed library that implements the ZeroConf protocol. Chainsaw and log4j use
JmDNS to broadcast Appender information so that a matching Receiver can be easily created to connect to each other
to stream logging messages into Chainsaw.
<li><a href="" target="_new"></a></li>
<li><a href="" target="_new"></a></li>
<h2>Interesting... So what do I need to use ZeroConf with Chainsaw & log4j?</h2>
The log4j team has created an additional JAR file that can be added to your existing
application to enable ZeroConf configuration. You just need to download the <code>log4j-zeroconf.jar</code> and the JmDNS package. Then change your references from <code>SocketHubAppender</code>
to <code>ZeroConfSocketHubAppender</code>. (We recommend you change the 'name' propety from it's default to make it easy for you to use, other
wise it's name will appear as the default 'SocketHubAppender').
<h2>Cool... But I have some applications that use log4j 1.2.x. Will it still work?</h2>
<p>Yes. We have designed a backward compatible mechanism to expose log4j 1.2.x SocketHubAppender so that Chainsaw can detect it automatically.
<h2>But... Surely there's a catch?</h2>
<p>A small catch. Because it's based on a multicast protocol, routers tend to block these packets, and so it's likely that your production computers,
which are usually in a heavily protected network won't be able to broadcast their configuration information. If you have a VPN
into this sort of network it is possible that these multicast packets can traverse the network.</p>
<h2>Oh... So is this even useful?</h2>
<p>It's extremely useful for development, QA and staging environments. Usually the QA/Staging environment is isolated from your development
team, but having them monitor logs from these machines would be handy. Or your QA team may want to copy/paste some ERROR messages from
QA/staging to notify the dev team. ZeroConf gives your whole software development team an easy way to get access to your logging events.</p>