Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Spring Data Hazelcast - SpringOne Platform

Spring Data Hazelcast - SpringOne Platform

The primary goal of the Spring Data project is to make it easier to build Spring-powered applications that use data access technologies. In this talk, Neil and Viktor will present using a new Spring Data for Hazelcast project and demonstrate how using the Spring Data paradigm gains the power of a distributed data repository.

The implementation is built on the new Spring Data KeyValue module and is one of the first projects to do this. This module provides infrastructure components for creating repository abstractions for stores dealing with Key/Value pairs like java.util.Map or Hazelcast IMap.

Through the means of the repository interface, CRUD operations, and expression-based query methods can interrogate an in-memory data store in a manner consistent with the other Spring Data projects so developers can become productive quickly and easily.

Viktor Gamov

August 04, 2016
Tweet

More Decks by Viktor Gamov

Other Decks in Programming

Transcript

  1. 3

  2. What’s is Hazelcast • Distributed Java Collections (Map, Set, List,

    Queue) • NoSQL in-memory store - <K,V> • Scalability and Resilience for free • Spring support out-of-the-box 4
  3. Why Spring Data Hazelcast • Started by Oliver Gierke &

    Christoph Strobl • Familiar "Spring Data" approach, • developers do not need to learn a new technology to be able to use it • Utilizes the new Spring-Data-Key value abstraction • Reduces vendor lock-in • One can swap Hazelcast in place of more expensive or slower options • FURTHER eases the integration of Hazelcast into Spring and clouds 6
  4. MOAR Queries! 9 public interface PersonRepository extends HazelcastRepository<Person, String> {

    public Long countByFirstname(String firstname); public Long countByIdLessThanEqual(String id); public Long countDistinctLastnameByFirstname(String firstname); public Person deleteByLastname(String firstname); public Person findFirstIdByOrderById(); public Person findFirstIdByFirstnameOrderByIdDesc(String firstname); public List<Person> findByFirstname(String firstname); public List<Person> findByFirstname_AndLastname(String firstname, String lastname); public List<Person> findByFirstnameOrLastname(@Param("lastname") String s1, @Param("firstname") String s2); public List<Person> findByFirstnameGreaterThan(String firstname); public Page<Person> findByLastname(String lastname, Pageable pageable); public Page<Person> findByOrderByLastnameDesc(Pageable pageable); public Slice<Person> findByIdLike(String pattern, Pageable pageable);
  5. Learn More. Stay Connected. Follow @hazelcast / @gamussa @springcentral spring.io/blog

    @pivotal pivotal.io/blog @hazelcast http://blog.hazelcast.com