Request for support for PostgreSQL DB

Ondrej Janicko Posted in General Discussion 7 years ago

Hi,

I would like to request for PostgreSQL DB support for OSSN.

It will be great that OSSN would run in future also on PostgreSQL.

Thanks.

Replies
Slovak Ondrej Janicko Replied 7 years ago

Thanks for quick answer.

Yes, this is what I thinked also that what is needed is only to edit OssnDatabase.php class and CREATE TABLE rutin.

So, it seems simply.

I wanted only coordinate my work with yours and to know if you do not have such plans.

I was thinking that also other admins of OSSN can benefit with official PostgreSQL support for OSSN and maybe someone will also want to create cluster like PostgreSQL cluster.

OK. Thanks.

Indonesian Arsalan Shah Replied 7 years ago

Hi, We currently have no plan to provide extra library for PostgreSQL, however if you wanted to use PostgreSQL and you have any php developer, you'll need to simply edit OssnDatabase.php and change mysqli methods to PostgreSQL object methods. I think you'll not need to change alot of things to work with PostgreSQL as you'll only need to OssnDatabase.php class.

Slovak Ondrej Janicko Replied 7 years ago

Can someone from OSSN core team answer for my suggestions about OSSN core team plans in direction of clustering of OSSN and another database support?

Will OSSN core team implement PostgreSQL support to OSSN?

I will be patient and waiting for your answer, but we have to make decision in our project in near future that I give you a time to answer and also for us.

Thanks.

Slovak Ondrej Janicko Replied 7 years ago

I checked CrateDB documentation and discover that in CrateDB does not exist autoincrement option for database tables.

So, for that reason combining OSSN and CrateDB as distribute databse is impossible.

Slovak Ondrej Janicko Replied 7 years ago

Now exist MySQL migration tool to CrateDB.

https://crate.io/a/move-data-mysql-cratedb-shinkansen/

It is good news for OSSN clustering.

If OSSN team could check if is CrateDB suitable for OSSN and wanted to implement OSSN CrateDB cluster it should be the best solution!

Easy and compact install procedure.

Slovak Ondrej Janicko Replied 7 years ago

Well, I am now in planning phase of new social network and I would like to use OSSN. We are talking about more than 10K users and after a several years we expect around 100K users. I would like have social network configured as cluster from begining. So, if you as the authors of OSSN will not moving to this direction in appropriate time of 1 year, I am planning and prepare to do cluster for OSSN by myself. I briefly checked your php code and was happy that it has good architecture to make support for another database. I was checking and testing for that reason also CrateDB SQL distrubuted database to make it running with OSSN but CrateDB has SQL language limitation and I do not know now if it is suitable for OSSN SQL queries and table schema. CrateDB is easily configured, managed and scaled so it should be good choice if it can run under OSSN. I have to check it again more deeply.

Other option more realistic for now from my point of view it seems to build PostgreSQL cluster with Citus extension. This PostgreSQL cluster with Citus is also easy to configure, manage and scale. MySQL and PostgreSQL have similar features and capatibilities so is easy to transfer OSSN from MySQL to PostgreSQL.
For conversion between MySQL and PostgreSQL database table schemas exist automated tools, so it seems no problem. Only to check the SQL queries in OSSN code.

I would be happy if OSSN support of PostgreSQL should exist officialy from authors of OSSN and that it would be easies to create PostgreSQL cluster. If you will not to do it by yourself I plan and think to try do it myself. I know that it is no so easy and trivial to make install procedure for PostgreSQL cluster with Citus, because there are need tree steps: 1. create empty database tables 2. distribute database tables in Citus 3. insert initial data to tables, so it will be no easy install as it is in current OSSN, but install procedure for single PostgreSQL database withouth distributed Citus extension should be for you easy.

I would be happy if you can disclosure yours plans with OSSN in this direction of clustering and support of others databases.

I wish you happy day.

German Michael Zülsdorff Replied 7 years ago

Thanks for the information, Ondrej.

Where is your site? About how many members are we talking?

Slovak Ondrej Janicko Replied 7 years ago

I checked the MySQl pages about InnoDB cluster and was dissapointed that the InnoDB cluster do only replication of database not sharding.

So, for sharding and making big datasets is MySQL InnoDB cluster useless.

There for my request for PostgreSQL support to make PostgreSQL cluster is actual again.

Slovak Ondrej Janicko Replied 7 years ago

Today I checked MySQL pages and discovered that is new InnoDB storage engine cluster for MySQL.

I was chceking MySQL cluster two months ago and there was only NDB storage engine for MySQL cluster avaiable.

So, my previous post about limitations of the storage engine was about NDB storage engine.

Now I have to check new InnoDB storage engine MySQL cluster.

Is it possible to rewrite OSSN from MyISAM storage engine to InnoDB storage engine for reason of making cluster ? These engines are similar more than to NDB storage engine.