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 55DA1200AF7 for ; Tue, 14 Jun 2016 12:04:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 545FF160A47; Tue, 14 Jun 2016 10:04:41 +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 740631602C5 for ; Tue, 14 Jun 2016 12:04:40 +0200 (CEST) Received: (qmail 69974 invoked by uid 500); 14 Jun 2016 10:04:39 -0000 Mailing-List: contact dev-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list dev@zest.apache.org Received: (qmail 69961 invoked by uid 99); 14 Jun 2016 10:04:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jun 2016 10:04:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B0C82C0E23 for ; Tue, 14 Jun 2016 10:04:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.28 X-Spam-Level: * X-Spam-Status: No, score=1.28 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id vPICZrTpEWY8 for ; Tue, 14 Jun 2016 10:04:36 +0000 (UTC) Received: from mail-oi0-f42.google.com (mail-oi0-f42.google.com [209.85.218.42]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C5F2B5F39C for ; Tue, 14 Jun 2016 10:04:35 +0000 (UTC) Received: by mail-oi0-f42.google.com with SMTP id w5so169530572oib.2 for ; Tue, 14 Jun 2016 03:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=mbO4xzg700OOqVdoi0PXlo+wTYlzc0bvFxlo5NO/sVY=; b=sz5RpzUvTdsgfwSzwKz+WLCFdKZtJrBmlYiCizmNZ6ubWzQ9aYctGciph3SjqiIuTi 94P3fEXxrYJJt4FiaEel8sUTgOF1w1VFYsR3Vn4S/8rKTY0vx7TOXGGHO+oDnIInQooi dcqV/JCO5HENrGQ+wK4ljD7CWCklIUY2XoULmlqhx+PILUaAEsktVCJtdg8WXy37gXan 8pqBcvhAYvC91AgR1A5OfXC3FYpSqimN1STWgH78qvqUZ8N3hxfS51cGA0NXoPBvj85S pcafmBhxYRVA4zZxpc6fYFI8MHt9HG3QN4eIw1wSOa+BLKezusavAuv5wHNtLmxTaI1O qOpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=mbO4xzg700OOqVdoi0PXlo+wTYlzc0bvFxlo5NO/sVY=; b=HEbMx/OJ9vt9PULW15i0SCaS473mY3dqLMcIsGeKqXDETeabLzlCqp1ust4nRNfYOU vAuk1GSfm/I36VNnAGrqEKdDJpdXm/VOqINysw1i38F5oN9iZIn1aQTXY1dtI8kghfXD 1EQ1diNq1cmx6+K8j+8KrIFiZfsBD69pcMbFvwQeZCSAR8tfGHhk9Gr/9QI+zC8wVO4D HApxcVdhXwR706dWY6wseHUqREm8/A9bsU3tvLYpDmX37cZKm5Jlaex519M05fstMm0D ik3zE5GOb9IyJM0ytGcJdavsh6orbSUCXIFqxzBAW7Xjg5jeSzPOt/LswpmcDNKrn8xq HQUg== X-Gm-Message-State: ALyK8tL4tuylaBBJ5tHp6LBYMX8mhT1lWrFw2ajmGEmcqMrDaepmqrBE42c0CzHl3HFpPGNXzUsIperMAD9w/A== X-Received: by 10.202.53.11 with SMTP id c11mr10322370oia.97.1465898674654; Tue, 14 Jun 2016 03:04:34 -0700 (PDT) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.202.235.19 with HTTP; Tue, 14 Jun 2016 03:04:15 -0700 (PDT) In-Reply-To: References: From: Niclas Hedhman Date: Tue, 14 Jun 2016 18:04:15 +0800 X-Google-Sender-Auth: OZV0DTi2h_So2GrkWzY-5-TN_fU Message-ID: Subject: =?UTF-8?B?UmU6IOWbnuWkje+8miBMYXJnZSBTY2FsZSBFbnRpdHkgU3RvcmUgRGF0YWJhc2U/?= To: dev Content-Type: multipart/alternative; boundary=001a113d4d0ec7916705353a2143 archived-at: Tue, 14 Jun 2016 10:04:41 -0000 --001a113d4d0ec7916705353a2143 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Good question.... I vaguely recall that there was some explicit "By Type" support, at least somewhere in the past, but not sure if that is still the case. I would need to look at code, and possibly mail archives to clarify that. But yes, Visibility is definitely possible, although can be tricky to set that up. Niclas On Tue, Jun 14, 2016 at 5:58 PM, zhuangmz08 wrote: > How can I use multi-ES in my app, by setting diffrent visibility to ES > service? > If I want to place 3 kinds of entity into 3 ES service, I must define 3 > diffrent zest module each expose to one ES service? > > > > > ------------------ =E5=8E=9F=E5=A7=8B=E9=82=AE=E4=BB=B6 -----------------= - > =E5=8F=91=E4=BB=B6=E4=BA=BA: "Niclas Hedhman";; > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2016=E5=B9=B46=E6=9C=8814=E6=97=A5(= =E6=98=9F=E6=9C=9F=E4=BA=8C) =E4=B8=8B=E5=8D=885:39 > =E6=94=B6=E4=BB=B6=E4=BA=BA: "dev"; > > =E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D=EF=BC=9A Large Scale Entity St= ore Database? > > > > If you look at > https://zest.apache.org/java/develop/thirty-minutes-intro.html > > > QueryBuilder builder =3D queryBuilderFactory.newQueryBuilder( Orde= r. > class ); > > Calendar cal =3D Calendar.getInstance(); > cal.setTime( new Date() ); > cal.roll( Calendar.DAY_OF_MONTH, -90 ); > Date last90days =3D cal.getTime(); > Order template =3D templateFor( Order.class ); > builder.where( gt( template.createdDate(), last90days ) ); > Query query =3D uow.newQuery(builder); > > for( Order order : query ) > { > report.addOrderToReport( order ); > } > > > As you can see, the Query will return the Order instances from the point = of > view of the programmer (you), but under the hood, the Query executed (onc= e) > will return an Identity collection, but disguised as the objects, and whe= n > you access them, they will be retrieved from the entity store. > > A consequence I forgot to mention is that you can possibly have multiple > Entity Stores in your application, and yet only have a single Indexer, > query across those stores, and still get it working. Say, you have an LDA= P > store for User and something else for Order, the query could still be > something like; > > QueryBuilder builder =3D queryBuilderFactory.newQueryBuilder( Orde= r. > class ); > > Order template =3D templateFor( Order.class ); > builder.where( eq( template.enteredBy(), userOfInterest ) ); > Query query =3D uow.newQuery(builder); > > for( Order order : query ) > { > report.addOrderToReport( order ); > } > > > where "userOfInterest" is an Entity in the LDAP store. That should work..= . > > > Cheers > Niclas > > On Tue, Jun 14, 2016 at 3:33 PM, zhuangmz08 wrote: > > > Hi, Paul, > > > > > > Thanks for your sharing. > > > > > > 1. > > I've been tesing :) > > Mongo ES and RDF File engine. > > It took 101 seconds to write and index 10000 quite symple entities and > > took 6 second to read this entities. [i5-4200U, 8GB RAM, SSD on Win10] > > I feel it's too slow.. > > > > > > 2. > > So, index/query engine just figure out the Identities accoring to my > > query. And then ask the ES to get the extract entities accoring to the > > Identities. > > > > > > ------------------ =E5=8E=9F=E5=A7=8B=E9=82=AE=E4=BB=B6 ---------------= --- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: "Paul Merlin";; > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2016=E5=B9=B46=E6=9C=8814=E6=97= =A5(=E6=98=9F=E6=9C=9F=E4=BA=8C) =E4=B8=8B=E5=8D=883:17 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: "dev"; > > > > =E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D=EF=BC=9A Large Scale Entity = Store Database? > > > > > > > > Hi, > > > > zhuangmz08 a =C3=A9crit : > > > Hi, > > > > > > > > > OK, writing entities and reading entities are separated both theroy a= nd > > physical implementation. > > > > Entities are written *and* fetched from EntityStores. > > Entities are indexed into index/query engines. > > Queries are resolved by index/query engines that only returns > > identities, used to fetch the actual entities from EntityStores. > > > > > 1. It's acceptable to occupy large storage space (Disk is cheap). > > > All entities are stored in a SINGLE table of the SQL database or in a > > SINGLE collection of the SINGLE database in Mongo. > > > What's the key factors on writing? Which MapEntityStore is faster in > > writing entities? I mean, which is better for production use. > > Just like Niclas said, most of the EntityStores are based on > > JSONMapEntityStore, so they are built as simple key/value stores > > whichever is the underlying storage system. SQL ES use a single table, > > Mongo ES use a single collection and so on. Which one is best for your > > use case depends on your application and deployment constraints. I > > successfuly used File ES, SQL ES, Mongo ES and Redis ES in production, > > YMMV. > > > > > 2. Reading speed is related to the Indexer? I know something about > > search engine (Apache Solr). Could you explain more about the querying. > > When the query string matched some index, how will they interact with t= he > > entity database? Do we need to query the Entity database internally? I > > would like to know the factors impacting read speed. > > > Which is better for production use, OpenRDF or ElasticSearch? > > > > Indexing and querying speed is related to the Index/Query engine. > > Fetching speed is related to the EntityStore. > > > > In any case, I'd suggest that you run speed/load tests on your > > application. Zest strength here is that you can cheaply change your > > EntityStore / Index/Query engines. > > > > HTH > > > > /Paul > > > > > > -- > Niclas Hedhman, Software Developer > http://zest.apache.org - New Energy for Java > --=20 Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java --001a113d4d0ec7916705353a2143--