public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
From: Peter Novodvorsky <nidd@altlinux.ru>
To: gnats-devel@sources.redhat.com
Subject: modular database backends
Date: Sun, 27 May 2001 11:32:00 -0000	[thread overview]
Message-ID: <7xr8xaac5q.fsf@lambda.novdv.ru> (raw)

Hello!

        I always thought about BTS as database and tools to work with
it. And these things are different. In gnats I see opposite thing: database,
tools and servers share one source and tools sometimes do too much.

        So I've began work on making database backends to gnats modular. 
Just now, gnats has two "backends", network (gnatsd) and filsystem. If
we make system of backends modular we could have SQL backend, etc., etc.

        Second thing I don't like in  GNATS, it doesn't has ACLs. This
modular framework should support them.  Here is the header file that
will briefly describe what I mean:

struct _gnats_database {
  URI *U;
  
  FILE *serv_read;
  FILE *serv_write;

  void *module_handle;

  int (* init) (ErrorDesc *err, gnats_database);
  int (* add_pr) (ErrorDesc *err, gnats_database, PR);
  int (* update_pr) (ErrorDesc *err, gnats_database, PR);
  int (* query_pr) (ErrorDesc *err, gnats_database, QueryExpr);
  int (* disconnect) (ErrorDesc *err, gnats_database);
};

typedef struct _gnats_database *gnats_database;

gnats_database gnats_new_database (ErrorDesc *err, URI *U);
int gnats_destroy_database (gnats_database db);

        module_handle is object handle that is returned by dlopen.
URI is:

struct _URI
{
  char *scheme;
  char *host;
  char *user;
  char *pwd;
  char *path;
  unsigned int port;
};

typedef struct _URI URI;

        And there is a function

URI *gnats_parse_uri (const char *gnats_uri, int length);

that takes URI (for example 
gnatsd4x://nidd:pwd@nidd.debian.net:1529/database_name) and converts
it in such structure (gnatsd4x is 4.0 gnatsd protocol).

        I'm currently implementing gnatsd4x backend. After this I'll
make query-pr, pr-edit, gnatsd and other tools to work with this model.
And then I'll begin to make SQL backend.

        If everything will be OK in the end following will be possible:

           user -> client -> gnatsd -> SQL server (MySQL, Postgres)

        What do you think of this crazy idea?

                                                Thanks,
-- 
Peter Novodvorsky     http://www.altlinux.ru/    AltLinux Team, Russia
Debian.Org                                       http://debian.org/~nidd
            Debian  ---  no need to  wait for tomorrow.

             reply	other threads:[~2001-05-27 11:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-27 11:32 Peter Novodvorsky [this message]
2001-05-28  2:43 ` Yngve Svendsen
2001-05-28  4:34   ` Peter Novodvorsky
2001-06-04 21:53   ` Margaret BRIERTON
2001-06-05  1:35     ` GNATS discussion group Yngve Svendsen
2001-06-05 19:56       ` Margaret BRIERTON
2001-06-06  4:54         ` Yngve Svendsen
2001-06-07 17:04           ` Margaret BRIERTON
2001-06-07 18:15             ` Database Margaret BRIERTON
2001-05-28 14:37 ` modular database backends Milan Zamazal
2001-05-29 12:43   ` Peter Novodvorsky
2001-06-11 11:53     ` Milan Zamazal
2001-06-13 10:31       ` Peter Novodvorsky
2001-06-17 12:26         ` Milan Zamazal
2001-06-11 11:53 ` access control (was Re: modular database backends) Milan Zamazal
2001-06-13  5:20   ` access control Hans-Albert Schneider
2001-06-17 12:26     ` Milan Zamazal
2001-06-13 10:44   ` access control (was Re: modular database backends) Peter Novodvorsky
2001-05-27 11:35 modular database backends Peter Novodvorsky
2001-05-29  0:11 Dirk Bergstrom
2001-05-29  0:22 ` Bob Kaehms
2001-05-29  1:16   ` Peter Novodvorsky

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=7xr8xaac5q.fsf@lambda.novdv.ru \
    --to=nidd@altlinux.ru \
    --cc=gnats-devel@sources.redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).