<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>DDD on sysarcher/@ich_code</title><link>https://sysarcher.github.io/categories/ddd/</link><description>Recent content in DDD on sysarcher/@ich_code</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 14 Oct 2019 21:22:37 +0200</lastBuildDate><atom:link href="https://sysarcher.github.io/categories/ddd/index.xml" rel="self" type="application/rss+xml"/><item><title>Getting Started with Clojure[script] Behind Corporate Proxy</title><link>https://sysarcher.github.io/posts/java-proxies/</link><pubDate>Mon, 14 Oct 2019 21:22:37 +0200</pubDate><guid>https://sysarcher.github.io/posts/java-proxies/</guid><description>&lt;p&gt;So on my Clojurescript journey, the first roadblock I hit was corporate proxy. I don&amp;rsquo;t know why Java, maven, clojure (everybody?) doesn&amp;rsquo;t respect the environment variables but this is a real pain.&lt;/p&gt;
&lt;h3 id="getting-started"&gt;Getting started&lt;/h3&gt;
&lt;p&gt;Clojurescript is written in Clojure which requires Java. So we need to get all three up and running.&lt;/p&gt;
&lt;h4 id="java"&gt;Java&lt;/h4&gt;
&lt;p&gt;To get Java JDK and JRE, run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ sudo apt install openjdk-11-jre
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ sudo apt install openjdk-11-jdk
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For proxy settings, edit &lt;code&gt;/etc/java-11-openjdk/net.properties&lt;/code&gt;.&lt;/p&gt;</description><content:encoded><![CDATA[<p>So on my Clojurescript journey, the first roadblock I hit was corporate proxy. I don&rsquo;t know why Java, maven, clojure (everybody?) doesn&rsquo;t respect the environment variables but this is a real pain.</p>
<h3 id="getting-started">Getting started</h3>
<p>Clojurescript is written in Clojure which requires Java. So we need to get all three up and running.</p>
<h4 id="java">Java</h4>
<p>To get Java JDK and JRE, run:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ sudo apt install openjdk-11-jre
</span></span><span style="display:flex;"><span>$ sudo apt install openjdk-11-jdk
</span></span></code></pre></div><p>For proxy settings, edit <code>/etc/java-11-openjdk/net.properties</code>.</p>
<p>Example for <code>http</code> proxy in the file:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#a6e22e">http.proxyHost</span><span style="color:#f92672">=</span><span style="color:#e6db74">&#34;proxy-addr.company.com&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">http.proxyPort</span><span style="color:#f92672">=</span><span style="color:#e6db74">8080</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">http.nonProxyHosts</span><span style="color:#f92672">=</span><span style="color:#e6db74">localhost|127.*|[::1]</span>
</span></span></code></pre></div><h4 id="maven">Maven</h4>
<p>This was the hardest to figure out. And it&rsquo;s crazy (coming from a newbie perspective) that maven doesn&rsquo;t make it easy to just reuse Java or System proxies or respect the <code>http_proxy</code> variable. Madness. Moreover, you <em>need</em> to create the configuration file at <code>~/.m2/settings.xml</code> with the following contents:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-xml" data-lang="xml"><span style="display:flex;"><span><span style="color:#f92672">&lt;settings&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">&lt;proxies&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;proxy&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;id&gt;</span>httpproxy<span style="color:#f92672">&lt;/id&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;active&gt;</span>true<span style="color:#f92672">&lt;/active&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;protocol&gt;</span>http<span style="color:#f92672">&lt;/protocol&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;host&gt;</span>proxy-addr.company.com<span style="color:#f92672">&lt;/host&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;port&gt;</span>8080<span style="color:#f92672">&lt;/port&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;nonProxyHosts&gt;</span>local.net|some.host.com<span style="color:#f92672">&lt;/nonProxyHosts&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;/proxy&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;proxy&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;id&gt;</span>httpsproxy<span style="color:#f92672">&lt;/id&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;active&gt;</span>true<span style="color:#f92672">&lt;/active&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;protocol&gt;</span>https<span style="color:#f92672">&lt;/protocol&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;host&gt;</span>proxy-addr.company.com<span style="color:#f92672">&lt;/host&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;port&gt;</span>8080<span style="color:#f92672">&lt;/port&gt;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#f92672">&lt;nonProxyHosts&gt;</span>local.net|some.host.com<span style="color:#f92672">&lt;/nonProxyHosts&gt;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&lt;/proxy&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">&lt;/proxies&gt;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">&lt;/settings&gt;</span>
</span></span></code></pre></div><h4 id="clojure">Clojure</h4>
<p><em>make sure <code>rlwrap</code> is installed (<code>sudo apt install rlwrap</code>)</em></p>
<p>Download and install clojure using the following commands:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ curl -O https://download.clojure.org/install/linux-install-1.10.1.469.sh  <span style="color:#75715e"># This is the current version as of writing</span>
</span></span><span style="display:flex;"><span>$ chmod +x linux-install-1.10.1.469.sh
</span></span><span style="display:flex;"><span>$ sudo ./linux-install-1.10.1.469.sh
</span></span></code></pre></div><p>Using the command <code>clj</code> launches the repl. Thankfully!</p>
<h4 id="leiningen">Leiningen</h4>
<p>Follow the steps on <a href="https://leiningen.org/">https://leiningen.org/</a></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>curl -O &#34;https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein&#34;
</span></span><span style="display:flex;"><span>chmod a+x lein
</span></span><span style="display:flex;"><span>mv lein ~/bin/
</span></span></code></pre></div><h3 id="create-a-test-project">Create a Test Project</h3>
<p>To test <code>lein</code> and <code>figwheel</code>+<code>reagent</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ lein new figwheel some-name -- --reagent
</span></span></code></pre></div>]]></content:encoded></item><item><title>Evolutionary Architecture</title><link>https://sysarcher.github.io/posts/evolutionary-architecture/</link><pubDate>Sun, 22 Sep 2019 21:22:37 +0200</pubDate><guid>https://sysarcher.github.io/posts/evolutionary-architecture/</guid><description>&lt;p&gt;Evolvability of Architectural Styles&amp;hellip;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Big ball of mud&lt;/li&gt;
&lt;li&gt;Monoliths&lt;/li&gt;
&lt;li&gt;Event-driven architectures&lt;/li&gt;
&lt;li&gt;Service-oriented architectures (SOA)&lt;/li&gt;
&lt;li&gt;Serverless&lt;/li&gt;
&lt;/ul&gt;</description><content:encoded><![CDATA[<p>Evolvability of Architectural Styles&hellip;</p>
<ul>
<li>Big ball of mud</li>
<li>Monoliths</li>
<li>Event-driven architectures</li>
<li>Service-oriented architectures (SOA)</li>
<li>Serverless</li>
</ul>
]]></content:encoded></item></channel></rss>