edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev]  One program Two processes
Date: Wed, 23 Dec 2015 15:44:50 -0500	[thread overview]
Message-ID: <20151123154450.eklhad@comcast.net> (raw)
In-Reply-To: <87zix1djh4.fsf@mushroom.localdomain>

> 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.

Yes, and the existing message serializing protocol
should prevent the kind of threading nightmares that we've
all experienced in the past.
One thread runs while the other waits.

> wrap all of our networking code in its own process.

Pipes everywhere, looks like a mess,
and where does it end, how many more processes?
Remember that IPC is limited on windows.
I think this creates entropy, whereas one process would probably work just fine.

> allowing edbrowse-js to call into the main edbrowse
> process to make HTTP requests?

We thought about this one before,
when we first learned js had to parse html and create corresponding js objects
right now, as a native method, before the next line of js ran.
Those objects have to be there.
So native code would have to stop and send a message back to edbrowse,
but it's waiting for the return from running the native code,
it's not waiting for a message that says
"hey hold up and here's some html and parse it
and then call me reentrantly so I can create those javascript objects
and then we unwind the stack together and hope that the reentrant calls into js
have not disturbed the thread of execution that was running,
which I can't guarantee for edbrowse or whatever
js engine we're using this week or next week."
Anyways it was way to convoluted, and much easier
to make sure both processes had access to tidy and could do that work.
In the same way, both processes, or both threads,
as you prefer, now have access to httpConnect for making that call.

> Does js really need to have direct, unmediated access to HTTP,

It needs to make the http call before the next line of js code runs.
A native method that does not disturb the flow of execution.


Karl Dahlke

  reply	other threads:[~2015-12-23 20:44 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
2015-12-23 20:44     ` Karl Dahlke [this message]
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=20151123154450.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --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).