Announcement

  •  » Engine
  •  » Support of Postgresql and SQLite in question

#16 2013-03-10 10:41:13

J. Roeleveld
Guest

Re: Support of Postgresql and SQLite in question

Hi,

I am also interested in getting PostgreSQL support implemented into Piwigo.

I don't have much PHP-coding experience, but I am able to assist in testing, SQL-writing and am willing to commit to this for a long time if others can commit as well.

I am currently using Gallery 2.3.2 as version 3.x has dropped support.

Kind regards,

Joost

 

#17 2013-03-10 11:15:09

nicolas
Former Piwigo Team
2004-12-30
1213

Re: Support of Postgresql and SQLite in question

julienw and I decided to rebuild PostgreSQL support.
We will start by adding unit and functional tests. The idea is to be as much as possible closed to piwigo core.
We will post here as soon we'll have something.

Offline

 

#18 2013-03-10 11:50:13

J. Roeleveld
Guest

Re: Support of Postgresql and SQLite in question

Nicolas,

Feel free to email me directly (Please let me know if you can access my email-address on here) when you get to the stage I can help with testing.

Kind regards,

Joost Roeleveld

 

#19 2013-03-10 11:52:25

nicolas
Former Piwigo Team
2004-12-30
1213

Re: Support of Postgresql and SQLite in question

J. Roeleveld wrote:

Nicolas,

Feel free to email me directly (Please let me know if you can access my email-address on here) when you get to the stage I can help with testing.

Kind regards,

Joost Roeleveld

Yes I see your email. I will let you know. code will be on github but nothing interesting for now.

Offline

 

#20 2013-03-10 11:54:56

roeleveld
Member
2011-01-01
5

Re: Support of Postgresql and SQLite in question

nicolas wrote:

J. Roeleveld wrote:

Nicolas,

Feel free to email me directly (Please let me know if you can access my email-address on here) when you get to the stage I can help with testing.

Kind regards,

Joost Roeleveld

Yes I see your email. I will let you know. code will be on github but nothing interesting for now.

Ok, thank you.
(Forgot I had an account here already ;) )

Offline

 

#21 2014-04-09 05:46:54

Rob McDonell
Guest

Re: Support of Postgresql and SQLite in question

I'm also very interested in Postgres support - in fact if Piwigo can't run on Postgres then I can't use it. I'm willing to help out with PHP and SQL coding and/or testing.

--Rob.

 

#22 2014-05-12 13:36:02

billy88
Member
2014-05-12
11

Re: Support of Postgresql and SQLite in question

I don't understand... why not switch database backend to abstract layer like PDO? That way user is free too choose whatever database engine he wants to use whether is is Postgree, SQLite or MSSQL...

Offline

 

#23 2014-05-12 13:37:25

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13548

Re: Support of Postgresql and SQLite in question

billy88 wrote:

I don't understand... why not switch database backend to abstract layer like PDO? That way user is free too choose whatever database engine he wants to use whether is is Postgree, SQLite or MSSQL...

Explanation is given on [Forum, post 124245 by plg in topic 18008] Support of Postgresql and SQLite in question. It is not as simple as using an abstract layer.

Offline

 

#24 2014-05-12 13:39:21

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Support of Postgresql and SQLite in question

It has already been said : all engines are not equivalents
We use ON DUPLICATE KEY UPDATE and SQL_CALC_FOUND_ROWS which only exist on MySQL

Even with PDO, it won't work with other engines

Offline

 

#25 2014-05-12 22:05:55

nicolas
Former Piwigo Team
2004-12-30
1213

Re: Support of Postgresql and SQLite in question

mistic100 wrote:

It has already been said : all engines are not equivalents
We use ON DUPLICATE KEY UPDATE and SQL_CALC_FOUND_ROWS which only exist on MySQL

Or insert ignore. But using proprietary extensions in a first step and after saying it's not easy to make sql code for several database engine is a bit strange.

Even with PDO, it won't work with other engines

Exactly. PDO is not a magic solution. But with PDO you are not limited by the number of database engine you can supported. PDO make the abstraction work.

Offline

 

#26 2014-05-13 10:26:22

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13548

Re: Support of Postgresql and SQLite in question

nicolas wrote:

mistic100 wrote:

It has already been said : all engines are not equivalents
We use ON DUPLICATE KEY UPDATE and SQL_CALC_FOUND_ROWS which only exist on MySQL

Or insert ignore. But using proprietary extensions in a first step and after saying it's not easy to make sql code for several database engine is a bit strange.

We can use these MySQL specific command because we have decided to focus on MySQL. It is more a consequence than a cause.

I don't think it's useful to have this debate one more time. The problems described on [Forum, post 124245 by plg in topic 18008] Support of Postgresql and SQLite in question are still here today.

I would even say that today, being compatible with other database engines has even "less" importance because MariaDB is a drop-in replacement of MySQL (and it works fine with Piwigo).

Offline

 

#27 2014-05-13 11:22:17

billy88
Member
2014-05-12
11

Re: Support of Postgresql and SQLite in question

mistic100 wrote:

It has already been said : all engines are not equivalents
We use ON DUPLICATE KEY UPDATE and SQL_CALC_FOUND_ROWS which only exist on MySQL

Even with PDO, it won't work with other engines

Ok, I understand. I suspected that similar issue might be a problem.

Offline

 

#28 2015-03-05 17:25:13

INTEGRATIONIST
Member
2014-02-24
16

Re: Support of Postgresql and SQLite in question

This is a remarkable discussion and might be seen as a very painful decision for many, especially if there was already some work done for abstraction. It is, however, a very good example for younger developers of the problems they will run into if they make wrong decisions too early, I will mark this thread as something to read for my students.

What is wrong, what is right?

It is not about the features of a product you are supporting compared to another product, in this case databases. It is about making a decision that enables or disables possibilities and options. In this case, the Piwigo team decided to not open the future development for other database options, maybe things that are not very clear to see right now. Instead they closed the door for many interesting developments by binding themselves to one single product, trapping exactly in that honeypot that database vendors are building just for you, the developer - use our special features, and never ever get your product away from us! An almost classic example of the dangers of wrong decisions.

Of course, the wrong decision has been made a long time ago, when piwigo started with the limited "LAMP" mindset we know from many early days web developers - many people did it.

But many people have understood the problems of such a product and feature lock-in and invested in changing their application data storage layer into something product agnostic - in the long term a really good investment, because maybe in a few years you will be able to follow completely different data storage paradigms, especially if your application needs to scale or simply because the landscape changes. Examples: cloud storage - hey, would be nice to plugin some cloud storage provider, well, no way with a fixed storage layer. Scaling? Performance? Would like to use some distributed Key-Value store? CouchDB with mobile client sync?  No way, Piwigo developers to stay in the MySQL corner forever.

Of course it will never be easy to change the data storage layer of an application, but the longer you wait, the more problems you will have.

Of course Piwigo is still a nice product for your personal gallery, but then, of course, you will ask yourself: why do I need that complicated database at all, why can I not simply use a sqlite storage so I can copy the whole thing easily to my Raspi and have very easy backups?

You see, an option-cutting decision disables interesting developments in any direction, not only in the direction if getting bigger, but also in the opposite of getting smaller...

To answer the above question: following a way where you have no options anymore is always a wrong decision.If in doubt, do the right thing and keep as many options as possible.

Offline

 

#29 2015-03-05 17:53:19

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13548

Re: Support of Postgresql and SQLite in question

Interesting "point of view" ;-) but in my opinion what I wrote in the first post is still valuable today. Your point of view is "technical" but that's not my main point. The multiple database support was not "adopted" by code contributors. It implies too much work for too little interest from users and contributors. That is *highly* important.

Offline

 

#30 2015-03-06 13:14:16

xbgmsharp
Member
1970-01-01
215

Re: Support of Postgresql and SQLite in question

My point of view. More database support would help PWG popularity.
Having a great database abstraction layer would make it easier plugins.
It would avoid dirty unsecured SQL query in plugins.
It would allow to implement Memcached support as refer here, http://piwigo.org/forum/viewtopic.php?id=23162
Most Open Source web application support multiple database.

I also agree it is a very important change and it will require a lot of work and would break a lot of plugins.
Agree it will be complex but i do think it would help the project.

Even if some specific MySQL function does not exist, there is available workaround, not always easy but technically possible.
http://www.postgresql.org/message-id/27 … .gmail.com
http://www.postgresql.org/message-id/11 … lfix.co.uk

MySQL vs MariaDB is also a concern for the very long term.
https://mariadb.com/kb/en/mariadb/maria … atibility/

Other database could be only community support. There can be different model.
However a clean refresh might not be that bad.
Would be nice to consider it for a long run.

Offline

 
  •  » Engine
  •  » Support of Postgresql and SQLite in question

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact