<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Mergate Software Blog</title>
  <link href="http://mergate.com/atom.xml" rel="self" />
  <link href="http://mergate.com" />
  <updated>2010-04-26T21:55:34-04:00</updated>
  <id>http://mergate.com</id>
  <author>
    <name>Hugh Watkins</name>
    <email>hwatkins@mergate.com</email>
  </author>
  <entry>
    <title>HTTP Live Streaming</title>
    <link href="http://mergate.com/blog/2010/04/18/http-live-streaming" />
    <updated>2010-04-18T00:00:00-04:00</updated>
    <id>http://mergate.com/blog/2010/04/18/http-live-streaming</id>
    <content type="html">
      &lt;h4&gt;HTTP Live Streaming&lt;/h4&gt;
      
      &lt;p&gt;HTTP Live Streaming is a standard implemented Apple, to support streaming of video on the iPhone, iPad and iPod touch.  Apple has submitted the specification to the IETF as &lt;a href=&quot;http://tools.ietf.org/html/draft-pantos-http-live-streaming&quot;&gt;IETF Internet-Draft of the HTTP Live Streaming specification&lt;/a&gt;.&lt;/p&gt;
      
      &lt;p&gt;HTTP Live Streaming competes with the current incumbent, &lt;a href=&quot;http://www.adobe.com/devnet/rtmp/&quot;&gt;RTMP&lt;/a&gt;, Real-Time Messaging Protocol from Adobe.  While recently Adobe has published the standard for RTMP, it has been proprietary for years but had been reverse engineered by several groups including the &lt;a href=&quot;http://www.osflash.org/red5&quot;&gt;Red5&lt;/a&gt; server.  RTMP requires the Adobe Flash Player on the client, which has a reputation as being buggy on many platforms causing high cpu usage and fast battery drain.  Apple has not included support for Adobe Flash on their mobile platforms.&lt;/p&gt;
      
      &lt;h4&gt;HTML5&lt;/h4&gt;
      
      &lt;p&gt;The server side of video delivery is only part of the story, the other piece is the client, which until now has primarily been the Adobe Flash Player.  Video delivery over the Internet is finally becoming a first class citizen with the introduction of &lt;a href=&quot;http://diveintohtml5.org/video.html&quot;&gt;HTML5&lt;/a&gt;.  HTML5 defines a standard way to embed video in a web page, using a  &lt;video&gt; element.  Apple Safari, which is the native browser on Apple&#8217;s mobile devices, provides Video playback through the HTML5 Video element.  This native support allows the browser to optimize the Video Decoder for the platform being used, this can include offloading video decoding to specialized video chips such as Nvidia, reducing the CPU load on the main processor.  This should result in full definition 1080P HD content playback right from the browser.  There is no way at present for the video to be shown fullscreen, since it&#8217;s inside the browser and not running as a plugin like the flash player.&lt;/p&gt;
      
      &lt;p&gt;HTTP Live streaming has many advantages over RTMP, the main one being that it&#8217;s a pure HTTP solution so common HTTP servers can be used to deliver Video.  This also means that streaming is automatically supported by nearly all edge servers, media distributors, caching systems, routers, and firewalls.  Many internal networks are behind firewalls and proxies that could interfere with video delivery using different protocols, these devices do not cause a problem with HTTP Live streaming.&lt;/p&gt;
      
      &lt;p&gt;HTTP Live streaming has support for multiple bit rate encoding, also know as adaptive streaming.  This helps when the throughput of downstream client is not known, so faster clients can get high quality, high bit rate encoding but a slower client can get a lower quality, lower bit rate encoding.  Over the open Internet or mobile network this is the only way to reliably deliver a live stream.  There is also support for Encryption using AES-128, with key management over HTTPS and session-based authentication.&lt;/p&gt;
      
      &lt;h4&gt;Encoding&lt;/h4&gt;
      
      &lt;p&gt;The media encoder takes a real-time signal from an audio-video device, encodes the media in h.264, and encapsulates it for transport. Encoding should be set to a format supported by the client device, such as H.264 video and HE-AAC audio. Currently, the supported delivery format is MPEG-2 Transport Streams for audio-video.&lt;/p&gt;
      
      &lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/MPEG_transport_stream&quot;&gt;MPEG-2 transport streams&lt;/a&gt; should not be confused with MPEG-2 video compression, MPEG-2 transport streams is the container format and is the standard for ATSC broadcast delivery and can be used with a number of different compression formats. Only MPEG-2 transport streams with H.264 video and AAC audio are supported at this time for audio-video content.&lt;/p&gt;
      
      &lt;p&gt;The file is then cut into segments using a segmenter program, the size of the segments are determined by the duration and bit rate, a typical duration is 10 seconds.  The segmenter also creates an index file containing references to the individual media files. Each time the segmenter completes a new media file, the index file is updated. The index is used to track the availability and location of the media files.  The media files are stored as &lt;em&gt;.ts&lt;/em&gt; files and index files are saved as &lt;em&gt;.M3U8&lt;/em&gt; files, an extension of the &lt;em&gt;.m3u&lt;/em&gt; format used for MP3 playlists.&lt;/p&gt;
      
      &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
      
      
      &lt;p&gt;&lt;img src=&quot;http://mergate.com/images/transport_stream.jpg&quot; alt=&quot;Encoding&quot; /&gt;&lt;/p&gt;
      
      &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
      
      
      &lt;p&gt;I think the time is right for a new standard to emerge in the live video streaming space and I believe this is it. With the momentum of the iPhone, Apple carries a lot of weight in this space, and developers want easy standards based solutions, HTTP Live streaming wins on both accounts.  RTMP had it&#8217;s day, but it&#8217;s hard to implement and was really designed for a different era, one in which multiplexing information across one socket was needed.  This is not the case anymore, even inside a browser window there can be many events going on, with Javascript coordinating the information flow.  HTML5 provides a general purpose &lt;a href=&quot;http://dev.w3.org/html5/websockets/&quot;&gt;websocket&lt;/a&gt; interface which defines a full-duplex communications channel that operates over a single socket and is exposed via a JavaScript interface.  Between these HTML5 Video and HTML5 websocket the functionality that RTMP provided is no longer needed,&lt;/p&gt;
      
      &lt;p&gt;There are still issues to overcome, for one this is an Apple standard and is not supported by other browsers except Safari.  There are issues in general around the Video player in HTML5 because different browsers support different encoding formats and containers.  While h.264 is recognized as a great encoding format, there are licensing issues around the technology so open technologies like Theora video, which is free, were introduced.  There are other formats like &lt;a href=&quot;http://diracvideo.org/&quot;&gt;Dirac&lt;/a&gt; for video encoding and &lt;a href=&quot;http://www.matroska.org/&quot;&gt;Matroska-MKV&lt;/a&gt; as a container, that are gaining ground.  In the end once a Open Source, license free video encoding and container format are agreed upon the industry will move towards that.  The licensing corporation around h.264 may realize that and come up with a solution, but they have a built in monopoly with OTA and other broadcast uses.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title>Document Oriented Database Schema Design</title>
    <link href="http://mergate.com/blog/2010/03/31/document-oriented-database-schema" />
    <updated>2010-03-31T00:00:00-04:00</updated>
    <id>http://mergate.com/blog/2010/03/31/document-oriented-database-schema</id>
    <content type="html">
      &lt;p&gt;Interest in &lt;a href=&quot;http://en.wikipedia.org/wiki/NoSQL&quot;&gt;NoSQL&lt;/a&gt; is on the rise and for good reason, traditional RDBMS systems have many strengths like ACID guarantees but they also have many weaknesses.  The most associated trait of the NoSQL movement is the ability to scale writes and to a lesser extent reads (master/slave replication on RDBMS can handle high read requirements to a large extent).  One of the often overlooked aspects in NoSQL is how well data maps into a non-relational store, but that is what I want to cover today.&lt;/p&gt;
      
      &lt;p&gt;In relational database design &lt;a href=&quot;http://en.wikipedia.org/wiki/Database_normalization&quot;&gt;Database normalization&lt;/a&gt; is the recognized approach for schema design.  A crude synopsis of Database normalization, is don&#8217;t replicate data.  For example if you were designing a names and addresses, a fully normalized design would look something like this:&lt;/p&gt;
      
      &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
      
      
      &lt;p&gt;&lt;img src=&quot;http://mergate.com/images/schema_design1.png&quot; alt=&quot;RDBMS Schema Design&quot; /&gt;&lt;/p&gt;
      
      &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
      
      
      &lt;p&gt;This will give you the data consistency you are looking for, so when &lt;a href=&quot;http://www.techeye.net/business/city-changes-its-name-to-google&quot;&gt;Topeka changes it&#8217;s name to Google&lt;/a&gt; you are only updating one record. In the real world cities and states do not change their names very often, and a 4 table join to get the full contact information would have performance problems, so a selective &lt;a href=&quot;http://en.wikipedia.org/wiki/Denormalization&quot;&gt;Denormalization&lt;/a&gt; step would occur.  The resulting database schema would look like this:&lt;/p&gt;
      
      &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
      
      
      &lt;p&gt;&lt;img align=center src=&quot;http://mergate.com/images/schema_design2.png&quot; alt=&quot;Schema after Denormalization&quot; /&gt;&lt;/p&gt;
      
      &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
      
      
      &lt;p&gt;With a Document Oriented Database like &lt;a href=&quot;http://www.mongodb.org/&quot;&gt;MongoDB&lt;/a&gt; the Denormalization process would even go further and the address records would get embedded into the Person, resulting in one document.  In order to show this concept more clearly, I will use the &lt;a href=&quot;http://mongoid.org/&quot;&gt;mongoid gem&lt;/a&gt; for ruby to create a Person and Address class.  I then setup the associations using the has_many and belongs_to macros.&lt;/p&gt;
      
      &lt;div class=&quot;code_window&quot;&gt;
      &lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;rubygems&#39;&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;mongoid&#39;&lt;/span&gt;
      
      &lt;span class=&quot;no&quot;&gt;Mongoid&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;configure&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;contacts&#39;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;host&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;192.168.1.19&#39;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;master&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Mongo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Connection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;27017&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
      
      &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Person&lt;/span&gt;
        &lt;span class=&quot;kp&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Mongoid&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Document&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:first_name&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:last_name&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;has_many&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:addresses&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
      
      &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Address&lt;/span&gt;
        &lt;span class=&quot;kp&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Mongoid&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Document&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:street_number&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:street_name1&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:street_name2&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:city&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;field&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:state&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;belongs_to&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:person&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:inverse_of&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:addresses&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
      
      &lt;span class=&quot;n&quot;&gt;person&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Person&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:first_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Walt&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:last_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Disney&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;person&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addresses&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&lt;&lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Address&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:street_name1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;P.O. Box 10000&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:city&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;Lake Buena Vista&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;FL&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;person&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addresses&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&lt;&lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Address&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:street_name1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;P.O. Box 10040&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:city&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;Lake Buena Vista&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:state&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&#39;FL&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;person&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;save&lt;/span&gt;
      &lt;/pre&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      
      
      &lt;p&gt;Once you run this program the resulting document is shown below.&lt;/p&gt;
      
      &lt;div class=&quot;code_window&quot;&gt;
      &lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;  &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;_id&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;4bb333c44954b30ff6000001&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;first_name&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Walt&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;last_name&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Disney&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;_type&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Person&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;addresses&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;street_name1&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;P.O. Box 10000&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;city&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Lake Buena Vista&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;state&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;FL&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;_id&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;4bb333c44954b30ff6000002&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;_type&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Address&quot;&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;street_name1&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;P.O. Box 10040&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;city&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Lake Buena Vista&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;state&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;FL&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;_id&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;4bb333c44954b30ff6000003&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
              &lt;span class=&quot;s2&quot;&gt;&quot;_type&quot;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Address&quot;&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;/pre&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      
      
      &lt;p&gt;In many ways this is the feature of a NoSQL database that is most appreciated, the ability to more accurately represent real world data relationships in a natural manner.  I would recommend you look at MongoDB, if you have similar data models.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title>Solaris Truss</title>
    <link href="http://mergate.com/blog/2009/10/13/solaris-truss" />
    <updated>2009-10-13T00:00:00-04:00</updated>
    <id>http://mergate.com/blog/2009/10/13/solaris-truss</id>
    <content type="html">
      &lt;p&gt;In Sun Solaris there is an incredibly useful command for tracking down low level issues, the command is called truss.  truss allows you to trace system calls and signals, this means you can watch a compiled program including the Java JVM while it makes system calls.&lt;/p&gt;
      
      &lt;p&gt;For example while trouble shooting a  JReports reporting issue, all I had to go on was this exception message.&lt;/p&gt;
      
      &lt;p&gt;&lt;img align=&quot;left&quot; src=&quot;http://mergate.com/images/jreports.jpg&quot; alt=&quot;JReports connection error&quot; width=&quot;680&quot; height=&quot;603&quot;/&gt;&lt;/p&gt;
      
      &lt;p&gt;I can tell based on the stack trace that it was trying to make a socket connection that failed, but unfortunately that is not a lot to go on.  So I used the truss command with the following options, -t tells it which system calls to follow (I was only interested in connect since that is whats failing), the -v and -x allows me to see all the arguments getting passed to these system calls.  The -p tell it which pid to watch and 4079 happened to be the pid of the Glassfish instance running JReports&lt;/p&gt;
      
      &lt;div class=&quot;code_window&quot;&gt;
      &lt;pre&gt;
      #truss -t connect -v connect -x connect -fp 4079
      4079/85485:     connect(367, 0xA977CDC8, 16, SOV_DEFAULT)       Err#146 ECONNREFUSED
      4079/85485:             AF_INET  name = 127.0.0.1  port = 80
      &lt;/pre&gt;
      &lt;/div&gt;
      
      
      &lt;p&gt;This tells me that JReports was trying to connect to localhost(127.0.0.1) on port 80, which is a problem since I have the reports server bound to a specific interface not all interfaces. Now I at least know the problem and can work on a solution thanks to truss.&lt;/p&gt;
      
      &lt;p&gt;If you are using Linux then check out strace.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title>Ruby Book I would like to see</title>
    <link href="http://mergate.com/blog/2009/10/08/ruby-book" />
    <updated>2009-10-08T00:00:00-04:00</updated>
    <id>http://mergate.com/blog/2009/10/08/ruby-book</id>
    <content type="html">
      &lt;p&gt;I follow &lt;a href=&quot;http://rubybestpractices.com/&quot;&gt;Ruby Best Practices&lt;/a&gt; on &lt;a href=&quot;http://twitter.com/rubypractices&quot;&gt;twitter&lt;/a&gt; and he asked for feedback on Ruby in the Enterprise Book he was thinking of writing. I really like the concept, but gave him the following feedback.&lt;/p&gt;
      
      &lt;p&gt;Where would the target audience becoming from?&lt;/p&gt;
      
      &lt;p&gt;I assume primarily Java or .NET I&#39;m not qualified for .NET, but most the questions I get when you mention using Ruby (primarily Rails) instead of Java (J2EE) is they equate that to the View Layer, not the model and controller part. So I would pick a sample application that would really show the entire stack.&lt;/p&gt;
      
      &lt;p&gt;Here would be some ideas:&lt;/p&gt;
      
      &lt;p&gt;Large Retailer: System allows customers to be notified when product X is back in stock at their local store. The Ruby system must be able to talk back with Mainframe for order shipments and a J2EE application for pricing and customer records. In this case the only model is the “in stock request” the login information for the customer may or may not reside in the Ruby system&lt;/p&gt;
      
      &lt;p&gt;Airline: System to send SMS messages about Flight Delays based on Frequent Flyer information. Assume the airlines current Web interface will be where the customer enables this, so there is no user focused View layer instead it’s primarily a web interface that gets toggled for a particular customer. The phone number is stored in the Ruby Model, but the rest of the information about a customer is in Mainframe for flight information and database (Terradata) for other Frequent Flyer information.&lt;/p&gt;
      
      &lt;p&gt;Electric Power Company: System to dispatch work crews based on trouble calls. System should provide Web interface, SMS interface and integrate with Voice Response system to allow customers to report electric outage, (using phone number, customer id, street address, ect). System integrates with Mainframe for billing information and proprietary UNIX application for power line layout (GIS) information. The power line layout application is used to pinpoint problem location based on aggregate trouble reports.&lt;/p&gt;
      
      &lt;p&gt;Gas Company: System to monitor gas pressure across footprint based on network of sensors using cellular communications as the backchannel. Sensors are used to detect leaks. System communicates with proprietary VAX application to close certain vales in the event of leak.&lt;/p&gt;
      
      &lt;p&gt;These are just samples to show a real world integration effort between the various types of systems that a “Enterprise Company” would have. The segmentation of data is also important, when do you need to replicate and when can you just use the other systems data. How does data change notification work (triggers, polling, etc)&lt;/p&gt;
      
      &lt;p&gt;I think the other big topic would be how do you deploy a Ruby application Network, Hardware, etc.&lt;/p&gt;
      
      &lt;p&gt;Focus would be:&lt;/p&gt;
      
      &lt;ul&gt;
      &lt;li&gt;Linux/UNIX&lt;/li&gt;
      &lt;li&gt;HAProxy, Keepalived (or other VRRP solution) for HA&lt;/li&gt;
      &lt;li&gt;Nginx or Apache and Mongrel, Phusion, Unicorn, etc&lt;/li&gt;
      &lt;li&gt;Capistrano Chef or Puppet&lt;/li&gt;
      &lt;li&gt;JRuby/Glassfish if you want to go there&lt;/li&gt;
      &lt;li&gt;DB: Mysql, Postgres, Oracle, etc (possibly include a Key/Value store like MongoDB or CouchDB if the problem domain fits)&lt;/li&gt;
      &lt;/ul&gt;
      
      
      &lt;p&gt;The thing here is that most &#34;enterprise&#34; developers are not concerned with the deployment environment because there is a DBA Group, a Sys Admin Group, possibly a Hardware Group, A network group, etc that handles the deployment. The developer produces a WAR file and a set of instructions, the rest is done by someone else. To pitch a Ruby project they are going to have to be more knowledgeable on a typical deployment architecture.&lt;/p&gt;
      
      &lt;p&gt;One of the things I have run into as a developer is that Ruby still does not have the depth of libraries of Python and I have to go back to using python for some stuff. Notable examples are Telcos which use Corba and Sun RPC (ONC-RPC) in their network, both of these are weak or non-existent in Ruby but available in Python (or Java)&lt;/p&gt;
      
      &lt;p&gt;One other thing that may be nice is to highlight good uses of Ruby in the Enterprise vs poor choices, although the lines get blurry&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title>Rails Model Annotation</title>
    <link href="http://mergate.com/blog/2009/01/30/rails-model-annotation" />
    <updated>2009-01-30T00:00:00-05:00</updated>
    <id>http://mergate.com/blog/2009/01/30/rails-model-annotation</id>
    <content type="html">
      &lt;p&gt;One of the things I like about datamapper over activerecord is that all the attributes of the model are listed in the model itself. I found something today that can help to bridge that gap in a small way.&lt;/p&gt;
      
      &lt;p&gt;Have a look at &lt;a href=&quot;http://github.com/ctran/annotate_models&quot;&gt;annotate-models&lt;/a&gt; you can install it as a gem&lt;/p&gt;
      
      &lt;p&gt;gem install annotate-models&lt;/p&gt;
      
      &lt;p&gt;Then go into your project directory and run annotate, you will then have something like this at the top of each model.&lt;/p&gt;
      
      &lt;div class=&quot;code_window&quot;&gt;
      &lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;# == Schema Information&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;# Schema version: 20090130210328&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;# Table name: profiles&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  id               :integer(4)      not null, primary key&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  user_id          :integer(4)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  first_name       :string(255)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  last_name        :string(255)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  website          :string(255)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  blog             :string(255)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  flickr           :string(255)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  about_me         :text&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  location         :string(255)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  is_active        :boolean(1)&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  last_activity_at :datetime&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  created_at       :datetime&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#  updated_at       :datetime&lt;/span&gt;
      &lt;span class=&quot;c1&quot;&gt;#&lt;/span&gt;
      &lt;/pre&gt;
      &lt;/div&gt;
      &lt;/div&gt;
    </content>
  </entry>
  <entry>
    <title>Github from behind a firewall</title>
    <link href="http://mergate.com/blog/2008/10/10/github-behind-firewall" />
    <updated>2008-10-10T00:00:00-04:00</updated>
    <id>http://mergate.com/blog/2008/10/10/github-behind-firewall</id>
    <content type="html">
      &lt;p&gt;If you are like me you are slowly using github more and more, as some of the top upcoming frameworks like Merb and Rails are being hosted there.&lt;/p&gt;
      
      &lt;p&gt;If you are behind a firewall at work, you might not be able to clone a repository because the port used for the git protocol is 9418, so issuing a &#8220;git clone&#8221; command will timeout. You can change the protocol to http, so instead of git clone git://github.com/path/to/repo you would do git clone http://github.com/path/to/rep, sounds easy enough but it&#8217;s slower when it works and many times it will not work. I have gotten output like this:&lt;/p&gt;
      
      &lt;div class=&quot;code_window&quot;&gt;
      &lt;pre&gt;
      walk 2707ebbbc5837619dcc51af43db18ac31380c4a5
      walk 743917a6de6464dd2fa5e064f1881adba218cae6
      walk 2a348104ddb2c1b2090a8ca80d21258846afd250
      walk 8a9cbc1af1343bfd32ea4b473341dff364b67353
      walk 1bc43720343856280ad6801562f75b3239ca4ce2
      walk e9ea1557e703f2f238192d72bd2714b0af425b7c
      walk fbc886b9adecad2e6e9c9a13f67349cd21c01ffa
      walk c4dc40df63fc5cebd2f3b2cceb7c8ea20ac86776
      walk 64db048595a07b70057b98731d6e957406bca913
      walk 012e0629863b3ce4b98c7eebb3f5ef4ed6d7b1e8
      walk 109ec6b85d66f959a83048af9e173f612b1d4009
      Getting alternates list for http://github.com/sam/extlib.git
      Getting pack list for http://github.com/sam/extlib.git
      error: Unable to find abb467803fa74dfdc3740f31b4fde5544e6a4100 under http://github.com/sam/extlib.git
      Cannot obtain needed tree abb467803fa74dfdc3740f31b4fde5544e6a4100
      while processing commit 109ec6b85d66f959a83048af9e173f612b1d4009.
      fatal: Fetch failed.
      &lt;/pre&gt;
      &lt;/div&gt;
      
      
      &lt;p&gt;I assume this is fetching each commit and processing it, but has problems&lt;/p&gt;
      
      &lt;p&gt;&lt;strong&gt;SSH Tunnel Solution&lt;/strong&gt;&lt;/p&gt;
      
      &lt;p&gt;The solution is pretty simple if you have ssh access outbound from work to a machine that is not fire walled. You would setup a ssh tunnel with the following command ssh -L 9418:github.com:9418 (username)@(machine.domain) Then your clone command would be changed to git clone git://localhost/path/to/repo&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title>Ruby on Rails content_for</title>
    <link href="http://mergate.com/blog/2008/04/24/ruby-on-rails-content_for" />
    <updated>2008-04-24T00:00:00-04:00</updated>
    <id>http://mergate.com/blog/2008/04/24/ruby-on-rails-content_for</id>
    <content type="html">
      &lt;p&gt;One of the mantras in the Rails community is DRY (Don&#8217;t repeat Yourself), this is nothing new if your a software developer you should always look for ways to refactor your code to avoid copy and paste. Trying to maintain code with logic that has been copied and pasted to different locations is a nightmare, and one that unfortunately most of us have been exposed too.&lt;/p&gt;
      
      &lt;p&gt;In Rails the view part of MVC is handled by ActionView and the default templates are ERb. The views are further broken down into layouts and views. Layouts are called first for each controller then the view corresponding to the action. For the most part the layout is going to contain header elements for the xml, but what if you need some special javascript in one of you actions but not others.&lt;/p&gt;
      
      &lt;p&gt;You could just add it to the layout and say tough you are going to have the client load it no matter what, besides taking up extra bandwidth this can cause javascript errors for things like Google Maps where there is no associated div.&lt;/p&gt;
      
      &lt;p&gt;Rails gives you a better way though, you can use content_for to specify content associated with a particular yield command. For example if you wanted to use YM4R (Yellow maps 4 Ruby) to helps with your Google Maps mashup project, you could do something like this:&lt;/p&gt;
      
      &lt;p&gt;You would add a yield item to your layout.&lt;/p&gt;
      
      &lt;div class=&quot;code_window&quot;&gt;
      &lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;x&quot;&gt;&lt;head&gt;&lt;/span&gt;
      &lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stylesheet_link_tag&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
      &lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javascript_include_tag&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:defaults&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt; &lt;/span&gt;
      &lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&lt;%=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;javascript_include_tag&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;popup&quot;&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt; &lt;/span&gt;
      &lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&lt;%=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:head&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
      &lt;span class=&quot;x&quot;&gt;&lt;/head&gt;&lt;/span&gt;
      &lt;/pre&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      
      
      &lt;p&gt;Then in you view for the action you want to use the Google Map you would do something like this:&lt;/p&gt;
      
      &lt;div class=&quot;code_window&quot;&gt;
      &lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&lt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;content_for&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:head&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
      &lt;span class=&quot;x&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&lt;%=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;GMap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;header&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
      &lt;span class=&quot;x&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&lt;%=&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_html&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt; &lt;/span&gt;
      &lt;span class=&quot;x&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;&lt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;cp&quot;&gt;%&gt;&lt;/span&gt;&lt;span class=&quot;x&quot;&gt;&lt;/span&gt;
      &lt;/pre&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      
      
      &lt;p&gt;In your controller you need something that actually sets up your map, for example&#8230;&lt;/p&gt;
      
      &lt;div class=&quot;code_window&quot;&gt;
      &lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt; &lt;span class=&quot;vi&quot;&gt;@map&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;GMap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;map_div&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;vi&quot;&gt;@map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;control_init&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:large_map&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:map_type&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;vi&quot;&gt;@map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;center_zoom_init&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;75&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;56&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;vi&quot;&gt;@map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;overlay_init&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;GMarker&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;75&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;42&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;467&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hello&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:info_window&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Info! Info!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
      &lt;/pre&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      
      
      &lt;p&gt;That&#8217;s it, your layout stays DRY and your single view gets the Google Map.&lt;/p&gt;
    </content>
  </entry>
</feed>
