[opencms-dev] Can different installations of OpenCms connect to the same db schema?
Achim Westermann
achim.westermann at questico.de
Fri Jan 29 10:26:02 CET 2010
Hi Edwin,
thanks for sharing your way to set up a cluster.
> I think most of you would agree that OCEE is worth to pay for the multiple
> OpenCms scenario. But it meant that you also have to pay for more money on
> DB cluster.
No that is not required. You can use mysql replication as you describe with ocee cluster. So OCEE Cluster is an alternative to the solution
you describe:
> Most of the client using OpenCms is for "Free of Charge" and minimizing the
> cost on frontend. So OCEE is meaningless for them.
>
> In my past project, client wants to have load balancing on the website. So,
> we had 2 MySQL for serving 2 OpenCms instance in 2 machine. Let see my setup
> below.
> 1. One OpenCms and One MySQL is both on the one machine.
> 2. We defined the 2 machines as Master machine and Slave machine.
> 3. Let say OpenCms and MySQL in Master machine be m_OpenCms and m_MySQL. In
> Slave machine, that is s_OpenCms and s_MySQL.
> 4. We set up an one-way replication (it's free!!!) between m_MySQL and
> s_MySQL. The replication direction is "m_MySQL -> s_MySQL".
> 5. m_OpenCms is for authoring and displaying content. s_OpenCms is only for
> displaying content. s_OpenCms is not allowed to login into workplace.
> 6. In MySQL, we created a timetable for store the time of publishing job. If
> user publish contents in m_OpenCms, m_OpenCms will update the table, record
> down the time of publishing job. Then m_MySQL will replicate this
> information to s_MySQL.
>
> Due to the above setup, we have the below treatments regarding to OpenCms
> features.
> 1. Flexcache: We setup a schedule task in s_OpenCms to read the publishing
> job timetable. So if m_OpenCms published content, s_OpenCms will know some
> content is updated and clear the Flexcache.
So time to live on s_OpenCms depends on the polling speed of the scheduled job.
> 2. Search Index: We setup a schedule task and run "Rebuild Index" in
> specific time. Assuming that date and time is in sync in Master and Slave
> machine.
That sounds OK.
> 3. Static Export: At the very beginning, we want it done as Flexcache.
> Following code is for purge the static export folder. But we find that
> sometimes (or very rarely) it cannot export the files again. So we DISABLE
> the static export finally.
That's a pity.
> CmsStaticExportManager manager = OpenCms.getStaticExportManager();
> CmsEvent event = new CmsEvent(I_CmsEventListener.EVENT_UPDATE_EXPORTS,
> null);
> manager.cmsEvent(event);
So one question is: What costs more: OCEE Cluster or the time spent on implementing the above solution.
kind regards,
Achim
More information about the opencms-dev
mailing list