<?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>Architecture on sysarcher/@ich_code</title><link>https://sysarcher.github.io/categories/architecture/</link><description>Recent content in Architecture on sysarcher/@ich_code</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 01 Dec 2019 21:22:37 +0200</lastBuildDate><atom:link href="https://sysarcher.github.io/categories/architecture/index.xml" rel="self" type="application/rss+xml"/><item><title>Answering Questions on SPS 2019 Demo</title><link>https://sysarcher.github.io/posts/sps-review/</link><pubDate>Sun, 01 Dec 2019 21:22:37 +0200</pubDate><guid>https://sysarcher.github.io/posts/sps-review/</guid><description>&lt;p&gt;SPS Nuremberg is one of the largest gatherings of the Industry. This year was no different.&lt;/p&gt;
&lt;p&gt;I was part of a team that presented the concept of OT/IT consolidation. I got quite a few comments and questions about the &lt;a href="https://www.facebook.com/ziakhan/videos/10156612828352623/"&gt;demo video (in Urdu here)&lt;/a&gt;. So here&amp;rsquo;s a shot at answering some of the questions I got forwarded:&lt;/p&gt;
&lt;p&gt;The demo was (in oversimplified terms) showing PLC compute moved to software which can be orchestrated using Kubernetes.&lt;/p&gt;</description><content:encoded><![CDATA[<p>SPS Nuremberg is one of the largest gatherings of the Industry. This year was no different.</p>
<p>I was part of a team that presented the concept of OT/IT consolidation. I got quite a few comments and questions about the <a href="https://www.facebook.com/ziakhan/videos/10156612828352623/">demo video (in Urdu here)</a>. So here&rsquo;s a shot at answering some of the questions I got forwarded:</p>
<p>The demo was (in oversimplified terms) showing PLC compute moved to software which can be orchestrated using Kubernetes.</p>
<p><strong>Q/A</strong></p>
<ul>
<li><em>Nice move.  But how sensor data is being processed without PLC or a microcontroller?</em></li>
</ul>
<p>There are &ldquo;dumb&rdquo; IO devices connected over Profinet in this case (but it can really be any fieldbus e.g. Ethercat etc.)</p>
<p>Some people had a comment about ADCs being involved. YES, but we need to think at a higher level in this case. Analog and Digital IOs are obviously involved under-the-hood.</p>
<ul>
<li><em>So what is difference between an arduino microcontroller and program able logical controller</em></li>
</ul>
<p>This is a strange question. Arduino is not a microcontroller, it&rsquo;s a prototyping platform (and a company as well.) This prototyping platform <em>has</em> a microcontroller. A PLC is a digital computer made for the industry. Follows many industrial IEC standards. It is a part of many things. For our demo, we were using ADAM PLCs from Advantech.</p>
<p>Arduino can also be programmed to become a PLC (see the OpenPLC project: <a href="https://www.openplcproject.com/">https://www.openplcproject.com/</a>)</p>
<ul>
<li><em>Ok good step so what precautions u take if ur factory text file or source code get hack??</em></li>
</ul>
<p>If you get hacked, &ldquo;precautions&rdquo; are irrelevant. The word precaution means that it ought to prevent the hack. I&rsquo;m assuming this was the question as well. Although this was not a security demo, but k8s brings with it good security practices (certs, https etc.). &ldquo;Hack&rdquo; is too open-ended of a word.</p>
<p>Security practices are a whole different topic. Perhaps not relevant for the discussion here.</p>
<ul>
<li><em>So can we apply machine learning and Ai codes in PLC??</em></li>
</ul>
<p>I would read my answer above and conclude: NO. PLCs are meant for other things, Google is your friend!</p>
<ul>
<li><em>We get machine learning codes in Python mostly some standard c language so what u suggest??</em></li>
</ul>
<p>Great attempt at moving off-topic! (Always one person in the team!!)</p>
<ul>
<li><em>Using structure text and block diagrams and ladder diagrams??</em></li>
</ul>
<p>Yup</p>
<ul>
<li><em>One more thing can u tell me PLC have a capability of processing i mean controller and processor r 2 different things so can u guide me ?</em></li>
</ul>
<p>They are computers in the end! The scope of their work is a bit limited to their application. Check out the OpenPLC project I linked to above.</p>
<ul>
<li><em>No. That is why I am designing machines and control systems using hybrid model. Means using PLCs, Microcontrollers and Computers to accomplish all kind of customization which include AI and custom GUIs in python and VueJs</em></li>
</ul>
<p>Interesting&hellip; But we should not convolute so many things in one sentence. Everything you mentioned has its place. And they work together. We ought to avoid the use of the words &ldquo;Hybrid Model&rdquo; which sounds like formalism.</p>
<ul>
<li><em>Recently I have designed Pakistan&rsquo;s first industrial Artificially intelligent sorting robotic conveyor using this hybrid model.</em></li>
</ul>
<p>Tall claims!! I saw the video and one comment for now is that it might not meet some safety standards we have in the EU and US. Best of luck my friend!! Bring us laurels.</p>
<p>Also, I would tone down on Artificial intelligence and use specifics when talking to more technical folk (e.g. Computer Vision, OpenVINO, Inference, Learning etc.)</p>
<ul>
<li><em>So its coslty???</em></li>
</ul>
<p>Yes, it&rsquo;s supposed to run for many years so, there&rsquo;s a lot of hardening.</p>
<p><strong>Conclusion</strong></p>
<p>I&rsquo;m surprised by the interest people showed in the project. It&rsquo;s still a concept and we want to work with the Industry leaders to bring about more mature products.</p>
]]></content:encoded></item><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>