>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:

  DS> At 6:36 PM -0400 10/6/05, Uri Guttman wrote:
  >> >>>>> "JM" == Jeremy Muhlich <[EMAIL PROTECTED]> writes:
  >> 
  JM> Has anyone here written a serious threaded server in perl?  I
  JM> can't seem to find any threads + sockets examples anywhere.  I
  JM> have some stuff working with Thread::Pool but there are problems.
  JM> (I can elaborate if anyone wants me to...)
  >> 
  >> even the people who wrote the threads code in perl disavow them

  DS> That's not true!

  DS> I wrote a good chunk of the first version of the threading code for
  DS> perl, and bluntly it's a damn sight more useful in most cases than the
  DS> current perl threading model. (Which I *will* disavow -- it's core is
  DS> a badly done pseudo-fork that a lot of good people put a lot of work
  DS> in to make not suck too badly, thought they didn't succeed too well)

  DS> Not that it necessarily helps, since I doubt you want to run perl
  DS> 5.005 or 5.6 with 5.005-style threads, but that's a separate issue.

well, i was refering to the recent stuff which artur bergman wrote and
he says to not use it. in any case, regardless of the lang or project, i
prefer event loops over threads for many reasons. events can scale
across multiple machines, they require no locks/semaphores, no shared
ram issues (thread claim shared ram is a plus but that is really for
large amounts of shared ram and processes can share that too), no
syncing of threads issues, etc. events have one major issue which is to
make sure you don't execute blocking operations. this is easy to avoid
with sockets and ttys and not hard to deal with for files.

threads are the school thing these days and they are taught as an
absolute solution, not one of several ways to deal with concurrent
processing. threads are no more a silver bullet than OO is.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to