Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate HazelCast instead of Ehcache #30

Closed
jdubois opened this issue Nov 25, 2013 · 12 comments
Closed

Evaluate HazelCast instead of Ehcache #30

jdubois opened this issue Nov 25, 2013 · 12 comments
Assignees
Milestone

Comments

@jdubois
Copy link
Member

jdubois commented Nov 25, 2013

Evaluate HazelCast as a replacement for Ehcache:

https://github.com/hazelcast/hazelcast/

PROs:

  • Ehcache isn't actively developped anymore (as told by the Software AG sales rep)
  • Looks easier to have a distributed cache
  • Only way to have HTTP session clustering, without a dependancy on the app server
  • Cluster affinity & distributed execution queue -> does it work well with the @scheduled annotations from Spring?

CONs:

  • Last time I tried to use it, it didn't work with Hibernate 4 (not implemented yet!)
  • Far less popular than Ehcache, and one of our aims is to have a project using "commonly used" technologies

Maybe this could be a new question in the Yeoman script? For instance:

  • Do you want to use a cache?
  1. No
  2. Yes, with ehcache (simple Hibernate 2nd level cache, no clustering)
  3. Yes, with HazelCast (distributed Hibernate 2nd level cache and distributed HTTP sessions)
@jmirc
Copy link
Member

jmirc commented Dec 6, 2013

There is a beta support for Hibernate 4.0 (https://github.com/hazelcast/hazelcast-hibernate4) and the last commit was 10 months ago. Should not be used in production.

@jmirc
Copy link
Member

jmirc commented Dec 6, 2013

This project (https://github.com/data4j/DATA4J_Spring_Hazelcast_MapLoader) uses hibernate 4 and it doesn't complain on the hibernate 4. I will try it.

@jmirc
Copy link
Member

jmirc commented Dec 6, 2013

@jdubois
Copy link
Member Author

jdubois commented Dec 6, 2013

Great!

Be careful, I am refactoring the database configuration to go XML-less and change the connexion pool: I don't think there is much impact for you, and I will certainly commit this very soon.

Concerning HazelCast, we should put it as an option in the Yeoman script, because this can have a huge impact. At the moment I'm thinking of 2 questions, in fact:

  • Do you want to use Hibernate 2nd level cache?
  1. No
  2. Yes, with ehcache (local cache, for a single node)
  3. Yes, with HazelCast (distributed cache, for multiple nodes) -> default option
  • Do you want to use clustered HTTP sessions?
  1. No
  2. Yes, with HazelCast -> default option

Are you OK with it?

@jmirc
Copy link
Member

jmirc commented Dec 6, 2013

Yes. I will do it.

@jdubois
Copy link
Member Author

jdubois commented Dec 6, 2013

Great! I'll affect you this ticket. Keep me updated :-)

@ghost ghost assigned jmirc Dec 6, 2013
@jmirc
Copy link
Member

jmirc commented Dec 7, 2013

Actually I deactivated the GZip filter which is available with ehcache when HazelCast is selected.
I will find a workaround later. Do you have another alternative when ehcache is not used?

@jdubois
Copy link
Member Author

jdubois commented Dec 8, 2013

I had forgotten about this... 1 or 2 years ago I spent a lot of time to find a good GZip filter, and it's the only one I had found.
I'll have a look again... Otherwise this could be another filter provided by JHipster, it's not a very complex piece of code.

@nikosk
Copy link

nikosk commented Dec 8, 2013

@jdubois You could take a look at this project : https://github.com/nbartels/pjl-comp-filter . I've been using this filter in production for 3-4 years now and never had a problem.

@jdubois
Copy link
Member Author

jdubois commented Dec 8, 2013

Thanks! It doesn't look widely used, but it seems to do the job. And it's available on the Maven Central Repo:

http://search.maven.org/#artifactdetails%7Cnet.sourceforge.pjl-comp-filter%7Cpjl-comp-filter%7C1.7%7Cjar

@nikosk
Copy link

nikosk commented Dec 8, 2013

The github page might be misleading. It's an ancient project, originally hosted on sourceforge, so the code has seen quite a bit of use over the years.

http://sourceforge.net/projects/pjl-comp-filter/

@jdubois
Copy link
Member Author

jdubois commented Dec 11, 2013

This is done and we now have two new, easier tickets to solve: #47 and #49

I will add the documentation before releasing this.

@jdubois jdubois closed this as completed Dec 11, 2013
@jdubois jdubois modified the milestone: 0.0.1 Sep 10, 2014
erikkemperman pushed a commit to erikkemperman/generator-jhipster that referenced this issue Dec 3, 2017
* Setter should return the POJO, so it's easyer to chain the methods

* Add handling of the 'entity'->'reference entity'->'field' in (...) queryies.
For example 'Project -> ProjectType -> name' in ('software', 'hardware')
erikkemperman pushed a commit to erikkemperman/generator-jhipster that referenced this issue Dec 4, 2017
* Setter should return the POJO, so it's easyer to chain the methods

* Add handling of the 'entity'->'reference entity'->'field' in (...) queryies.
For example 'Project -> ProjectType -> name' in ('software', 'hardware')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants