<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vladas Saulis</title>
    <description>The latest articles on DEV Community by Vladas Saulis (@vsaulis).</description>
    <link>https://dev.to/vsaulis</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1086526%2Fa5d79429-d3a8-4e49-aa6f-650ec9513495.jpg</url>
      <title>DEV Community: Vladas Saulis</title>
      <link>https://dev.to/vsaulis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vsaulis"/>
    <language>en</language>
    <item>
      <title>Parallel JavaScript Machine</title>
      <dc:creator>Vladas Saulis</dc:creator>
      <pubDate>Fri, 23 Aug 2024 11:48:19 +0000</pubDate>
      <link>https://dev.to/vsaulis/parallel-javascript-machine-551k</link>
      <guid>https://dev.to/vsaulis/parallel-javascript-machine-551k</guid>
      <description>&lt;p&gt;Author: Vladas Saulis, PE Prodata, Klaipėda, Lithuania&lt;/p&gt;

&lt;p&gt;May 18th, 2024&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Abstract&lt;/strong&gt;&lt;br&gt;
This paper presents a new programming model that can utilize multi-core CPU systems in a simple and auto-balanced way. This model also proposes an easier programming paradigm for developing parallel tasks and systems in most massively parallel computation areas, such as weather prediction, nuclear physics, search engines, etc.&lt;/p&gt;

&lt;p&gt;In recent times we are facing a new shift in computing philosophy, caused by advance of new hardware architecture and even better performance. Multi-core architecture will become prevailing technology in the near future.&lt;/p&gt;

&lt;p&gt;What can we do in order to take advantage of this? This paper is about one of the possible solutions we can have.&lt;/p&gt;

&lt;p&gt;The proposed computing model (which is named “Object Flow Model”) also provides some answers to questions raised in the well-known published paper form Berkeley [1]. Here is a short list of advantages that can be reached using this model:&lt;/p&gt;

&lt;p&gt;· Simple programming process and further maintenance&lt;/p&gt;

&lt;p&gt;· Natural OPU (CPU) integration and migration when object processing units (OPUs) can be added or removed on the fly&lt;/p&gt;

&lt;p&gt;· Automatic load-balancing&lt;/p&gt;

&lt;p&gt;· No need for synchronization between task parts&lt;/p&gt;

&lt;p&gt;· Little or no mutual locking on the system level&lt;/p&gt;

&lt;p&gt;All these characteristics are implemented in the Parallel JavaScript Machine (PJM), which is described below in this document. PJM may be perceived as a mini operation system which controls multiple JavaScript tasks, multiple users and multiple front-end consoles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
The main goal of PJM (OS) is to simplify parallel programming by introducing special instructions (hints) that are represented by specifically crafted comments in form of &lt;em&gt;//#pragma &lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The Parallel JavaScript Machine uses NodeJS, and is implemented as a Web server for the frontend, as well as a server for the OPUs that really do the parallel execution of code. OPUs are small JavaScript network clients implemented in NodeJS too. There may be as many of them as necessary, connected to the main parallel machine server either locally or remotely. The overall performance of parallel processing strongly depends on the number of connected OPUs.&lt;/p&gt;

&lt;p&gt;All system parts, working together, may be understood as a mini-OS which launches and parses the running JavaScript tasks, puts their chunks into system execution queue and provides some kind of cooperative multitasking between selected chunks. The calculation results are printed to the Web client’s console by pipelining console.log output from OPUs through the main server. Every OPU is assigned to its own CPU (local or remote) and works through a simple round-robin scheduler (will be explained later). This is achieved by use of PM2 process manager Node module.&lt;/p&gt;

&lt;p&gt;“Although compatibility with old binaries and C programs is valuable to industry, and some researchers are trying to help multicore product plans succeed, we have been thinking bolder thoughts. Our aim is to realize thousands of processors…”[1] not necessary on the single physical computer, but throughout the network, all orchestrated by the central server unit. From the system point of view all CPUs/OPUs are operating via internal network socket protocol which doesn’t make distinction between local and remote CPUs. The server (PJM) and clients (OPUs) — all written in JavaScript, so it’s not compatible with C binaries [yet].&lt;/p&gt;

&lt;p&gt;All parallel programs, which are running in PJM, must not be using ES6+ JavaScript extensions (must be using ES5). It’s important to state here that such extensions as &lt;em&gt;classes, arrow functions, lets and consts, and, especially, async/await&lt;/em&gt; are hardly parallelizable, requiring more thorough JavaScript internals research. This is why PJM is running on NodeJS V8.2.1. All node modules are locked to this version for better performance and clarity of concepts.&lt;/p&gt;

&lt;p&gt;PJM is controlled and tasks are running using Web Console which resides at &lt;a href="http://parallel-js.net:8888" rel="noopener noreferrer"&gt;http://parallel-js.net:8888&lt;/a&gt; . And here is how it usually look like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1sdiiic2ius9n5m4l5az.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1sdiiic2ius9n5m4l5az.png" alt="Image description" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Web Console is written using the ExtJS framework and connected to the PJM server with the use of &lt;em&gt;express.js&lt;/em&gt; HTTP NodeJS module. Another part of Web Console (called Console and Messages) is connected using WebSockets. This is where all programs’ output and system messages are coming in real time. It is important to know that no real calculations are performed in the Web Console — all calculations are done on the PJM server and OPUs.&lt;/p&gt;

&lt;p&gt;…&lt;/p&gt;

&lt;p&gt;If you are interested in this project, please find the full article &lt;a href="http://parallel-js.net:81/EN/Prodata/pjm/PJM.pdf" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Source code for this project is &lt;a href="http://parallel-js.net:81/EN/Prodata/pjm/pjm-0.55.113.tgz" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>parallel</category>
      <category>distributed</category>
      <category>computing</category>
      <category>javascript</category>
    </item>
    <item>
      <title>We are AI</title>
      <dc:creator>Vladas Saulis</dc:creator>
      <pubDate>Wed, 21 Jun 2023 21:26:41 +0000</pubDate>
      <link>https://dev.to/vsaulis/we-are-ai-2e6j</link>
      <guid>https://dev.to/vsaulis/we-are-ai-2e6j</guid>
      <description>&lt;p&gt;&lt;em&gt;We are that missing link between apes and humans... More exactly - AI.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Recently, after very interesting discussion with my friend, we suddenly came to something quite unexpected ...&lt;/p&gt;

&lt;p&gt;When speaking ones and again about AI-Complete problem (on philosophical level), suddenly very strange idea stroke us like a thunder. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WE already are that AI, which human race is all the time trying to invent!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It meant to say that we (humans) already are an AI, which completely fits all that model which we always have in mind when we speak about various possibilities in creating AI-Complete. And if we eliminate here the word "Artificial", here you are - the Human. This is, of course, quite obvious, and that's not what I really want to speak about.&lt;/p&gt;

&lt;p&gt;Another, and not so obvious idea is that:&lt;br&gt;
Since we already have one AI, there is &lt;em&gt;no point&lt;/em&gt; on this Earth in creating any other human or robot-like AI at all! (Think, we are speaking here only about AI-Complete).&lt;/p&gt;

&lt;p&gt;To explain this my idea, we might have to let into kind of metaphysical thought-abouts.&lt;/p&gt;

&lt;p&gt;Human beings always liked to pass their problems round to others. It is almost common practice. Some time ago there was slavery, then rude metal mechanisms, and now there are computers and first signs of computerized robots. &lt;/p&gt;

&lt;p&gt;Now suppose that we've finally created an ultimate AI which solves all our every day's problems (we want this, don't we?) and acts exactly like human in all aspects of life. This means that we are ready to load it with our problems and tasks. But right after this moment that problem (or task) actually (and suddenly) becomes only &lt;em&gt;its&lt;/em&gt; (AIs) problem! And so becomes its history and its experience! More than that - that AI itself now becomes our problem! Because we must control how it gets to solution, and even - if it is a real and selfish AI - whether it likes to solve our problem at all?! In it's turn, the AI, at some time might want to escape out of our problems, and become more independent from us (remember - USA slavery times?). Here we're finally coming to the roots of ultimate conflict between races - human and AIs.&lt;/p&gt;

&lt;p&gt;As a side note I can say that humans cannot bring to AI any &lt;em&gt;different&lt;/em&gt; kind of intelligence. So, both intellects would be identical and not complementary. In case intellects would complement each other, there could be another and probably better game. But since we all are the same, sooner or later one of the party must leave the Planet (or common living area). There's no other way out!&lt;/p&gt;

&lt;p&gt;I have a strong deja vou feeling that this situation might already had place on our Earth. And most probably - more than once. And here UFOs naturally comes to mind. In such situation there is no point to seek any contact with former colleagues, since all issues between them has been resolved and settled once and forever. The only point left - is wandering about, gathering information (it's intriguing), and even - sometimes - take probes. This is exactly what UFOs do. &lt;/p&gt;

&lt;p&gt;The conclusion of this all - let humans forget this sweet dream of creating AI which would only be identical to human's!&lt;/p&gt;

&lt;p&gt;What in this case could be worked out in the AI area instead? &lt;/p&gt;

&lt;p&gt;The answer is simple. In reality, we do not need AI-complete. All we need is a whole lot of specialized &lt;em&gt;complementary&lt;/em&gt; AIs. In other words - smart helpers. These complementary parts could make even more sense if they would be seamlessly integrated with our minds (or senses). I can see some signs of such researches nowadays. This, I think, is a right direction.&lt;/p&gt;

&lt;p&gt;Why to create a new copy? Just extend existing one! So we do.&lt;/p&gt;

&lt;p&gt;In another part of this writing I can tell why it's impossible to create AI-complete. This would also be from metaphysics point of view. What is metaphysics? It's normal physics with only addition: the Fifth State of the Matter.&lt;/p&gt;

&lt;p&gt;To be continued...&lt;/p&gt;

</description>
      <category>ai</category>
      <category>life</category>
      <category>universe</category>
      <category>everything</category>
    </item>
  </channel>
</rss>
