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

What's new in Spring Data Hopper (Devoxx Morocco 2016)

Mark Paluch
November 02, 2016

What's new in Spring Data Hopper (Devoxx Morocco 2016)

Slides of the talk I gave at Devoxx Morocco, 2016.

Mark Paluch

November 02, 2016
Tweet

More Decks by Mark Paluch

Other Decks in Programming

Transcript

  1. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ @mp911de github.com/mp911de paluch.biz Mark Paluch
  2. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Hopper Release 3 image source: 
 https://commons.wikimedia.org (License: CC0)
  3. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-releasetrain</artifactId> <version>Hopper-SR4</version> <scope>import</scope> <type>pom</type> </dependency> 4 Spring Data Release train BOM
  4. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 5 Module setup Hopper Commons Neo4j JPA Solr ElasticSearch REST Cassandra Couchbase Redis MongoDB Community
 modules Core
 modules Gemfire
  5. Ingalls* December 2016 Spring 4.2 Unless otherwise indicated, these slides

    are © 2013-2014 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Release train - Spring Framework baselines Dijkstra May 2014 Spring 3.2 Evans August 2015 Spring 4.0 Fowler March 2015 Spring 4.0 Gosling September 2015 Spring 4.1 Hopper April 2016 Spring 4.2
  6. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Major Dependency upgrades for Hopper § Upgraded Spring Framework baseline to 4.2 § Upgrade to Querydsl 4 § Upgrade to Elasticsearch 2.0 § Upgrade to Solr 5 7
  7. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Core Themes
  8. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 9 Demo Java 8 Features
  9. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Commons § Support for Composed Annotations § Support JDK 8 and Guava Optional on repository query parameters § Allow aliasing of Querydsl web bindings § Converter support for JSR-310's ZoneId. 10
  10. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 11 Demo Query by Example
  11. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Query by Example § Value objects provided by Spring Data Commons § Supported by Spring Data JPA and Spring Data MongoDB 12
  12. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 13 Demo Projections
  13. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Projections in Repository Query Methods § First time seen with Evans in Spring Data REST § Projections to reduce or enhance view of resources 14
  14. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Closed Projection 15 interface CustomerProjection { String getFirstname(); }
  15. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Open Projection 16 interface CustomerSummary { @Value("#{target.firstname + ' ' + target.lastname}") String getFullName(); @Value("#{@mybean.someMethod(target)}") String getSomeCalculatedValue(); }
  16. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Store Specifics
  17. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 18 Demo Spring Data Redis
  18. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Redis § Deprecated jredis and srp drivers § Redis Cluster support (Jedis & Lettuce) § Support for object mapping and repositories § Redis SSL support 19
  19. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data REST § Customizable entity lookup. self: { href: "http://localhost:8080/countries/ 47631a38-548f-11e6-beb8-9e71128cae77" } 20 self: { href: "http://localhost:8080/countries/austria" }
  20. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data REST 21 public void configureRepositoryRestConfiguration( RepositoryRestConfiguration config) { config.withCustomEntityLookup(). forRepository(CountryRepository.class, Country::getName, 
 CountryRepository::findByName); }
  21. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Gemfire § Support for OQL specific features via Annotations § Annotation based eviction strategies 22
  22. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Gemfire OQL-specific Annotations 23 interface UserRepository
 extends GemfireRepository { @Trace @Limit(5) @Hint("UsernameIdx") List<User> findByUsername(String usr); }
  23. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Gemfire TTL/Eviction 24 @TimeToLiveExpiration( timeout="300", action="LOCAL_DESTROY") @IdleTimeoutExpiration( timeout="120", action="LOCAL_INVALIDATE") class DomainObject {
  24. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Couchbase § N1QL Integration. • SQL extension for JSON. • Allows sorting and Paging. • Evaluates your SpEL expressions and named parameters. § Geospatial query support via specialized Views § Support for auditing annotations. 25
  25. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Couchbase Geospatial support 26 @Dimensional( designDocument="partyGeo", spatialViewName="byLocation")
  26. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Outlook - Ingalls 27 image source: 
 https://commons.wikimedia.org (License: CC0 BY-SA 3.0)
  27. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 28 Module setup Hopper Commons Neo4j JPA Solr ElasticSearch REST Cassandra Couchbase Redis MongoDB Community
 modules Core
 modules Gemfire
  28. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 29 Module setup Ingalls Commons Neo4j JPA Solr ElasticSearch REST Couchbase Redis MongoDB Community
 modules Core
 modules Gemfire Cassandra
  29. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Outlook § Method handles for property access in object mapping § Spring Data Cassandra to become a core module • Upgrade to Cassandra 3.0 § Support for inbound projections using JSONPath / XPath (via XMLBeam) § Partial updates in Redis repositories § Support for Redis GEO commands and derived findBy…Near/Within queries § $min / $max support in MongoDB § DBRef loading improvements for MongoDB § Spring Data REST • Support for VND Error and RFC7807 (Problem details for HTTP APIs) • Support for additional hypermedia formats (Siren, Affordances) § Better support for Couchbase Async API 30
  30. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ One more thing…
  31. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring 5 is coming
  32. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Repositories
  33. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 34 Demo Reactive Repositories
  34. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data 2.0 § Upgrade JDK baseline to 8 § Upgrade Spring Framework baseline to 5.0 § Reactive support for MongoDB, Redis and Cassandra • Store implementations using either RxJava or Project Reactor • Reactive wrapper type conversion on Repository level 35 ! STAY TUNED !
  35. Unless otherwise indicated, these slides are © 2013-2016 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Feedback Welcome
  36. Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software,

    Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Resources § Spring Data Examples – Repository @ Github § Spring Data wiki (Release trains, planning) – Wiki § Spring projects release calendar – Google Calendar § What’s new in Spring Data Hopper – Blog post § Slides – Speakerdeck § Chat with us on Gitter! 37