pages tagged clojurescriptwikihttp://sept.info9.net/wiki//clojurescript/wikiikiwiki2014-08-08T15:31:23Z10000 Processes in Omhttp://sept.info9.net/wiki//tmarble/posts/10000_Processes_in_Om/2014-08-08T15:31:23Z2014-08-08T15:23:28Z
<h1>10,000 Processes in Om</h1>
<p>I have just published <a href="https://github.com/tmarble/om-processes">om-processes</a> which
is a port of David Nolen's <a href="http://swannodette.github.io/2013/08/02/100000-processes/">10,000 Processes</a>
in <a href="http://github.com/clojure/clojurescript">Clojurescript</a> to <a href="https://github.com/swannodette/om">Om</a>.</p>
<p>Clojurescript is a port of <a href="http://clojure.org">Clojure</a> to JavaScript which
is especially well suited for running in a browser. Just as
Clojure offers a pleasant LISP on the JVM Clojurescript
offers (nearly the same) LISP in the browser. The performance
of Clojurescript is outstanding due to the massive optimizations
available from the <a href="https://developers.google.com/closure/">Google Closure compiler</a>.</p>
<p>JavaScript, however, has some fundamental flaws... Top
among these are it is single threaded which leads to
an asynchronous callback style of "event programming".
Clojure's <a href="https://github.com/clojure/core.async/">core.async</a> offers a solution
in the form of <a href="http://en.wikipedia.org/wiki/Communicating_sequential_processes">CSP</a> style programming. Using core.async
one can <em>think</em> about coding in a more intuitive way.</p>
<p>In <a href="http://swannodette.github.io/2013/08/02/100000-processes/">10,000 Processes</a> Nolen demonstrates
using core.async to simulate independent "threads" despite
the fact that the underlying platform has no native
support for threads.</p>
<p>In <a href="https://github.com/swannodette/om">Om</a> Nolen leverages <a href="http://facebook.github.io/react/">Facebook's React</a> to
create a high performance, immutable model for client programming.</p>
<p>The technical study <a href="https://github.com/tmarble/om-processes">om-processes</a> is simply
the fusion of all these ideas into one demonstration.
Who knew web development could be so much fun!</p>