help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

an apache-ized gnatsd (was RE: modular database backends)


From: Dirk Bergstrom
Subject: an apache-ized gnatsd (was RE: modular database backends)
Date: Tue, 29 May 2001 16:35:46 -0700

bob kaehms writes:
> Just as a thought, perhaps the whole thing should be done in 
> php/mysql.

i gave some thought to rewriting gnatsd as a mod_perl/apache system, and
teaching the tools (query-pr, etc.) to use HTTP instead of the gnatsd
protocol.  i decided that would be too much effort (why reinvent the
wheel?), and more like writing a new bug-tracking system than rewriting
gnats.

however, there *is* the thorny issue of a persistent database connection
(see the email i just sent).  running inside apache would solve that
problem.  in my more daring moments, i toyed with the idea of rewriting
gnatsd as an apache module.  this would (presumably) leverage the vast heap
of C code already in existence, while gaining various benefits of caching
and database connection persistence.  i suspect, however, that mod_gnats is
a fantasy best left unrealized.

now, if any of you actually *know* something about writing apache modules,
and think this idea has promise, let me know...

--
Dirk Bergstrom              address@hidden
____________________________________________
Juniper Networks Inc.,  Engineering Web Guru
Tel: 408.745.3182          Fax: 408.745.8905


> -----Original Message-----
> From: Bob Kaehms [mailto:address@hidden
> Sent: Tuesday, May 29, 2001 12:22 AM
> To: Dirk Bergstrom
> Cc: 'Peter Novodvorsky'; address@hidden
> Subject: Re: modular database backends
> 
> 
> Just as a thought, perhaps the whole thing should be done in 
> php/mysql.
> it's a little archaic as is.
> Dirk Bergstrom writes: 
> 
> > 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              address@hidden
> > ____________________________________________
> > Juniper Networks Inc.,  Engineering Web Guru
> > Tel: 408.745.3182          Fax: 408.745.8905 
> > 
> > 
> >> -----Original Message-----
> >> From: Peter Novodvorsky [mailto:address@hidden
> >> Sent: Sunday, May 27, 2001 11:18 AM
> >> To: address@hidden
> >> 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:address@hidden: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 via email to

[Prev in Thread] Current Thread [Next in Thread]