Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Wed Apr 23, 2014 8:35 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Postgres Support
PostPosted: Fri Mar 28, 2003 10:00 pm 
Assuming the DB code conforms to SQL standards and is reasonably well modularized, a port to the other, less publicized but more powerful open source SQL DB would be nice for those of us who don't see the point of running two SQL servers on one box. I've read some statements as well that Postgres is actually faster and more scalable than MySQL now in many situations; it would be interesting to see if a port to it would actually make Cacti faster.


Top
  
 
 Post subject: Ok...
PostPosted: Sun Mar 30, 2003 1:10 pm 
Offline

Joined: Wed Mar 26, 2003 6:14 pm
Posts: 6
Location: Arvada CO
I don't think it much matters if it is faster or more scalable. It comes down to what you need out of your database. If you need speed and a fashion of replicability they MySQL is most likely your choice. If you need the SQL whiz-bangs like stored procedures, views and outer joins. Then, PostgreSQL is most likely for you. (But what about SAP DB?)

If the SQL Schema was ported over to a PostgreSQL friendly format and Cacti was written using the Pear DB module then it would be trivial to "port" Cacti to using Postgres. I'd have to look at the code more to really tell this (I just installed Cacti without looking at it first).

The only reason to not use Postgres is that nothing in Cacti _requires_ advanced SQL whiz-bangs. And, by only developing for one database it speeds up the development because you aren't working around the limitation of making sure you work on both databases (if not more, Cacti works on winders too so why not use Access (.mdb) or MS SQL or <X database here>, or etc...).


There was also a post about using flat files to store the configuration details. This faces the same quandry of developing for two data storage modules. Perhaps if PHP supported making SQL queries against flat files in a user owned directory (this is possible as MySQL AB produces and embeded library for just this purpose). The Pear DB module would be extended to use the embedded MySQL versus a stand alone server. This functionality would serve more than just this purpose as many sites do not need a full blown database server for their database tasks. I know no site I have ever coded up justifies that horsepower. I've got a Ferrari pulling my cart of goods.

I do agree that the necessity of running MySQL when you are a PostgreSQL user is kind of a burden. I'd fall more to the flat file solution first though as Cacti doesn't have that many needs for a database.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 12:39 am 
Offline
Lead Developer

Joined: Sat Oct 13, 2001 7:00 pm
Posts: 2237
Location: Carlisle, PA
I would actually be fairly surprised if cacti could work well with a flat file structure. If you take a look at the code sometime (and even more so with 0.8), it is highly interwoven with SQL. Unless the PHP could create a near SQL92 compliant flat file interface, I doubt it would scale.

About the use of other SQL implementations, this *is* coming. In fact version 0.8 already makes use of ADODB. A friend of mine and I were working on porting the schema to MSSQL, but the cacti's code still needs some work. There are many places where I am directly referring to a MySQL function, which have to be replaced with their ADODB equivalents. Once that is out of the way, you should be able to use cacti with PostgreSQL, Access, MSSQL, MySQL, Oracle... the works :D

-Ian


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 9:20 am 
Offline

Joined: Wed Mar 26, 2003 6:14 pm
Posts: 6
Location: Arvada CO
raX wrote:
I would actually be fairly surprised if cacti could work well with a flat file structure. If you take a look at the code sometime (and even more so with 0.8 ), it is highly interwoven with SQL. Unless the PHP could create a near SQL92 compliant flat file interface, I doubt it would scale.

After taking a look at the code I can see that you make use of MySQL everywhere. But, I wasn't thinking that you interface flat files directly. I've been thinking that using this <a href="http://www.mysql.com/doc/en/libmysqld_overview.html">embedded MySQL library</a> in PHP would be a boon. You can make SQL queries against InnoDB files without needed to run a server. I'm not clear on how you would switch between this library and the client library in your apps (perhaps by making it a different set of functions). This is only in their latest 4.0 releases and I'm sure PHP doesn't support this. Hopefully PHP5 will catch on to this and include support for it.

At the time being, this isn't feasable for Cacti but when MySQL 4 is more widely distributed I hope people take advantage of this (specifically Perl and PHP: Are you guys listening? :D )

Glad to hear that you are doing some database abstraction. Cacti rocks, I just wish I knew more about RRDtool.


Top
 Profile  
 
 Post subject: Support for other databases
PostPosted: Sun Jul 03, 2005 11:11 am 
Offline
Cacti User

Joined: Thu Mar 24, 2005 3:53 pm
Posts: 383
Location: Ocoee, Florida
Can anyone say how far off Cacti is from supporting other database backends? The only threads I found on this topic where pretty old. There is meantion by Rax in this thread that he is working on it, just wondered if we could get an update? Thanks so much. I plan on migrating to cacti this coming week, so I am trying to figure out if I should keep my Postres stuff separate, or if Cacti may support it, and I could use the Postgres server for everything. Thats again.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 03, 2005 2:26 pm 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5903
Location: Michigan, USA
Cacti only supports mysql at this point.

Version 0.9.1ish, will have multiple database support. Unless we have enough time then it might make it into 0.9.0 release by the end of the year. It is coming, just not in the next major release, but we are making great inroads to supporting it.

Planed database support is: Postgres, MSSql, and Oracle.

Although, we are going to try to make cacti generic enough to use almost any database, we have to limit what we will support.

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject: Thank you!
PostPosted: Sun Jul 03, 2005 2:45 pm 
Offline
Cacti User

Joined: Thu Mar 24, 2005 3:53 pm
Posts: 383
Location: Ocoee, Florida
Thank you very much for getting back to me. I am very happy that support is forthcoming for Postre. I suspect that migrating to from MySQL to Postre my take some doing, but it would be great to only have one database to manage. Thanks again.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: TurnitinBot [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group