Cyclos 4 PRO platform

Here you can put ideas for new functionalities and improvements.

Moderators: hugo, alexandre, rmvanarkel

Post Reply
cycloshost
Posts: 578
Joined: Mon Jan 30, 2012 8:12 am
Contact:

Cyclos 4 PRO platform

Post by cycloshost »

Hi, which platforms will support Cyclos 4 Pro?

Tomcat 7 and 8? Glassfish? We were testing this morning Cyclos 3 on Tomcat 8 but does not work.
cycloshost.com
Cyclos administration and hosting
admin
Site Admin
Posts: 1423
Joined: Mon Jan 24, 2005 10:31 am

Re: Cyclos 4 PRO platform

Post by admin »

Hi,
We did not test Cyclos3 with Tomcat8 yet. In due time we will support that. But we cannot give an estimation.
The objective is that Cyclos4 will support Glassfish (webcontainer) and Tomcat 8. At this moment it has not been tested yet. When Cyclos 4 PRO comes out we will provide information about the supported platforms.
cycloshost
Posts: 578
Joined: Mon Jan 30, 2012 8:12 am
Contact:

Re: Cyclos 4 PRO platform

Post by cycloshost »

We forgot to ask about the database platform, will be only MySQL supported in Cyclos 4?

For many projects, high availability is a must. We had very good experiences with the cluster system in Cyclos 3 (both tomcat and database), how is this going to be resolved in 4?
cycloshost.com
Cyclos administration and hosting
admin
Site Admin
Posts: 1423
Joined: Mon Jan 24, 2005 10:31 am

Re: Cyclos 4 PRO platform

Post by admin »

Hi,

In the previous answer I was referred to Cyclos3, but it was with Cyclos4 that we did not tested tomcat8.

About the database. We switched for Cyclos4 to the Postgres database. Cyclos will support full clustering. More information will be made available after Cyclos4 PRO is released.
cycloshost
Posts: 578
Joined: Mon Jan 30, 2012 8:12 am
Contact:

Re: Cyclos 4 PRO platform

Post by cycloshost »

Hi,

now that Cyclos 4 PRO is released, we want to ask if is it safe to install it on Tomcat 8 or Glassfish. In the installation instructions we see only the Tomcat 7 option.

Is it supporting tomcat-clustering? And database clustering? We are taking a closer look at DRBD, Slony and Bucardo.

Thanks!
cycloshost.com
Cyclos administration and hosting
luis
Posts: 192
Joined: Fri Feb 17, 2006 11:01 am

Re: Cyclos 4 PRO platform

Post by luis »

Hi.
We have tested Cyclos 4 in Tomcat 8 and it works. We haven't tested on Glassfish. What could bring problems is changing the data source to use an application server managed datasource, instead of using c3p0 (the default choice, which manages connections internally). However, as it is just a web application, it should work.

Cyclos 4 supports clustering, but the container doesn't even need to know about it.
The HTTP session is not used - user sessions are stored in the database, and (like in Cyclos 3), hazelcast is used to synchronize the cluster state. It is even possible to cluster heterogeneous servers (tomcat, glassfish, etc), as long as they connect to the same database.
We'll later on add documentation on how to configure clustering, but just setting a property should do it: cyclos.clusterHandler = hazelcast
Then, tweaks can be done in the WEB-INF/classes/hazelcast.xml file.
As always, just make sure that the entire cluster has a synchronized clock (for example, using NTP).

Regarding database cluster, we've investigated some options.
For the moment we've just configured a replicated Postgresql, and used heartbeat to access the actual master database.
Be aware that slony and bucardo use just replication (asynchronous).
This could mean that writing a payment to one node and instantly doing a payment in another node might not take the first one into account yet, making the balance to go negative.
Luis Fernando Planella Gonzalez
Cyclos development team
cycloshost
Posts: 578
Joined: Mon Jan 30, 2012 8:12 am
Contact:

Re: Cyclos 4 PRO platform

Post by cycloshost »

Hi,

we have tested also Cyclos 4 PRO in Tomcat 8 and it works. About tomcat clustering, good to know that we do not have to configure the cluster in Tomcat, we tried to do so and got errors. Just configuring cyclos.clusterHandler = hazelcast works fine.

OK, about the db clustering, we (and probably most of the projects) will need a synchronous option because of the reason that you say:
This could mean that writing a payment to one node and instantly doing a payment in another node might not take the first one into account yet, making the balance to go negative.
Please advise when you have a db cluster option ready. Our favorite would be Galera, which was working very good for MySQL and Cyclos 3 but unfortunately is not yet available for PostgreSQL:
http://codership.com/products/postgresql_galera
cycloshost.com
Cyclos administration and hosting
luis
Posts: 192
Joined: Fri Feb 17, 2006 11:01 am

Re: Cyclos 4 PRO platform

Post by luis »

An option for database clustering is Postgres-XC.
There is a tutorial here on making it work with PostGIS: http://www.stormdb.com/content/enabling ... ostgres-xc

Another option is Pgpool-II http://wiki.postgresql.org/wiki/Pgpool-II.

However, we haven't attempted any of those so far.
Luis Fernando Planella Gonzalez
Cyclos development team
cycloshost
Posts: 578
Joined: Mon Jan 30, 2012 8:12 am
Contact:

Re: Cyclos 4 PRO platform

Post by cycloshost »

Postgres-XC seems a good option. StormDB is also providing RPMs for v1.1
http://yum.stormdb.com/repos/Postgres-XC/

When do you plan to work on this? We do not know if is best to wait until you come up with a solution or start trying to configure it. The setup and operation of Postgres-XC seems to be quite challenging...
cycloshost.com
Cyclos administration and hosting
luis
Posts: 192
Joined: Fri Feb 17, 2006 11:01 am

Re: Cyclos 4 PRO platform

Post by luis »

cycloshost wrote:When do you plan to work on this? We do not know if is best to wait until you come up with a solution or start trying to configure it. The setup and operation of Postgres-XC seems to be quite challenging...
Yes, it is challenging, as there are 3 types of nodes involved.
I don't think there are concrete plans for us to get deeper into it, as we don't need a DB cluster yet for projects we manage (HA with replication is enough for now).
I can't say when we'll look into it. If you have plans to deploy a cluster in the short-term, it would be nice if you could research it.

Keep in mind that, according to the link in my previous post, Postgres-XC needs to be patched in order to work with PostGIS. In that sense, maybe Pgpool-II is an easier approach, but, again, I haven't worked with any of those so far.
Luis Fernando Planella Gonzalez
Cyclos development team
nroo
Posts: 3
Joined: Thu Oct 30, 2014 10:11 pm

Re: Cyclos 4 PRO platform

Post by nroo »

This could be a good option for DB failover: http://docs.aws.amazon.com/AmazonRDS/la ... ltiAZ.html
It can be combined with Load Balancing in front of two Application Servers.
nroo
cycloshost
Posts: 578
Joined: Mon Jan 30, 2012 8:12 am
Contact:

Re: Cyclos 4 PRO platform

Post by cycloshost »

Hi Luis, i would like to open this old thread.

How is the current state of Cyclos 4.5 and Glassfish? Is it tested?

About db clustering and POSTgres, are there news?

And is it possible like nroo said to have live uopdates of the db in Amazon RDS?

Thanks!
cycloshost.com
Cyclos administration and hosting
luis
Posts: 192
Joined: Fri Feb 17, 2006 11:01 am

Re: Cyclos 4 PRO platform

Post by luis »

Hi.
Unfortunately we have no news in neither questions: we only use Tomcat (8) in production, and in our projects we're using a replicated PostgreSQL.
Even some large clients we have are satisfied with just replication, so I think it would be needed an stellar number of concurrent users to start having problems with the database.
In a load test we conducted here, we used up to 6 tomcat nodes and a single DB node.
Regarding the Amazon RDS, it states support for PostgreSQL 9.4, and PostGIS, so Cyclos should work out-of-the-box with it.
Another interesting topic to reduce the load on DB is to use a distinct storage mechanism for files (images and so on), instead of storing them in the DB itself. Out of the box there are implementations for storing as files in a directory (and a solution like GlusterFS could be used for scaling and replication) and Amazon S3. See http://documentation.cyclos.org/4.5/cyc ... tml#d0e552 for more details.
Luis Fernando Planella Gonzalez
Cyclos development team
cycloshost
Posts: 578
Joined: Mon Jan 30, 2012 8:12 am
Contact:

Re: Cyclos 4 PRO platform

Post by cycloshost »

HI,
thanks for the reply, we saw the new option of storing in S3 and were wondering how it works. There is a storage migrator:

Code: Select all

cd <TOMCAT_DIR>/webapps/cyclos
java -cp "WEB-INF/classes:../../lib/*:WEB-INF/lib/*" org.cyclos.impl.storage.utils.StoredFileContentMigrator
I understand it is possible to change the storage type only with this utility, not just by changing the properties file and restarting tomcat, is this so?

Is this utility working smoothly also when changing again from S3 to database back or to local dir? If the utility is stable, we would give it a try.
cycloshost.com
Cyclos administration and hosting
luis
Posts: 192
Joined: Fri Feb 17, 2006 11:01 am

Re: Cyclos 4 PRO platform

Post by luis »

As usual, a full database backup is recommended before migrating. And,of course, Cyclos needs to be stopped during the migration.
The tool should be stable. We've migrated some of our existing instances to file storage. Also, some clients have migrated to S3.

Depending on the amount of existing images, it could take a long time to upload all files to S3.
The same for returning to DB storage, if needed.
You could try with a database backup first, to see how long it takes, then start an alternative Cyclos pointing to that DB to test.

[edit] You asked if just by changing the properties would be sufficient: the answer is no, because the DB would be inconsistent, as it will likely contain images in the wrong format.
Luis Fernando Planella Gonzalez
Cyclos development team
Post Reply