<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>bits.of.info</title>
	<atom:link href="http://bitsofinfo.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bitsofinfo.wordpress.com</link>
	<description>Exactly that....</description>
	<lastBuildDate>Mon, 13 May 2013 21:50:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bitsofinfo.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>bits.of.info</title>
		<link>http://bitsofinfo.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bitsofinfo.wordpress.com/osd.xml" title="bits.of.info" />
	<atom:link rel='hub' href='http://bitsofinfo.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Dropwizard Java REST services</title>
		<link>http://bitsofinfo.wordpress.com/2013/04/14/dropwizard-java-rest-services/</link>
		<comments>http://bitsofinfo.wordpress.com/2013/04/14/dropwizard-java-rest-services/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 03:50:54 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[dropwizard]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=516</guid>
		<description><![CDATA[To sum it up; Dropwizard rocks. I&#8217;ve done quite a bit of WS development both the on client side and server side; interacting with both SOAP, REST and variants of XML/JSON RPC hybrid services. For my latest project I need to expose a set of REST services to a myriad of clients: phones, fat JS [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=516&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>To sum it up; <a href="http://dropwizard.codahale.com/" target="_blank">Dropwizard</a> rocks.</p>
<p>I&#8217;ve done quite a bit of WS development both the on client side and server side; interacting with both SOAP, REST and variants of XML/JSON RPC hybrid services. For my latest project I need to expose a set of REST services to a myriad of clients: phones, fat JS clients etc. This application also needs to talk to other nodes or &#8220;agents&#8221; that are also doing work in a distributed cloud environment. The core engine of this application really has no need for a bloated higher level MVC/gui supporting stack and bringing that into this library would just be a pain. I&#8217;ve always like the simplicity of being able to skip the whole JEE/Spring/Tomcat based container stack and just do a plain old &#8220;java -jar&#8221;&#8230; run my application&#8230;. but the reality of being able to do that has been lacking&#8230; until now.</p>
<p>In looking at the available options for picking the framework to use (such as Restlet, Spring-MVC REST, Spring Data REST etc and others), I immediately became discouraged when looking at examples for setting them up; they are full of complexity and lots of configuration and generally require a full application server container to run within, which just adds further complexity to your setup.</p>
<p>Then I stumbled across <a href="http://dropwizard.codahale.com/getting-started/" target="_blank">Dropwizard by the folks at Yammer</a>. I encourage everyone reading this to just try the <a href="http://dropwizard.codahale.com/getting-started/" target="_blank">simple Hello World example</a> they have on their site. If you have any experience in this space and an appreciation and vision for decoupling; you will immediately recognize the beauty of this little framework and the power it can bring to the table from a deployment standpoint. Build your core app engine back-end library as you normally would, toss in Dropwizard, expose some REST services to extend your interfaces to the outside world; throw it up on a server and &#8220;java -jar myapp server myconfig.yml&#8221; and you are ready to rock. (they make this possible by in-lining Jetty). Create a few little JS/HTML files for a fat JS client, (i&#8217;d recommend <a href="http://angularjs.org/" target="_blank">Angular</a>) and hook into your REST services and you will have an awesome little decoupled application.</p>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/http/'>HTTP</a>, <a href='http://bitsofinfo.wordpress.com/category/java/'>Java</a>, <a href='http://bitsofinfo.wordpress.com/category/rest/'>REST</a>, <a href='http://bitsofinfo.wordpress.com/category/spring/'>Spring</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/angular/'>angular</a>, <a href='http://bitsofinfo.wordpress.com/tag/dropwizard/'>dropwizard</a>, <a href='http://bitsofinfo.wordpress.com/tag/java/'>Java</a>, <a href='http://bitsofinfo.wordpress.com/tag/rest/'>REST</a>, <a href='http://bitsofinfo.wordpress.com/tag/spring/'>Spring</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/516/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/516/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=516&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2013/04/14/dropwizard-java-rest-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
		<item>
		<title>Logging in Jboss sucks</title>
		<link>http://bitsofinfo.wordpress.com/2012/11/21/logging-in-jboss-sucks/</link>
		<comments>http://bitsofinfo.wordpress.com/2012/11/21/logging-in-jboss-sucks/#comments</comments>
		<pubDate>Wed, 21 Nov 2012 18:22:18 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jboss sucks]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=501</guid>
		<description><![CDATA[This is a venting post. I have a need to do the following. My app uses the Log4J API deployed on JBoss 6.1.x A) Correlate log statements with a given thread of execution, logically identified by an arbitrary generated &#8220;request id&#8221; that my application sets at the entry point for a request, doing this using [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=501&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This is a venting post.</p>
<p>I have a need to do the following. My app uses the Log4J API deployed on JBoss 6.1.x</p>
<p>A) Correlate log statements with a given thread of execution, logically identified by an arbitrary generated &#8220;request id&#8221; that my application sets at the entry point for a request, doing this using ThreadLocals. No, this is not a discussion for NDC/MDC.</p>
<p>B) These log statements will end up wherever the log system is configured to send them. I expect to be able to use that logging system&#8217;s documented APIs/configuration to add additional targets for log entries (appenders in log4j lingo)</p>
<p>C) Due to (A) and the sheer volume, I have the need to create a highly customized appender for log events that has access to my application&#8217;s context/services. The intent is to log these off asynchronously to a queue or a NoSql DB leveraging connections that my application already has handles on and configured itself. Hence I am not going to be able to reply on an instance of something that is instantiated and is outside of my application&#8217;s context. (i.e. I don&#8217;t want to configure this appender via the container&#8217;s default configuration mechanism, xml or whatever it is). I need to do this at runtime. My appender will need access to queues, and configuration, sources of connectivity that my application provides (not the deployment environment)</p>
<p>D) The logical approach would be to just use Log4J&#8217;s API and do something like:</p>
<pre class="brush: java; title: ; notranslate">
Logger.getLogger(&quot;my.package.root&quot;).addAppender(new MySuperCustomizedAppender(configFromMyApp));
</pre>
<p>The above runs great in a unit test locally, I&#8217;m ready to go, lets deploy to JBoss!&#8230;&#8230;oops wait, once deployed there nothing is happening.. whats going on??</p>
<p>E) When I do a Logger.getLogger() I get a nice instance of <a href="http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.logmanager/jboss-logmanager-log4j/1.0.0.CR3/org/jboss/logmanager/log4j/BridgeLogger.java" target="_blank"><strong>org.jboss.logmanager.log4j.BridgeLogger</strong></a> , looking at the source I see this little gem:</p>
<pre class="brush: java; title: ; notranslate">
public void addAppender(final Appender newAppender) {
   // ignored
}
</pre>
<p>No warning. No Exception. No Message. Just silently discarded, letting you go ahead and waste your time trying to figure out what the hell is going on.</p>
<p>F) &#8220;Ok, someone else has certainly encountered this, lets google it&#8221;&#8230;. yep, doing a search on &#8220;BridgeLogger jboss addAppender&#8221; will yield you a whole lot of results and no definitive solution that really seems to do the job. Several forum posts going on and on with the lack of a satisfactory answer; several JIRA tickets documenting this issue etc. Overall the &#8220;workarounds&#8221; seem like way more trouble then they are worth (fiddling w/ jars, build/deploy routines, configurations etc on all app servers etc)</p>
<p>G) &#8220;Hmm, maybe I shouldn&#8217;t be using Log4J, how about Slf4J?&#8221;&#8230;.. ok well, Slf4J provides a nice facade to logging. I&#8217;ll have to refactor a lot of my logging statements to use this API but it might be manageable. Then I can specifically target Log4j and bypass Jboss&#8217;s logging system&#8230;&#8230; oops. wait. no. JBoss also includes an SLF4J adapter of its own in the parent server level classpath, so if I create my own, since SLF4j does not permit multiple bindings, it will be a crap shoot for which one it picks&#8230;. Jboss&#8217; or the one you want it to. Again the &#8220;solutions&#8221; for getting SLF4J to use your binding of choice over the one provided by JBoss seem like more &#8220;forum threads&#8221; with the lack of clear documented solution that does not involve your system administrators having to make farm wide config changes&#8230; @see F above. Forget it</p>
<p>H) Now what? Create my own &#8220;extension&#8221; of SLF4J or my own cloned interface of SLF4J that gives me some sort of hook that permits me to route log events over my customized &#8220;appender&#8221;? Yet more abstractions.</p>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/java/'>Java</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/jboss-sucks/'>jboss sucks</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/501/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=501&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2012/11/21/logging-in-jboss-sucks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
		<item>
		<title>Securing Foscam IP camera access over SSL with Apache reverse proxying</title>
		<link>http://bitsofinfo.wordpress.com/2012/07/20/securing-foscam-ip-camera-access-over-ssl-with-apache-reverse-proxying/</link>
		<comments>http://bitsofinfo.wordpress.com/2012/07/20/securing-foscam-ip-camera-access-over-ssl-with-apache-reverse-proxying/#comments</comments>
		<pubDate>Fri, 20 Jul 2012 19:24:15 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[foscam]]></category>
		<category><![CDATA[ipcamera]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=489</guid>
		<description><![CDATA[UPDATED: 11/29/12 Recently I was assisting a local business setup their Foscam IP cameras and make them remotely accessible for monitoring purposes from anywhere in the world. The particular models they had installed are the FI8910W line. These camera&#8217;s are pretty cool and for ~$100 retail they are a pretty good deal in my opinion. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=489&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>UPDATED: 11/29/12</strong></p>
<p>Recently I was assisting a local business setup their <a href="http://foscam.us/" target="_blank">Foscam</a> IP cameras and make them remotely accessible for monitoring purposes from anywhere in the world. The particular models they had installed are the <a href="http://foscam.us/products/foscam-fi8910w-white-wireless-ip-camera.html" target="_blank">FI8910W</a> line. These camera&#8217;s are pretty cool and for ~$100 retail they are a pretty good deal in my opinion. The cameras can be accessed via a browser over HTTP and also support a rudimentary HTTP/CGI API. However one of the biggest issues with these cameras security wise is the lack of SSL support. The embedded webserver on these things only supports HTTP and basic auth in the clear which, outside of your local network is not a good thing if your requirements is to be able to view/manage them remotely from over the internet.</p>
<p>One solution for this is to simply front all access to your cameras with a <a href="https://en.wikipedia.org/wiki/Secure_Sockets_Layer" target="_blank">SSL secured</a> reverse proxy. We did this using <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html" target="_blank">Apache&#8217;s mod_proxy</a>. I&#8217;m not going to go into every detail of how to do this below, but the point is to give the reader a starting point. You can lookup the details on all these apache configuration specifics elsewhere on the web, there are tons of examples out there.</p>
<p>The example below would be for securing access to 2 (two) Foscam IP cameras on your local network, living on an example subnet 192.168.1.0. It assumes the local network is fronted by a router that supports port forwarding, which most consumer/business routers do. The end objective here is that when you access <a href="https://myproxy.host.com:10001" rel="nofollow">https://myproxy.host.com:10001</a> you will be accessing CAM1 and when you access <a href="https://myproxy.host.com:10002" rel="nofollow">https://myproxy.host.com:10002</a> you will be accessing CAM2.</p>
<p>Secondarily you can also set it up so that you could hit CAM1 at <a href="https://myproxy.host.com:10000/cam1/" rel="nofollow">https://myproxy.host.com:10000/cam1/</a> and CAM2 at <a href="https://myproxy.host.com:10000/cam2/" rel="nofollow">https://myproxy.host.com:10000/cam2/</a></p>
<ol>
<li>CAM1 IP = 192.168.1.100 listening on port 80</li>
<li>CAM2 IP = 192.168.1.101 listening on port 80</li>
<li>Reverse Proxy Server = 192.168.1.50 listening on ports 10000, 10001, 10002</li>
<li>Router IP address: 192.168.1.1  configured with port forwarding as follows: Port 10000 -&gt; 192.168.1.50:10000, 10001 -&gt; 192.168.1.50:10001 and 10002 -&gt; 192.168.1.50:10002</li>
</ol>
<h3><strong>OVERVIEW</strong></h3>
<ul>
<li>First off you need to setup a computer/server running Apache. The <a href="http://httpd.apache.org/" target="_blank">Apache webserver</a> is available for almost every operating system known to man from linux to windows, to os-x. This server&#8217;s IP address is 192.168.1.50 and ensure that <a href="http://httpd.apache.org/docs/2.2/mod/core.html#namevirtualhost" target="_blank">name based virtual host support</a> is enabled as well as <a href="http://httpd.apache.org/docs/2.2/mod/mod_ssl.html" target="_blank">mod_ssl</a>.</li>
</ul>
<ul>
<li>Next ensure that apache is listening on all the necessary ports (the 3 mentioned above). You will want to have Apache listen on a separate unique port for each IP Camera it is proxying access to, or at least one unique port if you are proxying the cameras of of a sub-path: For this example we are assigning port 10000 -&gt; [CAM1 &amp; CAM2 via sub-dir proxies], port 10001-&gt;CAM1 only and 10002-&gt;CAM2 only. Within your apache configuration you will want to ensure that you have statements like the following configured:</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
NameVirtualHost *:10000
NameVirtualHost *:10001
NameVirtualHost *:10002
Listen 10000
Listen 10001
Listen 10002
</pre>
<ul>
<li>Now that Apache is configured to listen on the necessary ports, we need to configure the actual virtual hosts and the reverse proxying directives within each host, see the example below:</li>
</ul>
<pre class="brush: plain; title: ; notranslate">
###############################
# Reverse proxy config for BOTH
# CAMs (1 &amp; 2) via sub-paths
# @ 192.168.1.100
###############################
&lt;VirtualHost 192.168.1.50:10000&gt;
 ProxyRequests Off
 ProxyPreserveHost On
 ProxyVia On
 &lt;Proxy *&gt;
 Order deny,allow
 Allow from all
 &lt;/Proxy&gt;

 # CAM1 (note trailing / is important)
 ProxyPass /cam1/ http://192.168.1.100:80/
 ProxyPassReverse /cam1/ http://192.168.1.100:80/

 # CAM2 (note trailing / is important)
 ProxyPass /cam2/ http://192.168.1.101:80/
 ProxyPassReverse /cam2/ http://192.168.1.101:80/

 CustomLog /path/to/apachelogs/access_cam1.log combined
 ErrorLog /path/to/apachelogs/error_cam1.log
 ServerName cam3

 SSLEngine On
 SSLCertificateFile /path/to/sslcert/mysslcert.crt
 SSLCertificateKeyFile /path/to/sslkey/sslkey.key

 &lt;FilesMatch &quot;\.(cgi|shtml|phtml|php)$&quot;&gt;
 SSLOptions +StdEnvVars
 &lt;/FilesMatch&gt;
 &lt;Directory /usr/lib/cgi-bin&gt;
 SSLOptions +StdEnvVars
 &lt;/Directory&gt;

 BrowserMatch &quot;MSIE [2-6]&quot; \
 nokeepalive ssl-unclean-shutdown \
 downgrade-1.0 force-response-1.0
 # MSIE 7 and newer should be able to use keepalive
 BrowserMatch &quot;MSIE [17-9]&quot; ssl-unclean-shutdown
&lt;/VirtualHost&gt;

###############################
# Reverse proxy config for CAM1
# @ 192.168.1.100
###############################
&lt;VirtualHost 192.168.1.50:10001&gt;
 ProxyRequests Off
 ProxyPreserveHost On
 ProxyVia On
 &lt;Proxy *&gt;
 Order deny,allow
 Allow from all
 &lt;/Proxy&gt;
 ProxyPass / http://192.168.1.100:80/
 ProxyPassReverse / http://192.168.1.100:80/
 CustomLog /path/to/apachelogs/access_cam1.log combined
 ErrorLog /path/to/apachelogs/error_cam1.log
 ServerName cam3

 SSLEngine On
 SSLCertificateFile /path/to/sslcert/mysslcert.crt
 SSLCertificateKeyFile /path/to/sslkey/sslkey.key

 &lt;FilesMatch &quot;\.(cgi|shtml|phtml|php)$&quot;&gt;
 SSLOptions +StdEnvVars
 &lt;/FilesMatch&gt;
 &lt;Directory /usr/lib/cgi-bin&gt;
 SSLOptions +StdEnvVars
 &lt;/Directory&gt;

 BrowserMatch &quot;MSIE [2-6]&quot; \
 nokeepalive ssl-unclean-shutdown \
 downgrade-1.0 force-response-1.0
 # MSIE 7 and newer should be able to use keepalive
 BrowserMatch &quot;MSIE [17-9]&quot; ssl-unclean-shutdown
&lt;/VirtualHost&gt;

###############################
# Reverse proxy config for CAM2
# @ 192.168.1.101
###############################
&lt;VirtualHost 192.168.1.50:10002&gt;
 ProxyRequests Off
 ProxyPreserveHost On
 ProxyVia On
 &lt;Proxy *&gt;
 Order deny,allow
 Allow from all
 &lt;/Proxy&gt;
 ProxyPass / http://192.168.1.101:80/
 ProxyPassReverse / http://192.168.1.101:80/
 CustomLog /path/to/apachelogs/access_cam2.log combined
 ErrorLog /path/to/apachelogs/error_cam2.log
 ServerName cam3

 SSLEngine On
 SSLCertificateFile /path/to/sslcert/mysslcert.crt
 SSLCertificateKeyFile /path/to/sslkey/sslkey.key

 &lt;FilesMatch &quot;\.(cgi|shtml|phtml|php)$&quot;&gt;
 SSLOptions +StdEnvVars
 &lt;/FilesMatch&gt;
 &lt;Directory /usr/lib/cgi-bin&gt;
 SSLOptions +StdEnvVars
 &lt;/Directory&gt;

 BrowserMatch &quot;MSIE [2-6]&quot; \
 nokeepalive ssl-unclean-shutdown \
 downgrade-1.0 force-response-1.0
 # MSIE 7 and newer should be able to use keepalive
 BrowserMatch &quot;MSIE [17-9]&quot; ssl-unclean-shutdown
&lt;/VirtualHost&gt;
</pre>
<ul>
<li>Ok, so before you start up apache, you need to generate your own self-signed SSL certificate/key. See those lines above in the configuration for &#8220;SSLCertificateFile&#8221; and &#8220;SSLCertificateKeyFile&#8221;? You will need to generate your own SSL private key, certificate request, and then self sign it. The results of those openssl commands yield files that you point to on your local proxy server. <a href="http://www.thegeekstuff.com/2009/07/linux-apache-mod-ssl-generate-key-csr-crt-file/" target="_blank">You can read here for an example on how to generate the necessary files</a></li>
</ul>
<ul>
<li>Next ensure the router that sits in front of your proxy server @ 192.168.1.50 has port forwarding enabled and forwards traffic going to port 10000, 10001 and 10002 to your proxy server.</li>
</ul>
<ul>
<li>Start up apache, work out the kinks and you should be ready to go. If you are outside of your normal network you will need to find your router&#8217;s WAN public IP address and go to <a href="https://my.external.router.ip:10001" rel="nofollow">https://my.external.router.ip:10001</a> and <a href="https://my.external.router.ip:10002" rel="nofollow">https://my.external.router.ip:10002</a> and you will be accessing CAM1 and CAM2 respectively over SSL from anywhere in the world. OR secondarily you can also go to <a href="https://my.external.router.ip:10000/cam1/" rel="nofollow">https://my.external.router.ip:10000/cam1/</a> and https://my.external.router.ip:10000/cam2/ to hit the cameras. Please note that traffic from your browser to your proxy server is encrypted with SSL, however the SSL encryption will terminate at the proxy server. Network traffic from your proxy server to CAM1 and CAM2 is unencrypted but only running over your local network. This article assumes you trust who is on your local network not to be sniffing packets.</li>
</ul>
<ul>
<li>You will also want to ensure that your proxy server has a firewall on it, permits IP forwarding, limits access to only the necessary ports and is configured securely. You can handle that on your own and that is outside of the scope of this article.</li>
</ul>
<ul>
<li>Hopefully this helps someone out there who wants to securely access their IP cameras over the internet. Note that what is described above should work with any IP camera on the market that only supports HTTP, however the general procedure described above was only tested to work with Foscam model <a href="http://foscam.us/products/foscam-fi8910w-white-wireless-ip-camera.html" target="_blank">FI8910W</a></li>
</ul>
<p><strong>SOFTWARE FOR VIEWING YOUR PROXIED CAMERAS</strong></p>
<p>I&#8217;ve received many questions regarding which apps out there support talking to Foscam&#8217;s behind a SSL secured proxy and unfortunately the few I&#8217;ve used <strong>all fall short in one way or another</strong>. Proxying http/https based resources on a network (via ports, sub-paths or other methods) is a technology that has been around for a long time and from an client apps perspective it need not know it is even there. Secondarily, the Foscam camera APIs will work just fine regardless of how they are proxied (from the root url or off of a sub-path in the proxy). Regardless here are some apps I&#8217;ve used below with some notes</p>
<ul>
<li>iOS: <a href="http://itunes.apple.com/us/app/foscam-pro-two-way-audio-recording/id509546027?mt=8" target="_blank"><strong>FoscamPro</strong></a>: Cool app, works great when you are on your internal network, but fails miserably if you try to use it from outside your network when your cameras are behind an SSL secured proxy as described above. Why? The FoscamPro application simply <span style="color:#ff0000;"><strong>DOES NOT support SSL</strong></span>. <em><strong>(FoscamPro devs: PLEASE IMPLEMENT THIS!)</strong> </em>The only way to use FoscamPro in the setup above is if you have a VPN server running behind your router; you then connect to your home VPN which lets you appear &#8220;internal&#8221; to your local network when you are outside of your network, and then access your cameras directly, bypassing the proxy. The VPN itself is what is encrypting all of your communications.</li>
</ul>
<ul>
<li>iOS: <a href="https://itunes.apple.com/us/app/live-cams-pro-ip-camera-viewer/id428145132?mt=8" target="_blank"><strong>Live Cams Pro</strong></a>: Cool app, works very similar to FoscamPro but supports other manufacturers and more devices, generic url streams etc. They <span style="color:#339966;"><strong>DO support SSL</strong></span> which works with the proxied setup described above. However they <span style="color:#ff0000;"><strong>DO NOT support </strong><span style="color:#000000;">specifying a relative path off of the base IP that you are connecting to a Foscam camera with. This effectively eliminates your ability to proxy your cameras via sub-dirs (i.e. <a href="https://my.net/cam1/" rel="nofollow">https://my.net/cam1/</a>) which is CRITICAL if you have a lot of cams but your router limits the number of port forwards you can have! <em><strong>(Live Cams Pro devs: PLEASE IMPLEMENT THIS!)</strong> </em></span></span></li>
</ul>
<ul>
<li>Android:<a href="https://play.google.com/store/apps/details?id=com.alexvas.dvr.pro" target="_blank"> <strong><span style="color:#000000;">tinyCam Monitor PRO:</span></strong></a> Cool app, I must admit I am pretty sure this supports HTTPS as I was testing with this earlier this summer for the port-&gt; cam based config. I have not tested with the sub-dir path setup. If someone can shoot me an update on this I&#8217;ll appreciate it. (I&#8217;ve switched to all iOS)</li>
</ul>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/apache/'>Apache</a>, <a href='http://bitsofinfo.wordpress.com/category/http/'>HTTP</a>, <a href='http://bitsofinfo.wordpress.com/category/security/'>security</a>, <a href='http://bitsofinfo.wordpress.com/category/ubuntu/'>Ubuntu</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/apache-2/'>apache</a>, <a href='http://bitsofinfo.wordpress.com/tag/foscam/'>foscam</a>, <a href='http://bitsofinfo.wordpress.com/tag/ipcamera/'>ipcamera</a>, <a href='http://bitsofinfo.wordpress.com/tag/security/'>security</a>, <a href='http://bitsofinfo.wordpress.com/tag/ssl/'>ssl</a>, <a href='http://bitsofinfo.wordpress.com/tag/ubuntu/'>Ubuntu</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/489/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/489/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=489&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2012/07/20/securing-foscam-ip-camera-access-over-ssl-with-apache-reverse-proxying/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
		<item>
		<title>JBoss and BouncyCastleProvider &#8211; SecurityException : &#8220;cannot authenticate the provider&#8221;</title>
		<link>http://bitsofinfo.wordpress.com/2012/07/11/jboss-and-bouncycastleprovider-securityexception-cannot-authenticate-the-provider/</link>
		<comments>http://bitsofinfo.wordpress.com/2012/07/11/jboss-and-bouncycastleprovider-securityexception-cannot-authenticate-the-provider/#comments</comments>
		<pubDate>Wed, 11 Jul 2012 19:23:26 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[bouncycastle]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[jce]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=486</guid>
		<description><![CDATA[Are you having problems trying to use the BouncyCastleProvider from your app on Jboss 5.x + (i.e. like the errors listed below)? If so and you don&#8217;t want to spend hours trying to workaround this issue in Jboss, just follow this guy&#8217;s instructions and get back to business: http://www.randombugs.com/java/javalangsecurityexception-jce-authenticate-provider-bc.html Some background regarding this Jboss issue [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=486&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Are you having problems trying to use the BouncyCastleProvider from your app on Jboss 5.x + (i.e. like the errors listed below)? If so and you don&#8217;t want to spend hours trying to workaround this issue in Jboss, just follow this guy&#8217;s instructions and get back to business: <a href="http://www.randombugs.com/java/javalangsecurityexception-jce-authenticate-provider-bc.html" target="_blank">http://www.randombugs.com/java/javalangsecurityexception-jce-authenticate-provider-bc.html</a></p>
<p>Some background regarding this Jboss issue at <a href="https://issues.jboss.org/browse/AS7-308)" target="_blank">https://issues.jboss.org/</a><a href="https://issues.jboss.org/browse/AS7-308)" target="_blank">browse/AS7-308</a></p>
<p>Errors that can be fixed by doing the above:</p>
<p>java.lang.SecurityException: JCE cannot authenticate the provider BC: org.jasypt.exceptions.EncryptionInitializationException: java.lang.SecurityException: JCE cannot authenticate the provider BC</p>
<p>OR</p>
<p>Caused by: java.util.jar.JarException: Cannot parse vfs: /path/to/your/bouncycastle.jar</p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/java/'>Java</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/bouncycastle/'>bouncycastle</a>, <a href='http://bitsofinfo.wordpress.com/tag/java/'>Java</a>, <a href='http://bitsofinfo.wordpress.com/tag/jboss/'>jboss</a>, <a href='http://bitsofinfo.wordpress.com/tag/jce/'>jce</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/486/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/486/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=486&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2012/07/11/jboss-and-bouncycastleprovider-securityexception-cannot-authenticate-the-provider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
		<item>
		<title>Excellent presentation on Redis</title>
		<link>http://bitsofinfo.wordpress.com/2012/06/15/excellent-presentation-on-redis/</link>
		<comments>http://bitsofinfo.wordpress.com/2012/06/15/excellent-presentation-on-redis/#comments</comments>
		<pubDate>Fri, 15 Jun 2012 14:08:00 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[NOSQL]]></category>
		<category><![CDATA[redis]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=483</guid>
		<description><![CDATA[Came across this creative presentation on Redis: http://www.slideshare.net/JustinCarmony/blazing-data-with-redis-20 Filed under: NOSQL Tagged: NOSQL, redis<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=483&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Came across this creative presentation on Redis: <a href="http://www.slideshare.net/JustinCarmony/blazing-data-with-redis-20">http://www.slideshare.net/JustinCarmony/blazing-data-with-redis-20</a></p>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/nosql/'>NOSQL</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/nosql/'>NOSQL</a>, <a href='http://bitsofinfo.wordpress.com/tag/redis/'>redis</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/483/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/483/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=483&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2012/06/15/excellent-presentation-on-redis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
		<item>
		<title>Astyanax -&gt; Cassandra PoolTimeoutException during Authentication failure?</title>
		<link>http://bitsofinfo.wordpress.com/2012/06/08/astyanax-cassandra-pooltimeoutexception-during-authentication-failure/</link>
		<comments>http://bitsofinfo.wordpress.com/2012/06/08/astyanax-cassandra-pooltimeoutexception-during-authentication-failure/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 15:33:58 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[NOSQL]]></category>
		<category><![CDATA[astyanax]]></category>
		<category><![CDATA[cassandra]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=476</guid>
		<description><![CDATA[Recently I was working on implementing a custom IAuthenticator and IAuthority for Cassandra 1.1.1 because really there is not much/any security out of the box. For those of you familiar with Cassandra, its distribution used to include a simple property file based implementation of the IAuthentication and IAuthority that you could reference in your cassandra.yaml file [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=476&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently I was working on implementing a custom IAuthenticator and IAuthority for Cassandra 1.1.1 because really there is not much/any security out of the box. For those of you familiar with Cassandra, its distribution used to include a simple property file based implementation of the IAuthentication and IAuthority that you could reference in your cassandra.yaml file however they removed them from the main distribution and placed them under the examples/ section due to weak security concerns. They are a decent starting point to reference when building your own implementations however they are not recommended for real production use; hence why I started to implement my own.</p>
<p>Doing this, I came across a situation trying to use the Netflix Astyanax client API to talk to Cassandra, while Cassandra was running with th custom IAuthenticator and IAuthorities that I made. When testing the initializations of connections to Cassandra, while specifying invalid credentials (intentionally) instead of seeing some sort of <strong>AuthenticationException</strong> dumped to my client Astyanax log file, I was getting &#8220;<strong>PoolTimeoutException</strong>&#8220;s instead&#8230;. which was odd. I scratched my head on this for a while as I cloned Astyanax from GitHub and began digging into the source. I suspected that the Thrift AuthenticationException might  be supressed somewhere&#8230;. well after reading the source, I realized it wasn&#8217;t being suppressed per-say, but rather sent to Astyanax&#8217;s <strong>ConnectionPoolMonitor</strong>, which is something you can configure programatically when you are defining your client code&#8217;s <strong>AstyanaxContext </strong>object which manages all connectivity to Cassandra. Out of the box Astyanax ships with a few ConnectionPoolMonitor implementations, one is the <a href="https://github.com/Netflix/astyanax/tree/master/src/main/java/com/netflix/astyanax/connectionpool/impl">CountingConnectionPoolMonitor</a> (does no logging, just collects stats) and the second is the <a href="https://github.com/Netflix/astyanax/tree/master/src/main/java/com/netflix/astyanax/connectionpool/impl">Slf4jConnectionPoolMonitorImpl</a> (logs to SLF4J). Depending on which one you specify in your context&#8217;s configuration you may or may not see AuthenticationException information in your client&#8217;s logs/console.</p>
<p>In my case, I was specifying the CountingConnectionPoolMonitor which was receiving the AuthenticationException, but not doing anything with it other than incrementing some counter, effectivly hiding it from me. The pool ran out of connections (could not create any) and the code waiting on getting a connection just threw a PoolTimeoutException, adding to my confusion.</p>
<p>To correct this, as I was using Log4J, I just created a custom ConnectionPoolMonitor which logged everything to Log4J instead. (<a href="https://github.com/Netflix/astyanax/tree/master/src/main/java/com/netflix/astyanax/connectionpool/impl">@see Astyanax&#8217;s SLF4J monitor implementation as an example</a> for how to create one for Log4j) See below for how to specify the monitor. Creating your own ConnectionPoolMonitor implementation is easy and pretty self explanatory.</p>
<p>Below is an example of setting up an AstyanaxContext and how you specify the ConnectionPoolMonitor that should be used. Once I used the correct monitor for my needs, I was able to see the true source of the PoolTimeoutExceptions (i.e. the AuthenticationExceptions) because now my monitor was logging them. (NOTE: the example below is just a test context, not something for a robust setup)</p>
<pre class="brush: java; title: ; notranslate">

AstyanaxContext context = new AstyanaxContext.Builder()
 .forCluster(clusterName)
 .forKeyspace(keyspaceName)
 .withAstyanaxConfiguration(new AstyanaxConfigurationImpl()
 .setDiscoveryType(NodeDiscoveryType.NONE)
 )

.withConnectionPoolConfiguration(new ConnectionPoolConfigurationImpl(clusterName+&quot;-&quot;+keyspaceName+&quot;_CONN_POOL&quot;)
 .setPort(defaultConnectionPoolHostPort)
 .setInitConnsPerHost(1)
 .setMaxConnsPerHost(2)
 .setSeeds(connectionPoolSeedHosts)
 .setAuthenticationCredentials(
 new SimpleAuthenticationCredentials(new String(principal), new String(credentials)))
 )
 .withConnectionPoolMonitor(new Log4jConnPoolMonitor())
 .buildKeyspace(ThriftFamilyFactory.getInstance());

context.start();

</pre>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/cassandra/'>Cassandra</a>, <a href='http://bitsofinfo.wordpress.com/category/nosql/'>NOSQL</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/astyanax/'>astyanax</a>, <a href='http://bitsofinfo.wordpress.com/tag/cassandra-2/'>cassandra</a>, <a href='http://bitsofinfo.wordpress.com/tag/nosql/'>NOSQL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/476/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/476/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=476&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2012/06/08/astyanax-cassandra-pooltimeoutexception-during-authentication-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
		<item>
		<title>USPS AIS bulk data loading with Hadoop mapreduce</title>
		<link>http://bitsofinfo.wordpress.com/2012/06/06/usps-ais-bulk-data-loading-with-hadoop-mapreduce/</link>
		<comments>http://bitsofinfo.wordpress.com/2012/06/06/usps-ais-bulk-data-loading-with-hadoop-mapreduce/#comments</comments>
		<pubDate>Wed, 06 Jun 2012 16:55:08 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[NOSQL]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[hbase]]></category>
		<category><![CDATA[mapreduce]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=469</guid>
		<description><![CDATA[Today I pushed up some source to Github for a utility I was previously working on to load data from USPS AIS data files into HBase/Mysql using Hadoop mapreduce and simpler data loaders. Source @ https://github.com/bitsofinfo/bitsofinfo.usps.ais This project was originally started to create a framework for loading data files from the USPS AIS suite of [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=469&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Today I pushed up some source to <a href="https://github.com/bitsofinfo/bitsofinfo.usps.ais" target="_blank">Github</a> for a utility I was previously working on to load data from USPS AIS data files into HBase/Mysql using Hadoop mapreduce and simpler data loaders. Source @ <a href="https://github.com/bitsofinfo/bitsofinfo.usps.ais" target="_blank">https://github.com/bitsofinfo/bitsofinfo.usps.ais</a></p>
<p>This project was originally started to create a framework for loading data files from the USPS AIS suite of data products (zipPlus4, cityState). The project has not been worked on in a while but I figured I&#8217;d open-source it and <strong>maybe some folks would like to team up to work on it further, if so let me know!</strong> Throwing it out there under the Apache 2.0 license. Some of the libs need updating etc as well, for instance it was originally developed w/ Spring 2.5.</p>
<p>USPS AIS data files are fixed length format records. This framework was created to handle bulk loading/updating this data into a structured/semi-structured data store of address data (i.e. MySql or HBase). It is wired together using Spring and built w/ Maven. A key package is the &#8220;org.bitsofinfo.util.address.usps.ais&#8221; package which defines the pojos for the records, and leverages a custom annotation which binds record properties to locations within the fixed length records which contain the data being loaded.</p>
<p>Initial loader implementations include both a single JVM multi-threaded version as well as a second one that leverages Hadoop Mapreduce to split the AIS files up across HDFS and process them in parallel using Hadoop mapreduce nodes to ingest the data much faster then just on one box. Both of these obviously operate asynchronously given a load job submission. Ingestion times are significantly faster using Hadoop.</p>
<p>This project also had a need for a Hadoop InputFormat/RecordReader that could read from fixed length data files (none existed), so I created it for this project (FixedLengthInputFormat). This was also contributed as a patch to the Hadoop project. This source is included in here and updated for Hadoop 0.23.1 (not yet tested), however the patch that was submitted to the Hadoop project is still pending and was compiled under 0.20.x. The 0.20.x version in the patch files was tested and functionally running on a 4 node Hadoop and Hbase cluster.</p>
<p>You can read more about the fixed length record reader patch @</p>
<p><a href="http://bitsofinfo.wordpress.com/2009/11/01/reading-fixed-length-width-input-record-reader-with-hadoop-mapreduce/">http://bitsofinfo.wordpress.com/2009/11/01/reading-fixed-length-width-input-record-reader-with-hadoop-mapreduce/</a></p>
<p><a href="https://issues.apache.org/jira/browse/MAPREDUCE-1176">https://issues.apache.org/jira/browse/MAPREDUCE-1176 </a></p>
<p>The USPS AIS products have some sample data-sets available online at the USPS website, however for the full product of data-files you need to pay for the data and/or subscription for delta updates. Some of the unit-tests reference files from the real data-sets, they have been omitted, you will have to replace them with the real ones. Other unit tests reference the sample files freely available via USPS or other providers.</p>
<p>Links where USPS data files can be purchased:</p>
<p><a href="https://www.usps.com/business/address-information-systems.htm">https://www.usps.com/business/address-information-systems.htm</a></p>
<p><a href="http://www.zipinfo.com/products/natzip4/natzip4.htm">http://www.zipinfo.com/products/natzip4/natzip4.htm</a></p>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/java/'>Java</a>, <a href='http://bitsofinfo.wordpress.com/category/mysql/'>MySQL</a>, <a href='http://bitsofinfo.wordpress.com/category/nosql/'>NOSQL</a>, <a href='http://bitsofinfo.wordpress.com/category/spring/'>Spring</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/hadoop/'>hadoop</a>, <a href='http://bitsofinfo.wordpress.com/tag/hbase/'>hbase</a>, <a href='http://bitsofinfo.wordpress.com/tag/java/'>Java</a>, <a href='http://bitsofinfo.wordpress.com/tag/mapreduce/'>mapreduce</a>, <a href='http://bitsofinfo.wordpress.com/tag/mysql/'>MySQL</a>, <a href='http://bitsofinfo.wordpress.com/tag/nosql/'>NOSQL</a>, <a href='http://bitsofinfo.wordpress.com/tag/spring/'>Spring</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/469/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/469/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=469&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2012/06/06/usps-ais-bulk-data-loading-with-hadoop-mapreduce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
		<item>
		<title>How to access your OpenShift MongoDB database remotely on OS-X</title>
		<link>http://bitsofinfo.wordpress.com/2012/06/05/how-to-access-your-openshift-mongodb-database-remotely-on-os-x/</link>
		<comments>http://bitsofinfo.wordpress.com/2012/06/05/how-to-access-your-openshift-mongodb-database-remotely-on-os-x/#comments</comments>
		<pubDate>Tue, 05 Jun 2012 17:21:50 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[NOSQL]]></category>
		<category><![CDATA[PaaS]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[openshift]]></category>
		<category><![CDATA[paas]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=458</guid>
		<description><![CDATA[I recently started playing around with Redhat&#8217;s Openshift PaaS and installed the MongoDB and RockMongo cartridges on my application. My use case was just to leverage the Openshift platform to run my MongoDB instance for me, and I really was ready (nor needing) to push an actual application out to the application running @ openshift; [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=458&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I recently started playing around with Redhat&#8217;s Openshift PaaS and installed the MongoDB and RockMongo cartridges on my application. My use case was just to leverage the Openshift platform to run my MongoDB instance for me, and I really was ready (nor needing) to push an actual application out to the application running @ openshift; instead I just wanted my local Java program to leverage the remote MongoDB instance, pump some data into it and then view it in Rockmongo (also running on the app at openshift).</p>
<p>Turns out you can enable this by enabling port forwarding locally on the computer you want to connect from. This is on OS-X:</p>
<ul>
<li>First ensure that your SSH key is available for use by the command we will run: &#8220;<strong><code>ssh-add /path/to/your/openshift/ssh.key</code></strong>&#8221; This should be the key that you created when you initially signed up for Openshift</li>
</ul>
<ul>
<li>Attempt to run the port forwarding enable command &#8220;<strong><code>rhc port-forward -a [yourAppName] -l [yourOpenShiftLoginId]</code>&#8220;, </strong>it will prompt you for your openshift credentials, then will likely output something like the below:</li>
</ul>
<div>
<p><code> Checking available ports...</code></p>
<p>Binding httpd -&gt; 127.5.198.2:8080&#8230;<br />
Binding mongod -&gt; 127.5.198.1:27017&#8230;</p>
<p>Use ctl + c to stop</p>
<p>bind: Can&#8217;t assign requested address<br />
channel_setup_fwd_listener: cannot listen to port: 27017<br />
bind: Can&#8217;t assign requested address<br />
channel_setup_fwd_listener: cannot listen to port: 8080<br />
Could not request local forwarding.</p>
<ul>
<li>The above error is because we need to now enable loopback aliases for each failed 127.x address listed above (those addresses will be different in your output above). To do this run the following for EACH loopback that failed: &#8220;<strong>sudo ifconfig lo0 alias 127.x.x.x</strong>&#8220;. Note that even after running this, make sure you already don&#8217;t have something else local bound on those ports (i.e. a local dev mongodb instance or something else on 8080)</li>
</ul>
<ul>
<li>After you add the loopback aliases re-run the port forwarding command above, this time it should successfully complete. If you go to <a href="https://127.x.x.x:8080" rel="nofollow">https://127.x.x.x:8080</a> your request will be going directly to your openshift instance.</li>
</ul>
<ul>
<li>You can also now connect to your mongodb instance programmatically as well just using the new address:ports forwarded above plus the appropriate credentials</li>
</ul>
<ul>
<li>Interestingly enough the port forwarding goes over an SSH tunnel to your app there, and it appears that Openshift itself uses AWS!</li>
</ul>
</div>
<div></div>
<div><strong>Some relevant links to help you out which also helped me:</strong></div>
<div>
<ul>
<li><a href="https://openshift.redhat.com/community/forums/openshift/connecting-to-mongodb-gear-using-your-local-client-mongo-shell">https://openshift.redhat.com/community/forums/openshift/connecting-to-mongodb-gear-using-your-local-client-mongo-shell</a></li>
</ul>
</div>
<div>
<ul>
<li><a href="https://community.jboss.org/en/tools/blog/2012/02/08">https://community.jboss.org/en/tools/blog/2012/02/08</a></li>
</ul>
</div>
<div>
<ul>
<li><a href="https://openshift.redhat.com/community/forums/openshift/permission-denied-publickeygssapi-keyexgssapi-with-mic-with-win-7-0">https://openshift.redhat.com/community/forums/openshift/permission-denied-publickeygssapi-keyexgssapi-with-mic-with-win-7-0</a></li>
</ul>
</div>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/nosql/'>NOSQL</a>, <a href='http://bitsofinfo.wordpress.com/category/paas/'>PaaS</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/mongodb/'>mongodb</a>, <a href='http://bitsofinfo.wordpress.com/tag/nosql/'>NOSQL</a>, <a href='http://bitsofinfo.wordpress.com/tag/openshift/'>openshift</a>, <a href='http://bitsofinfo.wordpress.com/tag/paas-2/'>paas</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/458/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=458&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2012/06/05/how-to-access-your-openshift-mongodb-database-remotely-on-os-x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
		<item>
		<title>NoSQL databases &#8211; excellent research paper</title>
		<link>http://bitsofinfo.wordpress.com/2012/04/13/nosql-databases-excellent-research-paper/</link>
		<comments>http://bitsofinfo.wordpress.com/2012/04/13/nosql-databases-excellent-research-paper/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 19:05:34 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[NOSQL]]></category>
		<category><![CDATA[rdbms]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=473</guid>
		<description><![CDATA[Came across this excellent research paper, maybe a bit biased at times however it really gives a great overview of NoSQL, different implementations and great comparisons with RDBMs&#8217;. Check it out at: http://www.christof-strauch.de/nosqldbs.pdf Filed under: NOSQL Tagged: NOSQL, rdbms<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=473&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Came across this excellent research paper, maybe a bit biased at times however it really gives a great overview of NoSQL, different implementations and great comparisons with RDBMs&#8217;. Check it out at: <a href="http://www.christof-strauch.de/nosqldbs.pdf" target="_blank">http://www.christof-strauch.de/nosqldbs.pdf</a></p>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/nosql/'>NOSQL</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/nosql/'>NOSQL</a>, <a href='http://bitsofinfo.wordpress.com/tag/rdbms/'>rdbms</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/473/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=473&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2012/04/13/nosql-databases-excellent-research-paper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting a JAX-WS web service client timeout &#8211; why is the answer so dang elusive??</title>
		<link>http://bitsofinfo.wordpress.com/2012/01/26/setting-a-jax-ws-web-service-client-timeout-why-is-the-answer-so-dang-elusive/</link>
		<comments>http://bitsofinfo.wordpress.com/2012/01/26/setting-a-jax-ws-web-service-client-timeout-why-is-the-answer-so-dang-elusive/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 23:19:36 +0000</pubDate>
		<dc:creator>bitsofinfo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[WS]]></category>
		<category><![CDATA[jax-ws]]></category>
		<category><![CDATA[timeout]]></category>
		<category><![CDATA[web service client]]></category>
		<category><![CDATA[ws]]></category>

		<guid isPermaLink="false">http://bitsofinfo.wordpress.com/?p=451</guid>
		<description><![CDATA[Trying to set a connection/read timeout in a WS client&#8230; can&#8217;t and found this post? Welcome to the club. Does ANYONE OUT THERE have a proven, easy to implement, somewhat universal way, to simple set connect and read timeouts for JAX-WS web-service clients? I can&#8217;t seem to find them, and neither can tons of others [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=451&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Trying to set a connection/read timeout in a WS client&#8230; can&#8217;t and found this post? Welcome to the club.</p>
<p>Does ANYONE OUT THERE have a proven, easy to implement, somewhat universal way, to simple set connect and read timeouts for JAX-WS web-service clients? I can&#8217;t seem to find them, and neither can tons of others out there by the looks for dozens of posts/blogs I have read in forums etc.</p>
<p>This is one of the most insidious problems with an application. Timeouts, or the lack thereof causing a thread in your application to mysteriously (or not) hang up sitting there forever. Is my app deadlocked? Why is this thread hung? Then after a while your app&#8217;s thread pool may be exhausted etc leading to harder to diagnose and worthless artifact error symptoms being spewed into a log file.</p>
<p>In an enterprise app, one of the common things we do is use a web-service to send or receive data from some other application out there&#8230; and a lot of people use some sort of JAX-WS generated variant of clients.</p>
<p>Here is my question. HOW can I reliably set a jax-ws client timeout for both connect and read operations? I seem to see various answers to this, often time they don&#8217;t work for folks. Other times I suspect folks are getting confused with regards to the actual JAX-WS client implementation executing their code (jboss, glassfish, websphere etc).. and I guess these settings vary based on where you code is deployed, which is SUPER convenient because there is not abstract definition of this in the spec itself to allow developers to specify their timeouts in a portable way??</p>
<p><strong>Hey Oracle: Why can&#8217;t Java just support a simple solution to this stupid time-wasting problem?? @see Axis clients and how easy it is to do there!</strong></p>
<p><strong>PLEASE POST YOUR SOLUTIONS IN THE COMMENTS SECTION OF THIS POST TO HELP OTHERS (and me!)</strong></p>
<p>Here are some examples I&#8217;ve seen out there of threads that have random answers that often go unanswered.</p>
<p><a href="http://www.coderanch.com/t/537394/Web-Services/java/JBoss-Jax-ws-Timeout-Configuration" rel="nofollow">http://www.coderanch.com/t/537394/Web-Services/java/JBoss-Jax-ws-Timeout-Configuration</a></p>
<p><a href="https://community.jboss.org/message/607864" rel="nofollow">https://community.jboss.org/message/607864</a></p>
<p><a href="http://stackoverflow.com/questions/2592303/how-do-i-set-the-jax-ws-client-request-timeout-programatically-on-jboss" rel="nofollow">http://stackoverflow.com/questions/2592303/how-do-i-set-the-jax-ws-client-request-timeout-programatically-on-jboss</a></p>
<p><a href="http://stackoverflow.com/questions/3130913/setting-jax-ws-client-timeout" rel="nofollow">http://stackoverflow.com/questions/3130913/setting-jax-ws-client-timeout</a></p>
<p><a href="http://www.java.net/node/676074" rel="nofollow">http://www.java.net/node/676074</a></p>
<p><a href="http://www.websphere-world.com/modules.php?name=News&#038;file=article&#038;sid=2058" rel="nofollow">http://www.websphere-world.com/modules.php?name=News&#038;file=article&#038;sid=2058</a></p>
<p><a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Frwbs_trbclientruntime.html" rel="nofollow">http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Frwbs_trbclientruntime.html</a></p>
<p><a href="http://chamerling.org/2009/09/23/setting-timeout-on-generated-jaxws-cxf-clients/" rel="nofollow">http://chamerling.org/2009/09/23/setting-timeout-on-generated-jaxws-cxf-clients/</a></p>
<p><a href="https://forums.oracle.com/forums/thread.jspa?threadID=1666087" rel="nofollow">https://forums.oracle.com/forums/thread.jspa?threadID=1666087</a></p>
<br />Filed under: <a href='http://bitsofinfo.wordpress.com/category/java/'>Java</a>, <a href='http://bitsofinfo.wordpress.com/category/ws/'>WS</a> Tagged: <a href='http://bitsofinfo.wordpress.com/tag/jax-ws/'>jax-ws</a>, <a href='http://bitsofinfo.wordpress.com/tag/timeout/'>timeout</a>, <a href='http://bitsofinfo.wordpress.com/tag/web-service-client/'>web service client</a>, <a href='http://bitsofinfo.wordpress.com/tag/ws-2/'>ws</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofinfo.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofinfo.wordpress.com/451/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofinfo.wordpress.com&#038;blog=9292969&#038;post=451&#038;subd=bitsofinfo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofinfo.wordpress.com/2012/01/26/setting-a-jax-ws-web-service-client-timeout-why-is-the-answer-so-dang-elusive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/280335308ca996f51a7ef4bf2893015e?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">bitsofinfo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
