<?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/"
	>

<channel>
	<title>MesoSynoptic Studios Blog &#187; WeatherMan</title>
	<atom:link href="http://blog.mesosynoptic.com/category/weatherman/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mesosynoptic.com</link>
	<description>The official blog for MesoSynoptic Studios</description>
	<lastBuildDate>Wed, 30 Jun 2010 04:42:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>More Rails progress</title>
		<link>http://blog.mesosynoptic.com/2010/06/06/more-rails-progress/</link>
		<comments>http://blog.mesosynoptic.com/2010/06/06/more-rails-progress/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 05:41:37 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[WeatherMan]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.mesosynoptic.com/?p=51</guid>
		<description><![CDATA[I finally wrapped my head around routes and how to get URLs pointed to the correct actions and controllers. After that, it literally took 10 minutes to create a view for uploading a file, connect it to the controller, and create another view for displaying the uploaded file. (Specifically&#8211;uploading the location CSV to be parsed [...]]]></description>
			<content:encoded><![CDATA[<p>I finally wrapped my head around routes and how to get URLs pointed to the correct actions and controllers.</p>
<p>After that, it literally took 10 minutes to create a view for uploading a file, connect it to the controller, and create another view for displaying the uploaded file.</p>
<p>(Specifically&#8211;uploading the location CSV to be parsed and added to the database)</p>
<p>Now to parse!</p>
<p>I&#8217;m really beginning to fall in love with Ruby on Rails. It&#8217;s been kind of difficult wrapping my head around some of the concepts, but once I do&#8230; damn it&#8217;s fast.</p>
<p>Once I get the CSV upload mechanism complete, it&#8217;s time to create another action for searching and returning a set of locations (in JSON!)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mesosynoptic.com/2010/06/06/more-rails-progress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Goal accomplished</title>
		<link>http://blog.mesosynoptic.com/2010/05/31/goal-accomplished/</link>
		<comments>http://blog.mesosynoptic.com/2010/05/31/goal-accomplished/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 03:39:40 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[WeatherMan]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://blog.mesosynoptic.com/?p=49</guid>
		<description><![CDATA[I have the RoR version of the backend serving data over an encrypted connection. This was the biggest roadblock I had faced so far with RoR Pretty easy once I figured out the limits of my host. So far in the Ruby on Rails/PHP-Yii contest, RoR is winning handedly. Parsing text is almost absurdly easy [...]]]></description>
			<content:encoded><![CDATA[<p>I have the RoR version of the backend serving data over an encrypted connection. This was the biggest roadblock I had faced so far with RoR</p>
<p>Pretty easy once I figured out the limits of my host.</p>
<p>So far in the Ruby on Rails/PHP-Yii contest, RoR is winning handedly. Parsing text is almost absurdly easy with Ruby.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mesosynoptic.com/2010/05/31/goal-accomplished/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why is this so hard?</title>
		<link>http://blog.mesosynoptic.com/2010/05/25/why-is-this-so-hard/</link>
		<comments>http://blog.mesosynoptic.com/2010/05/25/why-is-this-so-hard/#comments</comments>
		<pubDate>Tue, 25 May 2010 18:46:10 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[WeatherMan]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Yii]]></category>

		<guid isPermaLink="false">http://blog.mesosynoptic.com/?p=46</guid>
		<description><![CDATA[So, I thought I had this all figured out. I started playing around with the Yii framework for PHP, and then read a bunch of reviews about how similar it was to Ruby on Rails. So then I started playing around with Ruby on Rails again. Now with a bit better understanding of how it [...]]]></description>
			<content:encoded><![CDATA[<p>So, I thought I had this all figured out. I started playing around with the Yii framework for PHP, and then read a bunch of reviews about how similar it was to Ruby on Rails.</p>
<p>So then I started playing around with Ruby on Rails again. Now with a bit better understanding of how it all works, it&#8230; well frankly, it&#8217;s fun. Ruby is a joy to program in, and Rails makes certain things really slick and easy once you figure out what the conventions are.</p>
<p>So right now I&#8217;m coding my first task (importing the zip code database) in parallel in RoR and PHP/Yii. We&#8217;ll see which one wins.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mesosynoptic.com/2010/05/25/why-is-this-so-hard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting there</title>
		<link>http://blog.mesosynoptic.com/2010/05/19/getting-there/</link>
		<comments>http://blog.mesosynoptic.com/2010/05/19/getting-there/#comments</comments>
		<pubDate>Wed, 19 May 2010 18:56:08 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[WeatherMan]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[GNUStep]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Push notifications]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://blog.mesosynoptic.com/?p=40</guid>
		<description><![CDATA[I&#8217;ve been wracking my brain doing research the past several weeks on what the best options will be for me moving forward&#8230; I have settled on using PHP for the on-demand portions of the backend. This will offer the most flexibility due to the ubiquitousness of the LAMP stack and the large amount of developer [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wracking my brain doing research the past several weeks on what the best options will be for me moving forward&#8230; I have settled on using PHP for the on-demand portions of the backend. This will offer the most flexibility due to the ubiquitousness of the LAMP stack and the large amount of developer support available for the platform.</p>
<p>I&#8217;m still trying to decide which language to use for the service portion of the backend. Simply from the writing-a-daemon perspective, C would be the logical choice. However, a good secure Telnet client library and a good MySQL implementation are already important (yes, I know I could write my own, but I&#8217;m a firm believer in not repeating the work somebody else has done unless I can improve on it). Everything else can be tacked on as needed, but at this point the service portion of the backend consists pretty much of something to read the telnet feed, something to get the info into the database, and something to send the push notifications. I am thinking about using GNUStep to kind of keep things on the same wavelength <img src='http://blog.mesosynoptic.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mesosynoptic.com/2010/05/19/getting-there/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Languages</title>
		<link>http://blog.mesosynoptic.com/2010/04/20/languages/</link>
		<comments>http://blog.mesosynoptic.com/2010/04/20/languages/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 17:12:09 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[WeatherMan]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.mesosynoptic.com/?p=36</guid>
		<description><![CDATA[So, John brought up a very interesting point in a comment on the first post, which made me think about why I&#8217;m doing this monolithically. Truth be told, I couldn&#8217;t come up with a good answer. After making a design diagram and really looking into what I need the backend to do, it became very [...]]]></description>
			<content:encoded><![CDATA[<p>So, John brought up a very interesting point in a comment on the first post, which made me think about why I&#8217;m doing this monolithically. Truth be told, I couldn&#8217;t come up with a good answer.</p>
<p>After making a design diagram and really looking into what I need the backend to do, it became very clear to me that there are three main functions of the backend: collect data, push alerts, and respond to on-demand requests for data.</p>
<p>Items one and two are linked&#8211;I need to send a notification out as soon as the data comes in. However, item three can ostensibly exist on it&#8217;s own, separate from the other two. As I sat and thought about it, this made more and more sense. When I was first designing the system, WeatherMan had its own protocol for communicating with the server. As I was working, I ended up ditching that for a demand/response system over HTTP, which I kept integrated into the monolithic server.</p>
<p>It&#8217;s become apparent to me that this is a waste of resources. I will probably keep the WeatherWire parsing engine/notification system in Java since it&#8217;s already written there, but I will be offloading the demand/response system to either PHP or Ruby on Rails, to take advantage of the web server systems that I&#8217;m already running anyway.</p>
<p>Yay progress!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mesosynoptic.com/2010/04/20/languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby</title>
		<link>http://blog.mesosynoptic.com/2010/04/14/ruby/</link>
		<comments>http://blog.mesosynoptic.com/2010/04/14/ruby/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 13:22:15 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[WeatherMan]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.mesosynoptic.com/?p=24</guid>
		<description><![CDATA[I&#8217;ve decided that I&#8217;m going to keep doing coding work in Java on the backend, but I am also going to code the same features in parallel in Ruby to learn the syntax and the libraries. I think Ruby&#8217;s standard library will take care of most of what I need, and there seems to be [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided that I&#8217;m going to keep doing coding work in Java on the backend, but I am also going to code the same features in parallel in Ruby to learn the syntax and the libraries. I think Ruby&#8217;s standard library will take care of most of what I need, and there seems to be a daemonization option out there. If I ultimately feel like Ruby will be the better option I&#8217;ll switch the backend over to the Ruby version.</p>
<p>Any Ruby resources you all can recommend?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mesosynoptic.com/2010/04/14/ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backend language</title>
		<link>http://blog.mesosynoptic.com/2010/04/13/backend-language/</link>
		<comments>http://blog.mesosynoptic.com/2010/04/13/backend-language/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 03:18:54 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[WeatherMan]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[planning]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.mesosynoptic.com/?p=21</guid>
		<description><![CDATA[So, I wrote a decent backend in Java for WeatherMan last year. While the majority of my frontend code can be preserved, the backend is going to need a lot of work, for several reasons: There was a nasty infinite loop somewhere in the code that I was unable to nail down the root cause [...]]]></description>
			<content:encoded><![CDATA[<p>So, I wrote a decent backend in Java for WeatherMan last year. While the majority of my frontend code can be preserved, the backend is going to need a lot of work, for several reasons:</p>
<ul>
<li>There was a nasty infinite loop somewhere in the code that I was unable to nail down the root cause of; some condition in the WeatherWire parser was causing the issue</li>
<li>I need to write a truly secure communications channel between phone and server; location information is stored and transmitted, and I want to make sure that is secure. Last year I was using a hashed and salted device token to authenticate with the server. However, the communications channel itself was unencrypted, and this required that the device send a token received from the APNS server, which is something I&#8217;d like to avoid doing.</li>
<li>The backend was never really set up as a daemon; start/stop was manual and there was no external control.</li>
</ul>
<p>Because of the significant rewrites required, I&#8217;m probably going to end up breaking the whole thing down, reusing the code that works, but rethinking the architecture. This got me thinking&#8211;is Java really the best language to use for this?</p>
<p>Here is what the backend must do:</p>
<ul>
<li>Keep a consistent connection via telnet to the WeatherWire server to pull down weather alerts</li>
<li>Parse the data coming into the telnet connection to decide what is an alert and what isn&#8217;t, and to break the alert down into an object that can be stored in the database</li>
<li>Keep records of all devices using the software and the locations they have requested to receive alerts for</li>
<li>Each time an alert comes in, find the location of that alert, match it to the device database, and send an APNS notification to each device that wants to receive alerts for that location</li>
<li>Connect to the NWS FTP servers to download data on-demand</li>
<li>Act as a cache for on-demand information (forecasts, radar images) to reduce loads on the NWS servers</li>
<li>Insert and retrieve all of this data from a MySQL database</li>
<li>Expose an HTTP server over an SSL/TLS connection that will take POST requests for data and return JSON datasets (there shouldn&#8217;t be any actual binary data required, as even the radar imagery will be in a KML format that is parsed on the device)</li>
</ul>
<p>So basically, whatever language is used needs to have good networking libraries and good text/string processing capabilities, and needs to be fast enough to process the WeatherWire data in realtime (there can be quite a bit of it). Also, the backend must be able to run on a Linux server, which immediately counts out Objective-C/Cocoa and .NET for the backend. Here is the list of languages that I&#8217;m considering, and what I feel the pros and cons are. Any comments would be appreciated.</p>
<ul>
<li><strong>Java.</strong> Via the String class, Java has strong enough text-processing capability to meet my needs. Also, it has a large amount of open-source libraries available; I made extensive use of the Apache Commons libraries in the original version to implement telnet and FTP connections, and used the embeddable Jetty webserver to have a lightweight HTTP server to handle the JSON requests. Plus, while the JVM isn&#8217;t as fast as native code, it is generally going to be faster than an interpreter.</li>
<li><strong>C/C++.</strong> C is a little lower-level than I&#8217;d like to use for this application; being able to take advantage of class libraries that will handle the finer points of network connections and string processing is something I would miss dearly. This option would definitely win on speed, however the learning curve and heightened security risks make me wary.</li>
<li><strong>PHP.</strong> PHP would be the clear winner (at least in my experience) for the text processing and HTTP responses. However, the interpreted nature could cause slowdowns, and while I&#8217;ve seen a lot more non-Web platform PHP use recently, I&#8217;m not sure if the tools are all there (anybody ever seen a Telnet library written in PHP?). Plus, can it be easily daemonized?</li>
<li><strong>Python.</strong> I have no experience with Python, but I do know it has a fairly extensive standard library and a lot of developer support. The interpreted nature and potential difficulty daemonizing are a couple of potential pitfalls.</li>
<li><strong>Ruby. </strong>Another language with fairly extensive developer support that I do not have any experience with. Again with the interpreted nature and daemonization, though based on the Rails framework I could see some ease with the server portions of this.</li>
<li><strong>Go. </strong>Google&#8217;s Go intrigues me as a language. It seems to me that it would offer a lot of the benefits of C/C++ without a lot of the pitfalls (namely direct memory access). The newness of it is a turn-off though&#8211;specifically, there is no native connector for MySQL.</li>
</ul>
<p>If you have any thoughts or insights I&#8217;d love to hear them. I&#8217;m up for learning something new if it will meet my needs in a better way than Java currently is.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mesosynoptic.com/2010/04/13/backend-language/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WeatherMan is still coming.</title>
		<link>http://blog.mesosynoptic.com/2010/04/13/weatherman-is-still-coming/</link>
		<comments>http://blog.mesosynoptic.com/2010/04/13/weatherman-is-still-coming/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 01:54:26 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[WeatherMan]]></category>
		<category><![CDATA[iPhone OS 4]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[radar]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.mesosynoptic.com/?p=8</guid>
		<description><![CDATA[Development activity dropped off last year due to a couple of factors out of my control: Approval by the Ethics and Compliance office of my full-time employer took nearly six months; The mapping API built into iPhone OS 3.0 does not support overlays in any way, shape, or form, which leads into I have a [...]]]></description>
			<content:encoded><![CDATA[<p>Development activity dropped off last year due to a couple of factors out of my control:</p>
<ol>
<li>Approval by the Ethics and Compliance office of my full-time employer took nearly six months;</li>
<li>The mapping API built into iPhone OS 3.0 does not support overlays in any way, shape, or form, which leads into</li>
<li>I have a full-time job. Between the requirements (read number 1) and the lack of time to code my own map solution for radar (read number 2) it seemed pretty silly to continue dumping time into a project that at that point seemed like it may never see the light of day.</li>
</ol>
<p>Number one on that list is being worked out. Number two&#8230; I can&#8217;t talk about. And number 3, while it still exists, is about to become less of a factor as I&#8217;ll be shifting into a 4-10s schedule, giving me an extra free day each week, as well as the work being somewhat less mentally exhausting (anybody that&#8217;s ever done customer-facing technical support knows exactly what I&#8217;m talking about).</p>
<p>As I did previously, I plan keeping tabs of my development here for anybody that&#8217;s interested to follow. I will not be starting from the ground up; I have a lot of good code in what I&#8217;ve already worked on, which I plan on cherry-picking and utilizing as I rewrite the parts that I feel did not work as well as they could have.</p>
<p>In case you couldn&#8217;t tell, the release target OS for the app is iPhone OS 4. Unfortunately, the developer NDA prevents me from saying anything that hasn&#8217;t already been publicly stated, but I can give you a little teaser from what -HAS- been shown:</p>
<p style="text-align: center;"><a href="http://blog.mesosynoptic.com/wp-content/uploads/2010/04/iphone-os-4-0109-rm-eng.jpg"><img class="aligncenter size-full wp-image-10" title="iphone-presentation-map-overlay" src="http://blog.mesosynoptic.com/wp-content/uploads/2010/04/iphone-os-4-0109-rm-eng.jpg" alt="iPhone OS 4 presentation: map overlays" width="450" height="299" /></a>(Image lovingly ripped from Engadget)</p>
<p style="text-align: left;">I&#8217;m looking forward to making some progress on this application this summer, and I hope you all enjoy the ride as I think out loud on this blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mesosynoptic.com/2010/04/13/weatherman-is-still-coming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->