Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 38E55200B5A for ; Thu, 4 Aug 2016 13:24:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 376DB160AAB; Thu, 4 Aug 2016 11:24:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7DE17160A7C for ; Thu, 4 Aug 2016 13:24:05 +0200 (CEST) Received: (qmail 97608 invoked by uid 500); 4 Aug 2016 11:24:04 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 97593 invoked by uid 99); 4 Aug 2016 11:24:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2016 11:24:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E8FC71883F9 for ; Thu, 4 Aug 2016 11:24:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 2KpOXa7PHRma for ; Thu, 4 Aug 2016 11:24:01 +0000 (UTC) Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 232F360E68 for ; Thu, 4 Aug 2016 11:24:01 +0000 (UTC) Received: by mail-io0-f196.google.com with SMTP id q83so21286163iod.2 for ; Thu, 04 Aug 2016 04:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=eKrobMcOpOV5QukhHgCW5qtfyqqgD9tm5aUvpR1zKWc=; b=A2O2UKDJf5nDkN5ST2mq81IXS6KFepsFLJHjzra+DmDm1y544lfZdCBY+5VtnXrtYe GQQYj4OtUWMbhYvGESsmi3nvLbPBWOdd50H7h14cpBK4Bhb8m+qjzVbVor5bt0mLbESF gvGYpoELgRuDnF/aLaxwfAx3JhxnQ7WWtfLDBWIqbGkqovt2Qfh5+KsghBzZyNIdCCr4 qys9fZl77YIR9EhMXAkFNETD+gb+0cV0RTbDKQ9ilxr9X5aRoXHGn4IDcnTx0E563cW7 KHPEDBqsGZYPy67NX3kzi8mMsyA+XmLeKwsZV3QX1zeJk8qrOjIvmeW0RTtWTgfNimN/ 9brw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=eKrobMcOpOV5QukhHgCW5qtfyqqgD9tm5aUvpR1zKWc=; b=cchLSkDI5Wth2epL2kId1Ey1GspW8vzHS1j5Iy6anJf4j5tmjH+8syNtGJxiA4+0ex 9eUvRh37U+rw6fKgDMmxlrZJli2v7IrhQDRN0dXX/YXb3vfqmW7Z5t/TDHfbkiUeIvho 9x0f9Cs60vXVK1slrSW8+1kQP4Jb/+UQEWokNttwpHdt/Jn8wDCDRhifumkbrQEVkvST RB1IWaVhkPpdvdkrIcir1aQnrtqLoSFrR2usbEd+60xQ6eweicpVcFKgjYB3i8GP1dnN xPCSKT0n/UusUFWeILRHVDWnHtCUL1/ux1X3LshQzCB+scNDf6Gb0abvX+Yvfq0Hn5Ba R9CA== X-Gm-Message-State: AEkooutNIuuhRQH+Evc+nsyjln0YTe+VG4XbMZG2luLLo9y1POQN7D+tiKy4ptps3hvyY2Pci882Zzgc3cfd7Q== X-Received: by 10.107.48.76 with SMTP id w73mr76625608iow.172.1470309839934; Thu, 04 Aug 2016 04:23:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.8.139 with HTTP; Thu, 4 Aug 2016 04:23:59 -0700 (PDT) From: Eduard Shangareev Date: Thu, 4 Aug 2016 14:23:59 +0300 Message-ID: Subject: IGNITE-1192 Implementation (Integration with Spring Data) To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=001a1144451ab81d3505393d2fc7 archived-at: Thu, 04 Aug 2016 11:24:06 -0000 --001a1144451ab81d3505393d2fc7 Content-Type: text/plain; charset=UTF-8 Guys, greetings! I am working on Spring Data integration. There are two ways how we can use Spring Data: 1. generating layer for Ignite usage; 2. using existing Spring Data configuration for persistence (Spring Data JPA, for example, or Mongo). I am sure that we should concentrate on first part because Ignite already has no problem with persistence. Main feature Spring Data provides - Repository concept, a user just defines some interface for entity access and spring data framework automatically generates CRUD/query methods. And I am going to use Ignite via SQL-layer. Documentation of spring-data-commons (which I will use to refer): http://docs.spring.io/spring-data/data-commons/docs/current/reference/html/ The list of features and problems: 1. Support Java8 (Streams, CompletableFuture); 2. Async query results (Future, ListenableFuture, CompletableFuture as return type); 3. List of supported query return types (Appendix D); 4. List of supported query keywords (Appendix C); 5. Support of Pageable, Sort as method parameters; 6. Transaction support; 7. Lock support; 8. Querydsl support; 9. Query by example (QbE) support; 10. Enabling auto-cache configuration/creation by repository interface; 11. Support entities with keys. 12. Explicit query support (user-defined). 13. Support other Ignite capabilities. Well, we should decide what we want to see in first version of spring-data support. Below I will try to explain paragraphs in more detail. 1. Nothing to explain. I think it can wait. 2. We already have async API, so there should be no problem to support this. 3. It is connected with 1 and 5. I think we will not support GeoResult, GeoResults, GeoPage, guava's Optional. 4. I think it should match our SQL-capabilities 5. As I know we support already LIMIT, OFFSET, ORDER BY. I am wondered by Page return type (should we support it?). 6. There is no support in sql now. 7. We can do it by adding extra methods to IgniteRepository. 8. I haven't seen what it is but looks interesting. 9. See p.9. 10. At least we should determine in some way which cache we should use to execute queries. In the prototype I am using own annotation for it. But maybe we should be able to create cache configuration from scratch only by repository interface (with the usage of own annotations). 11. By default, spring data assumes that entity contains keys. But it is not our case. We can throw UnsupportedException when methods with an only entity are used as method-parameter, or check that there is a field with @Id annotation. Also, there is separate module 'Spring Data Key Value' which provides some infrastructure for key/value storage integration ( https://github.com/spring-projects/spring-data-keyvalue). Need check if it makes sense to use it for Ignite integration. 12. In the prototype I have defined annotation @Query. The user can annotate query-method with it and we will use it to query cache. 13. There are many features in Ignite. Which should we support in this integration? Also, you can look on Semen's comment in ticket for repository example: https://issues.apache.org/jira/browse/IGNITE-1192?focusedCommentId=15398164&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15398164 Any thoughts, opinions? --001a1144451ab81d3505393d2fc7--