edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Chris Brannon <chris@the-brannons.com>
To: edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] One program Two processes
Date: Wed, 23 Dec 2015 11:59:35 -0800	[thread overview]
Message-ID: <87zix1djh4.fsf@mushroom.localdomain> (raw)
In-Reply-To: <20151223184500.GB2992@hob.adamthompson.me.uk> (Adam Thompson's message of "Wed, 23 Dec 2015 18:45:00 +0000")

Adam Thompson <arthompson1990@gmail.com> writes:

> A sort of multi-process multi-threaded mechanism.

The biggest concern is that we have to share a whole bunch of
HTTP-related state across process boundaries.
Multi-threading sounds like the answer.  Take that state that needs to
be shared across threads, and encapsulate it behind a well-defined
interface to insure proper synchronization, consistency, etc.
We will have to be much more careful about the use of anything global.
Another solution might be to wrap all of our networking code in its own
process.  Let the edbrowse, edbrowse-js, and other processes communicate
with it using an API based around messages exchanged over pipes.  Again,
this insures proper and synchronized access to this huge blob of global
state.  Or how about allowing edbrowse-js to call into the main edbrowse
process to make HTTP requests?
Does js really need to have direct, unmediated access to HTTP, or could
it send messages over its pipe to the parent process saying "GET <url>",
"POST <url> <data>", and so forth?

-- Chris

  parent reply	other threads:[~2015-12-23 19:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 15:09 Karl Dahlke
2015-12-23 18:45 ` Adam Thompson
2015-12-23 19:07   ` Karl Dahlke
2015-12-23 19:59   ` Chris Brannon [this message]
2015-12-23 20:44     ` Karl Dahlke
2015-12-24 11:19       ` Adam Thompson
2015-12-24 13:15         ` Karl Dahlke
2015-12-24 18:39           ` Adam Thompson
2015-12-25  2:29             ` Karl Dahlke
2015-12-25 23:18               ` Adam Thompson
2015-12-25 23:51                 ` Karl Dahlke
2015-12-26  9:11                   ` Adam Thompson
2015-12-26 13:36                     ` Karl Dahlke
2015-12-26 15:10                       ` Adam Thompson
2015-12-26 15:23                         ` Karl Dahlke
2015-12-26 15:40                           ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zix1djh4.fsf@mushroom.localdomain \
    --to=chris@the-brannons.com \
    --cc=edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).