[play-2.4.6] [java] java-ebean plugin for eban 7.9.1 upwards

176 vues
Accéder directement au premier message non lu

Suraj Mundada

non lue,
10 mai 2016, 13:01:5310/05/2016
à play-framework
Hi,

I want to use Ebean 7.9.1 or higher version to take advantage of Apache Ignite caching support added to ebean 7.9.1.

Current play-eban plugin version is supporting ebean 7.6.1 (https://github.com/playframework/play-ebean/blob/master/build.sbt)

Any idea when play-ebean plugin will support ebean 7.9.1 or higher version? 

Regards,
Suraj

Peace MICHAELS

non lue,
10 mai 2016, 18:50:4710/05/2016
à play-framework
upgrade to play 2.5.x and play-ebean 3.0.0 and you are good to go

Suraj Mundada

non lue,
11 mai 2016, 06:21:5511/05/2016
à play-framework
Thanks.

Suraj Mundada

non lue,
24 mai 2016, 10:00:3124/05/2016
à play-framework
Hi Michaels,

Do you have working example of play-ebean 3.0.0 and using Apache Ignite for L2/L3 caching? 

I am trying to get it working. But not able to configure it correctly. Also posted it on group here:


Not able to get a breakthrough. 

Any ideas? 

Suraj

Suraj Mundada

non lue,
27 mai 2016, 02:10:5627/05/2016
à play-framework

Hey Guys,

Any pointer on this? I am not able to resolve this issue and move forward on using ebean plugin 3.0.0 and Apache Ignite as L2/L3 cache.

Regards,
Suraj
Le message a été supprimé

Peace MICHAELS

non lue,
27 mai 2016, 20:57:3627/05/2016
à play-framework
Hello Suraj, i tried out the Ebean Apache Ignite integration and it worked, using play 2.5.3. Add these to the library dependencies in build.sbt of your project:

"org.avaje.ebeanorm"    %  "avaje-ebeanorm"        % "7.11.4",
  "org.avaje.ebeanorm"    %  "avaje-ebeanorm-ignite"        % "1.2.1",
  "org.avaje.ebeanorm" % "avaje-ebeanorm-agent" % "4.10.1"

then annotate your entity classes with  com.avaje.ebean.annotation.Cache. It should work without problems

Suraj Mundada

non lue,
30 mai 2016, 14:29:1330/05/2016
à play-framework
Thanks Michaels. It worked for me. I enabled following loggers in my logback.xml

<logger name="org.avaje.ebean.cache.QUERY" level="DEBUG"/>
<logger name="org.avaje.ebean.cache.BEAN" level="DEBUG"/>
<logger name="org.avaje.ebean.cache.COLL" level="DEBUG"/>
<logger name="org.avaje.ebean.cache.NATKEY" level="DEBUG"/>

Logs shows that entity beans that I retrieve first time are put in cache. When retrieved again, I can not see sql query fired on DB. Meaning it must be retrieved from cache.

However, I got following warning:

 Class "com.avaje.ebeaninternal.server.cache.CachedBeanData" cannot be written in binary format because it either implements Externalizable interface or have writeObject/readObject methods. Please ensure that all nodes have this class in classpath. To enable binary serialization either implement Binarylizable interface 

ignite-core-1.5.0.final.jar containing Binarylizable.class is available in .ivy2 folder. However, it is not on build path. So, I can not implement this class on my entity. Can this be ignored?

Next, I want to test Clustered Ignite cache. I want to test cluster of 2 ignite server instances. Docs (http://apacheignite.gridgain.org/docs/cluster-config) says it is auto-discovered using TcpDiscoverySpiDoes that mean I can simply start my play+ebean+ignite application on 2 servers in my n/w and ignite client will auto discover both the ignite server instance?

Also, which deployment mode (private/isolated/shared etc) I should choose?

Thanks again.

Suraj

 

Suraj Mundada

non lue,
31 mai 2016, 12:55:2731/05/2016
à play-framework
Sorry to push on this. But can you please help with some pointers on clustering? 

I want to complete this POC and use it in my production application. 

Also want to document and publish our discussion with code sample for developers who might be interested in Play + Ebean + Ignite.

Suraj Mundada

non lue,
2 juin 2016, 06:14:0402/06/2016
à play-framework
I looked at https://apacheignite.readme.io/docs/cluster-config which tells how cluster can be configured. According to docs, Ignite, nodes can discover each other by using DiscoverySpi.

XML configuration for Multicast Based Discovery is as below:
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
  ...
 
<property name="discoverySpi">
   
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
     
<property name="ipFinder">
       
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
         
<property name="multicastGroup" value="228.10.10.157"/>
       
</bean>
     
</property>
   
</bean>
 
</property>
</bean>
 
Where do I add this xml configuration in my play application? Should I create a new conf file or add it to one of existing conf files?

Also, what does <property name="multicastGroup" value="228.10.10.157"/> indicate? Does it indicate IP address of multicast sender?

Regards,
Suraj


Peace MICHAELS

non lue,
2 juin 2016, 09:28:1002/06/2016
à play-fr...@googlegroups.com
i think that should go in the root of the project. It would probably
be sometime during the weekend before i can test this out.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "play-framework" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/play-framework/3GKMEnUzxrw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> play-framewor...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/play-framework/c309a9e9-c5da-4127-9894-ca7c90593821%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Peace MICHAELS

non lue,
2 juin 2016, 09:32:1802/06/2016
à play-fr...@googlegroups.com

Suraj Mundada

non lue,
6 juin 2016, 04:20:4206/06/2016
à play-framework
I looked at ebean-ignite-config.xml and node1-ebean.properties given in the examples. However, I guess both files don't handle clustering. 

Regards,
Suraj

Suraj Mundada

non lue,
8 juin 2016, 02:54:3908/06/2016
à play-framework
Any ideas?
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message