Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #10840

Re: FastCGI-like stuff and Forth

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: FastCGI-like stuff and Forth
Date 2012-04-03 22:35 +0200
Organization 1&1 Internet AG
Message-ID <jlfmv1$3gp$1@online.de> (permalink)
References <2012Apr3.152855@mips.complang.tuwien.ac.at> <7xsjgky7sr.fsf@ruckus.brouhaha.com> <jlfk2d$160$1@online.de> <7x398ky33l.fsf@ruckus.brouhaha.com>

Show all headers | View raw


Paul Rubin wrote:

> Bernd Paysan <bernd.paysan@gmx.de> writes:
>> There's tasker.fs.  But if you want real high concurrency, you want a
>> pthread-based multitasker (with the same API, but not the traditional
>> round-robin implementation), and I've been working on that: the
>> current CVS snapshot contains unix/pthread.fs, which is still work in
>> progress.
> 
> I'll look at tasker. fs.  pthreads are very heavyweight by comparison,
> which is why Erlang and GHC beat the pants off of pthreads-based
> multitasking in the Alioth thread-ring benchmark.  I'd have thought
> Forth multitasking was closer to Erlang, so you could have millions of
> tasks in a program.  That's what I meant by high concurrency, being
> able to support large numbers of connections simultaneously.

I understand what you mean.  However, the reason to have threads for 
such kind of applications (serving many connections) is that all your 
connection IOs are either blocking, *or* they become expensive - Unix's 
api is simply bad on that.  The UDP api is better, because there, you 
can just have one recvfrom listener, and decide on the sender address 
what to do with that packet.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

FastCGI-like stuff and Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-03 13:28 +0000
  Re: FastCGI-like stuff and Forth Paul Rubin <no.email@nospam.invalid> - 2012-04-03 11:44 -0700
    Re: FastCGI-like stuff and Forth Bernd Paysan <bernd.paysan@gmx.de> - 2012-04-03 21:46 +0200
      Re: FastCGI-like stuff and Forth Paul Rubin <no.email@nospam.invalid> - 2012-04-03 13:25 -0700
        Re: FastCGI-like stuff and Forth Bernd Paysan <bernd.paysan@gmx.de> - 2012-04-03 22:35 +0200
          Re: FastCGI-like stuff and Forth Paul Rubin <no.email@nospam.invalid> - 2012-04-04 02:20 -0700
            Re: FastCGI-like stuff and Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-04 05:52 -0500
              Re: FastCGI-like stuff and Forth Paul Rubin <no.email@nospam.invalid> - 2012-04-05 00:03 -0700
                Re: FastCGI-like stuff and Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-05 03:03 -0500
                Re: FastCGI-like stuff and Forth Paul Rubin <no.email@nospam.invalid> - 2012-04-05 10:42 -0700
                Re: FastCGI-like stuff and Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-06 06:30 -0500
                Re: FastCGI-like stuff and Forth Paul Rubin <no.email@nospam.invalid> - 2012-04-07 01:44 -0700
                Re: FastCGI-like stuff and Forth Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-04-07 19:04 -0500
                Re: FastCGI-like stuff and Forth Paul Rubin <no.email@nospam.invalid> - 2012-04-07 17:40 -0700
        Re: FastCGI-like stuff and Forth quiet_lad <gavcomedy@gmail.com> - 2012-04-05 13:37 -0700
    Re: FastCGI-like stuff and Forth Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-04-04 13:20 +0000
      Re: FastCGI-like stuff and Forth Paul Rubin <no.email@nospam.invalid> - 2012-04-04 11:20 -0700
    Re: FastCGI-like stuff and Forth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-04-04 13:42 +0000
  Re: FastCGI-like stuff and Forth Spam@ControlQ.com - 2012-04-04 17:00 -0400
  Re: FastCGI-like stuff and Forth quiet_lad <gavcomedy@gmail.com> - 2012-04-05 13:36 -0700
  Re: FastCGI-like stuff and Forth quiet_lad <gavcomedy@gmail.com> - 2012-04-13 23:10 -0700

csiph-web