Share
Embed
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
Annual Pro sale · Save $30
Have presentations of your own?
Share with private links, password protection, and more control over your work.
Transcript
37 slides
-
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 -
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) -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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(); } -
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(); } -
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 -
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 -
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 -
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" } -
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); } -
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 -
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); } -
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 { -
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 -
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") -
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) -
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 -
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 -
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 -
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… -
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 -
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 -
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 -
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 ! -
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 -
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