Java distributed objects with locality?

I evaluate various Java object distribution libraries (Terracotta, JCS, JBoss, Hazelcast ...) for the application server, and it's hard for me to understand their behavior on different axes.

My requirements for distributed objects are not many - they come down to one-to-one and one-to-many messages. There are more, but for the rest we just use JDBC, and I believe that I can overlap the cache before that, using any of the available libraries.

I need a system that distributes objects and demonstrates locality properties - in other words, the server that captures the object tends to stay on it without excessive communication with other nodes. Hazelcast looks simple (and peer-to-peer is good), but it seems to require objects to be distributed evenly across all nodes.

I need a way to save objects, preferably transparently. I plan to use EC2, so I have the option of temporary, free, limited local storage (disk) and permanent, non-free unlimited storage (S3). It would be great not to worry about OutOfMemoryErrors.

I like the simplicity and "magic" of Terracotta, but it scares me from me beejeezus. In addition, to really scale, you need to spend $$$$, otherwise you are talking with one hub.

I am cheap and I want something not only free, but also mature and with a large user base.

Thanks for any input.

+4
source share
4 answers

Terracotta seems perfect for your situation.

  • Just set up
  • it can be set to persistence (use EBS volume for EC2)
  • It is tightly integrated with Ehcache (Terracotta actually bought Ehcache) for excellent caching performance.
  • The free offer scales quite well with several customers.

Just start playing with him. I bet you will like it. To alleviate your performance concerns, just run the end-to-end messaging test. It should not be much more than the day of your time.

I must admit that I have not used Terracotta for a year and that I do not know the others that you proposed.

+2
source

Terracotta comes to an account. I understand your objections, but here are my comments:

1) Terracotta really shows the terrain - and is probably the best system in it compared to the ones you mentioned. Objects are entered only in the local JVM, where requested. A lock for reading or writing is performed using the leasing mechanism. This means that if you find the perfect locality in your system, you will incur very little network overhead.

2) Terracotta ensures the constancy of the drive out of the box - in the OSS version (you do not need to pay $$$$)

3) Why are you so scared? Just use EHCache as a cache or Hibernate second level plugin. It is incredibly easy to set up and use.

4) Yes, Terracotta FX requires you to pay (for scalable servers). However, I would suggest that if you have a system that is mostly readable and demonstrates true locality, then I don’t think that you will have a problem getting the scale you are looking for. With Terracotta 3.2, Hibernate L2 cache performance is 100,000 operating systems using 8 application servers and one Terracotta server with 100/0 read / write speed and 12,000 operating systems using the same configuration as 95/5 read / write ratio .

(I just talked to SDForum about the Bay Area on these numbers, so I was lucky to have them at hand)

+1
source

Yes, Hazelcast will distribute your assets across the cluster. However, you can enable the closest cache if you want to reduce the cost of communication. http://www.hazelcast.com/documentation.jsp#MapNearCache

+1
source

Btw, it’s not clear what you are looking for (messaging does not match clustering / distributed objects).

If you are looking for messaging in Java, I recommend you take a look at RabbitMQ (this is based on Erlang, but it doesn't matter).

0
source

Source: https://habr.com/ru/post/1301858/


All Articles