TheHarry BinswangerLetter

  • This topic has 3 voices and 2 replies.
Viewing 2 reply threads
  • Author
    Posts
    • #99554 test
      | DIR.

         One-line summary: This article describes a new approach to programming parallel computation

      This article (which is still a draft) is written by Uri Guttman, a long time Perl programmer.  The two prevailing ways to process many requests in parallel is (a) using threads, or (b) using an event-loop (think node.js). Uri came up with his own solution over the years, which he decided to explain in this article. 

      http://sysarch.com/perlhunter/dataflow.txt

      Quote:

      “A major design issue with complex systems is how to multitask. The two major techniques are event loops and (kernel or language) threads. I have a big bias for event loops over threads as I have done several major projects with event loops. …. Threads also have a shared memory space which is both good and bad – data needs to be locked (with a semaphore or similar) before it can be modified. Managing threads is also tricky …. Event loops in general don’t have those problems but their big one is blocking. A blocking operation will stop the whole event loop from continuing and that is very bad. … Wouldn’t it be nice to be able to have the flexibility to have event loops doing the main work and using threads for blocking operations?”

    • #114273 test
      | DIR.

      Re: Boris Reitman’s post 99554 of 7/22/16

         One-line summary: Good ideas, but not fully informed.

      A recommendation here is high praise indeed, and the central idea is superb. But there are gaps. For example,

      (In shell scripts) you can’t fork the data stream (tee only writes to a file, which doesn’t really count)

      isn’t true, because tee writes to dynamic as well as static files, including devices and named pipes; and if one needs multiple streams one can use higher descriptors. Etc (sockets are bidirectional.) So shell tools do not have the drawbacks ascribed; the superiority of Perl over shell scripting is not in capabilities but in more consistent abstraction.

      That said, Perl is not the only vehicle for the central idea of combining the advantages of loops and threads. In Java, one can define subclasses of Loop and Thread with a common Sentry interface. Even in JavaScript, one can use global objects with sentries. It would have been nice if browsers and app libraries had standardized Perl, which is in many ways clearer than JavaScript. But with so much reusable code now available in JavaScript, and the relative value of one’s time, going back to Perl would be going back.

    • #114284 test
      | DIR.

      Re: Adam Reed’s post 114273 of 7/23/16

         One-line summary: Off-topic thread is now closed

      Much as I love computers, this thread is too far from our domain, so I’m closing the thread.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.