Farah
Farah

Reputation: 2621

Infinispan : Which client API to choose?

If we implement the caching server using Infinispan, what are the possible client APIs to choose? Is Java Hot Rod client a good choice? Any other solutions?

Thank you!

Upvotes: 0

Views: 151

Answers (2)

swKK
swKK

Reputation: 316

As usually - Depends on your needs.

When you use HotRod you use Infinispan in a fashion similar to using MySQL/Sybase - you have an application that connects to the database backend which means

  • dedicated servers need to be set up and maintained
  • need to have multiple (dedicated) boxes to have high-availability and resiliency

but

  • HotRod client does some load-balancing for you
  • you can have dedicated data store servers with very specific configuration/separation/etc.
  • this mode is useful when Infinispan is used as a distributed store with database persistence

You might also use Infinispan in embedded mode, when you data is shared between you applications containing Infinispan instances; this mode is like having a HashMap that is synchronized across the network with other boxes:

  • this gives you HA/resiliency by default (if your application is deployed with 2+ instances)
  • no need to have separate servers (no separate maintenance)
  • every new instance of your app will also contribute to the Infinispan cluster increasing HA/resiliency
  • (for testing you'll probably use Infinispan in embedded mode, anyway)

If you have your applications running on the same network segment (no firewall/switches/etc.) it might be easier just to use Infinispan embedded mode, as it's easy to set up with lot of examples.

My recommendation would be to have a cache layer in your code that separates cache operations w/o the implementation so you can use whatever cache provider you want to use.

For Infininispan you should read the Infinispan User's Guide as @Galder pointed out.

Upvotes: 1

Galder Zamarreño
Galder Zamarreño

Reputation: 5197

The server modules documentation clarifies this.

Upvotes: 0

Related Questions