Foros de discusión

[ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

thumbnail
Juan Gonzalez, modificado hace 6 años.

[ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
Hi community!

As you know, GA5 was released this week with cluster support.

This cluster support is limited to EhCache RMI replication. RMI is known to not scale well when increasing the number of cluster nodes. It creates more threads when adding more nodes to the cluster. They can cause server nodes to decrease its performance and even to crash.

So, I made the needed changes from Liferay 7 CE GA5 sources to change RMI to JGroups. Before writing where the source code is, just wanted to describe some important points in order for it to work:

1- You should compile portal (ant all).
2- There are two new properties that can be configured for JGroups in portal-ext.properties:
ehcache.jgroups.peer.provider.factory.class=net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory
ehcache.jgroups.peer.provider.factory.properties=UDP(mcast_addr=${multicast.group.address["multi-vm"]};mcast_port=${multicast.group.port["multi-vm"]};):PING:MERGE2:FD_SOCK:VERIFY_SUSPECT:pbcast.NAKACK:UNICAST:pbcast.STABLE:FRAG:pbcast.GMS


3-Before starting up portal you should create a file with this name:
com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration.cfg

in <LIFERAY>/osgi/configs directory with this content:
blacklistBundleSymbolicNames=com.liferay.portal.cache.single,com.liferay.portal.cluster.single,com.liferay.portal.scheduler.single


4-Now you can startup Liferay 7 and enjoy JGroups clustering.

You can get the source code in my github tree. As you can see, it's only 1 additional commit regarding base 7 GA5:

https://github.com/juangon/liferay-portal/tree/7.0.4-ga5-cluster-jgroups

If you use command line, just clone juangon/liferay-portal and fetch 7.0.4-ga5-cluster-jgroups branch.

Hope you like it!
thumbnail
Antonio Musarra, modificado hace 6 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Junior Member Mensajes: 66 Fecha de incorporación: 9/08/11 Mensajes recientes
Hi Juan.
A very good job. I've done the build of the project in the next few days I'll see a test.
Right now I have published a Docker Compose project on the my GitHub repository to pull on a sample cluster.

See you soon.
thumbnail
Juan Gonzalez, modificado hace 6 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
Thanks Antonio. Waiting for your feedback.

I think I am going to publish this as a Marketplace app so everyone can use it without touching code.
David W., modificado hace 6 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Junior Member Mensajes: 45 Fecha de incorporación: 4/04/06 Mensajes recientes
Juan Gonzalez:
Thanks Antonio. Waiting for your feedback.

I think I am going to publish this as a Marketplace app so everyone can use it without touching code.


Hi Juan:
Any chance to publish this to Marketplace? Awesome work, btw.

Thanks!
David
thumbnail
Juan Gonzalez, modificado hace 6 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
David W.:
Juan Gonzalez:
Thanks Antonio. Waiting for your feedback.

I think I am going to publish this as a Marketplace app so everyone can use it without touching code.


Hi Juan:
Any chance to publish this to Marketplace? Awesome work, btw.

Thanks!
David


Thanks David.
Publishing into Marketplace would require more work as I would have to change all custom packages instead of changing existing classes.

What I should have soon are some replacement jar files to drop into 7 GA5, restart and have it working.
thumbnail
Chris Huff, modificado hace 6 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Junior Member Mensajes: 25 Fecha de incorporación: 14/04/11 Mensajes recientes
Juan,

I've got a small project that I need to dive into this. So there's JGroup code in the GA5 from LR, is it not using it? or not using it well? Just curious a little over the differences between their JGroups code and your branch. I'm prob going to take a deep dive to examine in more detail, but I'd like to get your take on it, if you can :-)

Thanks,
Chris H.
thumbnail
Juan Gonzalez, modificado hace 6 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
Hi Chris.

Chris Huff:
Juan,

I've got a small project that I need to dive into this. So there's JGroup code in the GA5 from LR, is it not using it? or not using it well? Just curious a little over the differences between their JGroups code and your branch. I'm prob going to take a deep dive to examine in more detail, but I'd like to get your take on it, if you can :-)

Thanks,
Chris H.


Why do you state that there is JGroups code from Liferay 7 GA5? Can you point me to that source please?

Thanks.
thumbnail
Chris Huff, modificado hace 6 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Junior Member Mensajes: 25 Fecha de incorporación: 14/04/11 Mensajes recientes
So I saw jgroups in the GA5 code under portal-cluster-mutiple.
https://github.com/liferay/liferay-portal/tree/master/modules/apps/foundation/portal/portal-cluster-multiple/src/main/java/com/liferay/portal/cluster/multiple/internal/jgroups

But after looking at it a bit more, it looks like most of the changes you made are in portal-cache-ehcache-multiple and portal-cache-ehcache-provider. GA5 for the ehcache looks like it uses RMI.
thumbnail
Chris Huff, modificado hace 5 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Junior Member Mensajes: 25 Fecha de incorporación: 14/04/11 Mensajes recientes
Juan,

Just a quick question on the jgroups branch. It looks like your last check in was in Aug 2017. The GA5 release was in Oct 2017 and the GA6 in Mar 2018. So, I was wondering if any updates are needed, or if we need a new tag/merge to run jgroups on GA6? Since your commit is based on 7.0.x, I suppose the only risk would be if any conflicts were introduced in GA5 or GA6 specifically affecting your changes. I haven't taken a look at it yet in that detail, and was wondering if you had a chance to do so :-)

Thank s.

-Chris
thumbnail
Juan Gonzalez, modificado hace 5 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
Chris Huff:
Juan,

Just a quick question on the jgroups branch. It looks like your last check in was in Aug 2017. The GA5 release was in Oct 2017 and the GA6 in Mar 2018. So, I was wondering if any updates are needed, or if we need a new tag/merge to run jgroups on GA6? Since your commit is based on 7.0.x, I suppose the only risk would be if any conflicts were introduced in GA5 or GA6 specifically affecting your changes. I haven't taken a look at it yet in that detail, and was wondering if you had a chance to do so :-)

Thank s.

-Chris


Hi Chris. Didn't have time to check this as I 've been busy with other side projects. Now it seems finished so I hope to get back to this for source on GA6 and GA7
Sebastian Bayerlein, modificado hace 5 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

New Member Mensajes: 19 Fecha de incorporación: 13/11/07 Mensajes recientes
Hello Juan,

Do you already have such jar files? I'm using Liferay 7 CE GA6 and want to integrate your solution. How can I do this? I already built the portal from your sources. Can you please tell me, what's the next step?

Regards,
Sebastian
thumbnail
Juan Gonzalez, modificado hace 5 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
Sebastian Bayerlein:
Hello Juan,

Do you already have such jar files? I'm using Liferay 7 CE GA6 and want to integrate your solution. How can I do this? I already built the portal from your sources. Can you please tell me, what's the next step?

Regards,
Sebastian


It depends if affected source files had changed from GA5 to GA6. I hope to get back to this pretty soon.
Sebastian Bayerlein, modificado hace 5 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

New Member Mensajes: 19 Fecha de incorporación: 13/11/07 Mensajes recientes
Thank you! So at the moment, there is no possibility to use Liferay Portal 7 CE GA6 with JGroups cluster support, right?
thumbnail
Juan Gonzalez, modificado hace 5 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
Sebastian Bayerlein:
Thank you! So at the moment, there is no possibility to use Liferay Portal 7 CE GA6 with JGroups cluster support, right?


Not sure. It depends as I said. If there are no changes between versions maybe just drop in the affected compiled jar files could work but still couldn't check this.
Sebastian Bayerlein, modificado hace 5 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

New Member Mensajes: 19 Fecha de incorporación: 13/11/07 Mensajes recientes
OK, thanks. Which one is the affected JAR file? I couldn't find the classes.
Gromek Gromek, modificado hace 5 años.

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

New Member Mensajes: 8 Fecha de incorporación: 31/10/18 Mensajes recientes

RE: [ANNOUNCEMENT] Liferay Portal 7 CE GA5 with JGroups cluster support

 

I've made the changes you published and built the modules (The liferay version is 7.0 GA7):

com.liferay.portal.cache.ehcache.jar
com.liferay.portal.scheduler.multiple.jar
com.liferay.portal.cache.ehcache.provider.jar
com.liferay.portal.cluster.multiple.jar
com.liferay.portal.cache.ehcache.multiple.jar

But I get the following error:

ERROR [Framework Event Dispatcher: Equinox Container: 3048b47a-69e6-0018-1083-de4dfc13fb2e][com_liferay_portal_cache_ehcache:97] FrameworkEvent ERROR 
org.osgi.framework.BundleException: Could not resolve module: com.liferay.portal.cache.ehcache [45]_  Unresolved requirement: Import-Package: com.liferay.portal.kernel.cache; version="[7.2.0,8.0.0)"_ [Sanitized]
    at org.eclipse.osgi.container.Module.start(Module.java:429)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)


Do you have any idea?
Thank you.