Return-Path: X-Original-To: apmail-esme-dev-archive@www.apache.org Delivered-To: apmail-esme-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 136EB8495 for ; Thu, 18 Aug 2011 12:55:45 +0000 (UTC) Received: (qmail 78691 invoked by uid 500); 18 Aug 2011 12:55:44 -0000 Delivered-To: apmail-esme-dev-archive@esme.apache.org Received: (qmail 78643 invoked by uid 500); 18 Aug 2011 12:55:44 -0000 Mailing-List: contact dev-help@esme.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@esme.apache.org Delivered-To: mailing list dev@esme.apache.org Received: (qmail 78634 invoked by uid 99); 18 Aug 2011 12:55:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 12:55:44 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hirsch.dick@gmail.com designates 209.85.216.47 as permitted sender) Received: from [209.85.216.47] (HELO mail-qw0-f47.google.com) (209.85.216.47) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 12:55:38 +0000 Received: by qwh5 with SMTP id 5so1365485qwh.6 for ; Thu, 18 Aug 2011 05:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ZOeD5Z6FdY9snGZUXbXAtu+uMaWQhJXy635UOWRoep8=; b=tvmFj1POx04TZs1Ys+jixbwCwcUlCWpxSuRkx2mwK7R8xjjpjA5ohnNTdOPjXf5qBJ d2VtQQjtldEs9aqTLZWGAeaTninyoKkzPy4ifzMBALl9tmUwwa3AeC033Rht7ll48KPt yF1z765JdX8zgvMZ7rTiw3PvydBBm3RounB4o= MIME-Version: 1.0 Received: by 10.224.9.135 with SMTP id l7mr585349qal.249.1313672117124; Thu, 18 Aug 2011 05:55:17 -0700 (PDT) Received: by 10.229.29.129 with HTTP; Thu, 18 Aug 2011 05:55:17 -0700 (PDT) In-Reply-To: References: <4E319ECC.2000301@topicquests.org> <4E31A39D.6090901@topicquests.org> <4E31A51E.3020806@topicquests.org> <4E31A8AE.9080708@topicquests.org> <4E321D4A.1030702@topicquests.org> <4E322105.3090406@topicquests.org> <4E322466.7010904@topicquests.org> <4E322C18.8050907@topicquests.org> <4E32D091.90400@topicquests.org> <4E382D7C.6010902@topicquests.org> <4E399FAB.9050106@topicquests.org> Date: Thu, 18 Aug 2011 14:55:17 +0200 Message-ID: Subject: Re: Scalability was Re: What are pools? was Re: [VOTE] Approve the release of apache-esme-1.3 From: Richard Hirsch To: dev@esme.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org We use MySQL for the CloudBees instance. It is no problem since ESME uses the J2EE container to find its javax.sql.DataSource. D. On Thu, Aug 4, 2011 at 10:37 AM, Ethan Jewett wrote: > Hi Jack, > > Here is an example of setting up a Lift app with PostgreSQL. The same > approach would work for MySQL: > http://www.assembla.com/spaces/liftweb/wiki/Set_Up_Jetty_and_PostgreSQL > > ESME currently works in terms of large-ish memory models and load > balancers, if you really need it. But you should be able to get a > single application server up to at least 10s of thousands of users, so > the need for a load-balancer setup is purely theoretical at this > point. > > Regarding your scenario, the point about ESME is that it is designed > so that very few operations will result in database reads. The history > of timelines is not easily accessible, and new messages are inserted > into every subscriber's mailbox at the time of message creation > (rather than on read). Yes, if someone goes back in history via search > or another mechanism, we'll need to read the database once, but that > is a read on the single key field (the message ID) so it should be > very fast. And the next time that message pops up in search on the > same application server, it is already cached so no DB read is > necessary. > > We do have a bit of an in-depth explanation of why avoiding the > database is a good idea for messaging applications on our wiki. You > can read it here. > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=9373341 > > Cheers, > Ethan > > > > On Wed, Aug 3, 2011 at 9:21 PM, Jack Park wrote: >> Thanks, Ethan. >> I'd like to know more about using MySQL. >> Indeed, I'd like to know more about other classes of databases, e.g. graph >> databases. >> >> Still, while hit rate is one aspect of scalability, when you talk about >> "safely cached", I wonder about the combinatoric aspect of scalability, say, >> a million users each with timelines in the hundreds to thousands long, and >> all the entailed message objects. Are you thinking in terms of, say, >> external memcached solutions, or just large memory models and load >> balancers? >> >> Curious minds... >> Thanks >> Jack >> >> On 8/3/2011 4:56 AM, Ethan Jewett wrote: >>> >>> Hi Jack, >>> >>> It should be able to run on any Java application server with any >>> database via JNDI or with any JDBC database by providing JDBC >>> connection information in a .props file. I believe that on Stax (now >>> CloudBees) we are using a MySQL database. >>> >>> Regarding scalability, the design of ESME is such that it doesn't rely >>> much on the database for scalability. Operations should generally >>> happen on data in memory, and there shouldn't be access of the >>> database on most operations. We can do this because the data model has >>> messages as immutable objects (you can't change or delete them), so >>> they can be safely cached and we can rest assured that they will never >>> be out of sync with the database. >>> >>> I'm fairly sure we did some performance tests a while ago that showed >>> ESME was able to support thousands of concurrent users on a fairly >>> small server without trouble, but I can't currently find that >>> documentation. Maybe someone else knows where it ran off to? Seems >>> like something we should have on a our website (and a test that we >>> should redo at some point). >>> >>> Cheers, >>> Ethan >>> >> >