<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David on Medium]]></title>
        <description><![CDATA[Stories by David on Medium]]></description>
        <link>https://medium.com/@lonerdottie?source=rss-2e1a7dd9e7b8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bPgCbXZlOmNP9hvYjxZLzg.jpeg</url>
            <title>Stories by David on Medium</title>
            <link>https://medium.com/@lonerdottie?source=rss-2e1a7dd9e7b8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 03:23:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lonerdottie/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[Weekend Project] MongoDB Database Setup]]></title>
            <link>https://medium.com/@lonerdottie/weekend-project-mongodb-database-setup-95c54ebcd854?source=rss-2e1a7dd9e7b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/95c54ebcd854</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[David]]></dc:creator>
            <pubDate>Sun, 05 Jun 2016 03:49:02 GMT</pubDate>
            <atom:updated>2016-06-05T04:02:21.029Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bPp186l2UNEAfpoU7GNLXA.jpeg" /></figure><p>I began this weekend hoping to finally start working on a bi-directional client/server setup. So far all I have been really doing is writing server software and only recently, with the CSV <a href="https://www.npmjs.com/package/csv-parse">parser</a>/<a href="https://handsontable.com/">spreadsheet</a>, did I setup a client to actually do anything.</p><p>As usual my thoughts first went to a chat app. More and more I think it’d be such a fun and (relatively) simple project to setup a rudimentary <a href="http://www.pocket-lint.com/news/136472-what-is-slack-and-how-does-it-work">Slack</a> clone. Pretty much a glorified <a href="https://en.wikipedia.org/wiki/Internet_Relay_Chat">IRC</a> chat with hashtags and private messages.</p><p>I explored many ways of implementing this. First I thought it’d be smart to use <a href="https://en.wikipedia.org/wiki/XMPP">XMPP</a> for the backbone of the messaging but quickly realized that everything I wanted XMPP to replace would have to be replicated by the server or I’d be doing nothing but designing an XMPP client. Then I decided maybe it’d be better to just design an XMPP gateway later, and instead create a custom server setup now to handle it all in <a href="http://nodejs.org/">Node</a>.</p><p>This led me to have to start thinking about how I would store and save data. One of the drawbacks for XMPP for me was my initial impression that creating this kind of archived chat/IM service was more of a hack and I was pretty confused on how I’d achieve the ability to just load up rooms and save history without crazy server overhead. A database would need to be fast and well supported for use with Node. Obviously <a href="https://www.mongodb.com/">MongoDB</a> showed up <a href="http://mean.io/">over</a> and <a href="https://www.quora.com/What-are-the-advantages-of-developing-with-the-MEAN-stack-mongoDB-Express-js-Angular-js-Node-js">over</a>.</p><p>I decided to give it a try and setup MongoDB on the Pi. Seems I already attempted this once or something because I had to uninstall an existing package. I tried to use this great <a href="http://andyfelong.com/2016/01/mongodb-3-0-9-binaries-for-raspberry-pi-2-jessie/">tutorial</a> by Andy Felong that, while I am sure is helpful to install MongoDB on a fresh install of <a href="https://www.raspbian.org/">Raspbian</a>, was not helpful to me because I quickly realized that something was whack about my environment that caused it to pretty much crap out when following his instructions.</p><p>This ultimately led me to give <a href="https://www.youtube.com/watch?v=pGYAg7TMmp0">Docker</a> a try again. I already use a customized Docker image for my <a href="https://c9.io/">Cloud9</a> implementation (thanks <a href="https://github.com/hwegge2/rpi-cloud9-ide">hwegge2</a>) and somehow managed to get it working perfectly. I had many issues, however, when I tried to setup a <a href="http://www.eclipse.org/che/">Eclipse Che</a> environment on Docker though that probably had a lot to do with the simple fact that I was pretty much diving head first into Docker instead of learning with a more ‘ground up’ approach.</p><p>24 hours later, I finally got a MongoDB image setup that appears to work perfectly and accessible via node and outside of the local network. Fantastic. In the end, I just used the Raspbian library with a simple apt-get install. It was a crash course in learning how to use the <a href="https://docs.docker.com/engine/userguide/containers/dockervolumes/">VOLUME</a> capabilities of Docker, the <a href="https://docs.docker.com/engine/reference/commandline/cli/">command line</a>, and general <a href="https://docs.docker.com/engine/reference/builder/">Dockerfile syntax</a>.</p><p>Feel free to checkout the Dockerfiles I made on my <a href="https://github.com/lonerdottie/rpi-mongodb">GitHub</a> and give it a try yourself. Now to find the energy to actually start working on the server.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95c54ebcd854" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>