public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* RE: modular database backends
@ 2001-05-29  0:11 Dirk Bergstrom
  2001-05-29  0:22 ` Bob Kaehms
  2001-07-09  1:10 ` gnatsweb Margaret BRIERTON
  0 siblings, 2 replies; 15+ messages in thread
From: Dirk Bergstrom @ 2001-05-29  0:11 UTC (permalink / raw)
  To: 'Peter Novodvorsky', gnats-devel

a database backend for gnats, huh?  i've been thinking about this myself.
in fact, it's quite likely to be a major project for me this year.  i
haven't gotten too far along, but i will soon have a lot more time to devote
to thinking about it.  i wouldn't describe myself as a high powered C
programmer (cough cough...), but i've got clue, time, and energy.

we should gather together interested parties, and kick some ideas around.

--
Dirk Bergstrom              dirk@juniper.net
____________________________________________
Juniper Networks Inc.,  Engineering Web Guru
Tel: 408.745.3182          Fax: 408.745.8905


> -----Original Message-----
> From: Peter Novodvorsky [ mailto:nidd@altlinux.ru ]
> Sent: Sunday, May 27, 2001 11:18 AM
> To: gnats-devel@sources.redhat.com
> Subject: modular database backends
> 
> 
> 
> 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.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* modular database backends
@ 2001-05-27 11:35 Peter Novodvorsky
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Novodvorsky @ 2001-05-27 11:35 UTC (permalink / raw)
  To: gnats-devel

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.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* modular database backends
@ 2001-05-27 11:32 Peter Novodvorsky
  2001-05-28  2:43 ` Yngve Svendsen
  2001-05-28 14:37 ` Milan Zamazal
  0 siblings, 2 replies; 15+ messages in thread
From: Peter Novodvorsky @ 2001-05-27 11:32 UTC (permalink / raw)
  To: gnats-devel

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.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2001-07-09  1:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-29  0:11 modular database backends Dirk Bergstrom
2001-05-29  0:22 ` Bob Kaehms
2001-05-29  1:16   ` Peter Novodvorsky
2001-07-09  1:10 ` gnatsweb Margaret BRIERTON
2001-07-09  1:29   ` gnatsweb S Ramesh
  -- strict thread matches above, loose matches on Subject: below --
2001-05-27 11:35 modular database backends Peter Novodvorsky
2001-05-27 11:32 Peter Novodvorsky
2001-05-28  2:43 ` Yngve Svendsen
2001-05-28  4:34   ` Peter Novodvorsky
2001-06-04 21:53   ` Margaret BRIERTON
2001-05-28 14:37 ` 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

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