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

C5f6e8dffbb19acf405198c8fb917337?s=47 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.

C5f6e8dffbb19acf405198c8fb917337?s=128

Mark Paluch

November 02, 2016
Tweet

Transcript

  1. What’s new in Spring Data Mark Paluch @mp911de spring.io #springdata

    // @SpringData
  2. 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
  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/ Hopper Release 3 image source: 
 https://commons.wikimedia.org (License: CC0)
  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/ <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
  5. 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
  6. 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
  7. 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
  8. 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
  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/ 9 Demo Java 8 Features
  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/ 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
  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/ 11 Demo Query by Example
  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/ Query by Example § Value objects provided by Spring Data Commons § Supported by Spring Data JPA and Spring Data MongoDB 12
  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/ 13 Demo Projections
  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/ Projections in Repository Query Methods § First time seen with Evans in Spring Data REST § Projections to reduce or enhance view of resources 14
  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/ Closed Projection 15 interface CustomerProjection { String getFirstname(); }
  16. 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(); }
  17. 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
  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/ 18 Demo Spring Data Redis
  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 Redis § Deprecated jredis and srp drivers § Redis Cluster support (Jedis & Lettuce) § Support for object mapping and repositories § Redis SSL support 19
  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 § Customizable entity lookup. self: { href: "http://localhost:8080/countries/ 47631a38-548f-11e6-beb8-9e71128cae77" } 20 self: { href: "http://localhost:8080/countries/austria" }
  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 REST 21 public void configureRepositoryRestConfiguration( RepositoryRestConfiguration config) { config.withCustomEntityLookup(). forRepository(CountryRepository.class, Country::getName, 
 CountryRepository::findByName); }
  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 § Support for OQL specific features via Annotations § Annotation based eviction strategies 22
  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 OQL-specific Annotations 23 interface UserRepository
 extends GemfireRepository { @Trace @Limit(5) @Hint("UsernameIdx") List<User> findByUsername(String usr); }
  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 Gemfire TTL/Eviction 24 @TimeToLiveExpiration( timeout="300", action="LOCAL_DESTROY") @IdleTimeoutExpiration( timeout="120", action="LOCAL_INVALIDATE") class DomainObject {
  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 § 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
  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/ Spring Data Couchbase Geospatial support 26 @Dimensional( designDocument="partyGeo", spatialViewName="byLocation")
  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/ Outlook - Ingalls 27 image source: 
 https://commons.wikimedia.org (License: CC0 BY-SA 3.0)
  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/ 28 Module setup Hopper Commons Neo4j JPA Solr ElasticSearch REST Cassandra Couchbase Redis MongoDB Community
 modules Core
 modules Gemfire
  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/ 29 Module setup Ingalls Commons Neo4j JPA Solr ElasticSearch REST Couchbase Redis MongoDB Community
 modules Core
 modules Gemfire Cassandra
  30. 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
  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/ One more thing…
  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/ Spring 5 is coming
  33. 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
  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/ 34 Demo Reactive Repositories
  35. 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 !
  36. 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
  37. 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