Authentication-Results: mail-b.sr.ht; dkim=pass header.d=gmail.com header.i=@gmail.com Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) by mail-b.sr.ht (Postfix) with ESMTPS id ED27A11EF33 for <~qeef/damn-project@lists.sr.ht>; Tue, 13 Dec 2022 17:54:31 +0000 (UTC) Received: by mail-lj1-f172.google.com with SMTP id x11so4096081ljh.7 for <~qeef/damn-project@lists.sr.ht>; Tue, 13 Dec 2022 09:54:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=aCmhXHGcPzp5gK8tWtBGrWpJwXbzfdZ1VLrgSxdUUPo=; b=aoQq2NCGKtj6Qe12dIZAd3Jhatm19XaLWBg87l0Dy/WtgxY3m+QGotKqAQ6fWfF+o3 FfdS7TLpgAehi2MQbVD8Dok55cN+KJPWPKFKW/T9YIp54pcmoQFE7IZ7+MICaAlaDG9R trpCuk+vrNYTFvbPOKz7+cNaDY2/RZXmb0L42bjSYJRCNpnQ5rj1Zhf5DXoY6fXQSgkw f2G26sOj69Fv7Ndl2tRWJpPNbMMjuy3uUtZ6hdqivczyOVsLthQaRNlGfxdGciQro+HP AA4wvdUToDuVhTbYKm5Be0A3NUObmkcOpmouwjp5hibp4oGuzaW5/LTLNy6bf2rYOKmN wCuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aCmhXHGcPzp5gK8tWtBGrWpJwXbzfdZ1VLrgSxdUUPo=; b=Fl2TjIC/vwQb+L0JQvS/7MSPtP4NTcp/QJ2bYnXkzZDDU1/d03OSCg3MsTUkWLzy4a pXcKCkIWDiixT+S++DSatJKajXMO0rWjxx20C6Ar5KGZzU9M7I9VoCbJNNm3+nwIuzPg 2gf1NJWQBTLt1vSPlmyi54oa0OoGQOomJKiKTc/ilRoJQHHxS6ZzWZ2tC3dOg5rVNa0u kMBLrvRMRx9gkOvqrqLElFlmdwgnPcnazGSIvRiB+tsKsExHEE8kXGbX5CNajQC37zNa uR7jcVh2xaSLwlgi4CvvIpCREnawb6T3ufIupRzjMkP7OJObrjWYlnqV8+yJPjcmbjYY Fhsg== X-Gm-Message-State: ANoB5pklzbVt0tHXkv/OR8PLvPy91bi2xbgoiVUa5jS0I3DT7P4g5Utc EQYUAGYm6dqfwlFujqtua2Y= X-Google-Smtp-Source: AA0mqf7oLaRbmr3AdMNxSL2YRphb8r4KkjzkXgmDVVsmkETAN5fxl78vT1YBf7vqZWKE/0gQxVQdTg== X-Received: by 2002:a05:651c:1204:b0:27a:976:749e with SMTP id i4-20020a05651c120400b0027a0976749emr7704083lja.29.1670954070185; Tue, 13 Dec 2022 09:54:30 -0800 (PST) Received: from gmail.com (185-170-195-217.cust.centrio.cz. [217.195.170.185]) by smtp.gmail.com with ESMTPSA id z4-20020a05651c11c400b0025ebaef9570sm349754ljo.40.2022.12.13.09.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 09:54:29 -0800 (PST) Date: Tue, 13 Dec 2022 18:54:25 +0100 From: Jiri Vlasak To: siiky Cc: ~qeef/damn-project@lists.sr.ht Subject: Re: SQLite as DB alternative Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hello and sorry for late reply. > When developing damn did you consider SQLite? If yes, why did you end > up choosing Postgres? First, the damn-server depends on PostGIS extension [1]. Second, it is designed for greater loads because of mapathon use-case. > If not, do you think deploying with SQLite instead of Postgres is > feasible? I do not think so. damn-server is "just API to the database" -- based on requests over HTTP, damn-server decides which SQL query to run. A lot can be done by just queries, see for example st_divide function [2] and its use when saving the area [3]. Please, note small inconsistency that is going to be solved as part of https://todo.sr.ht/~qeef/damn-project/7 hopefully this year yet. In the README of the damn-server, it is mentioned that it is possible to run the docker image with the PostGIS database from the damn-deploy [4]. However, along with the steps in the README, to sucessfully build the damndb docker image, the content of the damndb/Dockerfile needs to be changed to: FROM postgis/postgis:11-3.3-alpine ENV POSTGRES_PASSWORD ${POSTGRES_PASSWORD:-pass} ENV POSTGRES_USER ${POSTGRES_USER:-damnuser} ENV POSTGRES_DB ${POSTGRES_DB:-damndb} ADD --chown=postgres https://git.sr.ht/~qeef/damn-server/blob/master/20_create_damn_db.sql /docker-entrypoint-initdb.d/ [1]: https://postgis.net/ [2]: https://git.sr.ht/~qeef/damn-server/tree/master/item/20_create_damn_db.sql [3]: https://git.sr.ht/~qeef/damn-server/tree/master/item/damn_server/area.py#L158 [4]: https://git.sr.ht/~qeef/damn-deploy