9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: a@9srv.net
To: 9fans@9fans.net
Subject: Re: [9fans] web-based plan 9?
Date: Fri, 21 Nov 2008 13:12:10 -0500	[thread overview]
Message-ID: <4a2c0e119c1a63994e9b2c5bd30dc710@9srv.net> (raw)
In-Reply-To: <e1d437a40811210215pe6572c5v15d2e479c6768e3d@mail.gmail.com>

On db ↔ fs conversions:
// datas (and their relations) MUST be kept consistents.

there's two things you could mean here: either the
relations between the data fields/types or the relations
between their values. SQL databases are interesting
because they don't do anything to keep the relations
consistent, at a schema level. there are some cases where
this is valuable, but most of the time it just puts more of
the burden on the application.

enforcing consistency between values is a whole different
matter. i don't think that belongs in the database layer of
an application, but on the application side. why let the ap
shove bad data at your DB? bad for scalability (if your DB is
complex enough to need that kind of consistency checking,
it's likely that it's a performance bottleneck alread), bad for
security/stability (why let mallicious attackers fuzz your
DB?), and largely needs to be done in the ap anyway (say
your DB rejects a submission; are you just giong to panic,
say "try again", or try and figure out what it didn't like?).

// And MUST be updated frequently, in transaction.

just curious: what is it about "transactionality" that you care
about? atomicity, logging, roll-back (atomic roll-back)?

// Application code cannot do that, since it's too subject to
// modifications...

i'm not convinced. you can simply... not modify it! unless
you've got a database you're exposing to multiple parties
and you're worried one is going to mess things up for
others, but in that case i think exposing the database
directly is pretty risky regardless.

the application i've worked on with the most complex data
constraints had an "ontology layer" that everything that
wanted to do data access went through. the rest of the
application got to ask very simple questions about what it
wanted, or make very simple updates, and the ontology
layer made sure everything was consistent before talking to
the database. you get the benifits of having that work be
centralized, not related to the core application logic (and
thus not touched when ap logic changes), and you have a
much better idea of what went wrong when a constraint
failed.

// Moreover such a dbfs should allow rapid development of
// views over data (with different permissions) by simply
// write the query in a file and then open the file for reading
// the XML.

somewhere around here i've got a /chan/pq for inferno that
makes connections to a pq database. each open is a new
logical connection; you write the query and read the result.
results were not in XML, and pq has no updates (at current).

i think you've got some very interesting ideas on sessionfs
in particular. i have more thinking to do there.

oh, probably an aside: from an application design point of
view, DO NOT empty my shopping cart just because my
session timed out. i should be able to pick up where i left
off. i'm not sure how hypothetical that example was, but
that's a common source of irritation for online shopping.




      parent reply	other threads:[~2008-11-21 18:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20  1:35 Pietro Gagliardi
2008-11-20 14:25 ` Eric Van Hensbergen
2008-11-20 14:37   ` Fco. J. Ballesteros
2008-11-20 14:47     ` Eric Van Hensbergen
2008-11-20 15:07       ` Fco. J. Ballesteros
2008-11-20 15:16         ` Eric Van Hensbergen
2008-11-20 15:21           ` Francisco J Ballesteros
2008-11-20 14:51     ` erik quanstrom
2008-11-20 18:59   ` Skip Tavakkolian
2008-11-20 19:25     ` Skip Tavakkolian
2008-11-20 22:15     ` Giacomo Tesio
2008-11-20 23:18       ` Skip Tavakkolian
2008-11-21  5:19         ` lucio
2008-11-21 10:15         ` Giacomo Tesio
2008-11-21 11:55           ` matt
2008-11-21 14:01             ` Tom Lieber
2008-11-21 14:34               ` matt
2008-11-21 15:13                 ` Giacomo Tesio
2008-11-21 15:53                   ` matt
2008-11-21 16:05                     ` erik quanstrom
2008-11-21 17:05                     ` Giacomo Tesio
2008-11-21 17:18                       ` erik quanstrom
2008-11-22 20:15                         ` Giacomo Tesio
2008-11-21 17:24                       ` matt
2008-11-21 18:12           ` a [this message]

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=4a2c0e119c1a63994e9b2c5bd30dc710@9srv.net \
    --to=a@9srv.net \
    --cc=9fans@9fans.net \
    /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).