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]  edbrowse-js back in the fold??
Date: Mon, 28 Sep 2015 13:28:41 -0400	[thread overview]
Message-ID: <20150828132841.eklhad@comcast.net> (raw)
In-Reply-To: <87h9mefu4t.fsf@mushroom.localdomain>

A quick note regarding our arrangement of software into processes:

Having performed a rethink,
and having wrestled with some of the things we need to implement,
I'm convinced we need to stay the course, edbrowse and edbrowse-js.
It allows for some of the asynchronicity we'll want in the future,
edbrowse-js failure or lockup does not bring down edbrowse,
edbrowse can meaningfully run and provide many features even if an
individual or distributer cannot build edbrowse-js,
and most important, different copies of opaquely the same functions,
like get_property_string(object, membername) for instance,
must do two different things in the two processes.
There are dozens of such functions, most of the layer in ebjs.c.
This is driven by parsing, rendering, and possibly decorating html in edbrowse,
assuming there is no js or js is broken or unbuilt,
and also in the js world while the script is running, under a setter.
That html must parse and process in these two different contexts
drives much of the above, so I press on.
Both processes now contain the tidy machinery,
our transformation of the tidy tree into our tree,
some prerendering of the tree, and the decoration of that tree
with js objects, which is done by remote calls from edbrowse
and by native calls in edbrowse-js.
But the code in decorate.c is the same either way.
That is the magic that I have set up.
Geoff, do I have to change cmake files as the .o dependencies change?
Example, both processes now share html-tidy.o and decorate.o.
I really need to learn cmake.

What frightened me initially, passing back the created subtree
from edbrowse-js back to edbrowse, is not so frightening,
as I thought of a clever way to do it last night.
I don't have to pack up and represent the tree in some long confusing ascii
string and pass it back and unpack it again, I can do something else.

Keeping a common tree in shared memory is not practical as:
shmget is not portable to windows, and, more important,
it's not just a tree of nodes but each node may have allocated strings
hanging off of it, for the tag attributes etc,
and I just can't tell malloc to use, in certain situations,
a block of shared memory for its pool.
It would all be a nightmare, and there's really a better way.

So I don't plan to rock the boat in any significant way.
We have a good start and can keep going forward in reasonable steps.
Geoff says our processes and interprocess communication are portable,
with a little work, so that's good.

Karl Dahlke

  reply	other threads:[~2015-09-28 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-26 14:05 Karl Dahlke
2015-09-28  4:42 ` Adam Thompson
2015-09-28 15:20   ` Chris Brannon
2015-09-28 17:28     ` Karl Dahlke [this message]
2015-09-29  7:25     ` Adam Thompson
2015-09-29  8:16       ` Karl Dahlke

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=20150828132841.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).