From: Tim Cross <theophilusx@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: rms@gnu.org, emacs-orgmode@gnu.org
Subject: Re: Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena)
Date: Tue, 24 Jan 2023 07:12:18 +1100 [thread overview]
Message-ID: <63cef162.170a0220.faa08.09ef@mx.google.com> (raw)
In-Reply-To: <87y1pte7x1.fsf@localhost>
I just wanted to provide some additional information which RMS may find
informative.
Under the hood, ob-sql.el is using the built-in Emacs sql.el library. It
is this library which provides the 'support' for various SQL database
engines. That support has been part of the sql library since it was
added to Emacs in about 1998.
The 'support' is essentially specialised comint based interfaces tweaked
to work with the various SQL database engine command line clients such
as psql for Postgres and sqlplus for Oracle. This involves codes to use
the comint buffer to send commands/regions to the SQL client and read
back the results and run interactive 'repl' like sessions with the
client.
No additional software is installed by either ob-sql.el or sql.el - it
is all just elisp. Any additional software, such as the database client,
must be installed separately by the user (clients on remote machines can
also be used via ssh).
There are no jar files or any other additional bits of software
installed.
There is also some additional support in the form of font-locking which
includes support for different SQL variants i.e. in addition to ANSI
SQL, you can also specify Postgres SQL, Oracle SQL, MS-SQL etc to get
font-locking which supports some of the keyword differences between the
different SQL engines.
Personally, I don't believe any of this contravenes FSF
guidelines. Neither sql.el or ob-sql.el are encouraging use of any
specific database engine. What these libraries do is in fact allow
those who do want to use free software and avenue for interacting with
these systems using free software rather than on-free (similar to Emacs'
WIndows and Mac support).
The software as a service issue is far more difficult to assess when it
comes to databases as the most common architecture with databases is to
have the database on a separate server which is often not local and
where frequently, the user has little or no control over the
software. This has become even more common in recent years due to the
growth in big data and the problem that most individuals and small
groups cannot afford the costs or handle the administrative complexity
associated with hosting databases with large data sets and storage
requirements.
Ihor Radchenko <yantar92@posteo.net> writes:
> Richard Stallman <rms@gnu.org> writes:
>
>> > > Because we already support Orcale, SAP Hana, MSSql and Vertico for example.
>>
>> Would someone please tell me more concretely what kind of "support"
>> this is? Which GNU package supports them, and how?
>
> [Jean Luis mentioned M-x sql-* commands in another message. They may
> also be worth discussing, but are not what I meant in the original
> message]
>
> ob-sql is Org mode's feature (part of Emacs) allowing users to execute
> SQL code inline inside Org files:
>
> #+header: :engine sqlite
> #+header: :database ~/.local/share/qutebrowser/history.sqlite
>
> #+begin_src sql
> SELECT URL FROM History ORDER BY "URL" DESC LIMIT 5
> #+end_src
>
> #+RESULTS:
> | qute://help/commands.html |
> | qute://help/commands.html |
> | qute://help/ |
> | qute://help |
> | qute:// |
>
> Note the :engine argument. It determines which CLI backend is being
> called by Org mode to query the database.
>
> ;; Engines supported:
> ;; - mysql
> ;; - dbi
> ;; - mssql
> ;; - sqsh
> ;; - postgresql (postgres)
> ;; - oracle
> ;; - vertica
> ;; - saphana
>
> Some of these engines are free software and we have no issue supporting
> them. Some are not.
>
>> ... Also, what kind
>> of things are those? Are they nonfree programs, or are they SaaSS?
>> Some of them I recognize as nonfree programs, but some names I don't
>> recognize at all.
>
> At least, mssql is non-free with no source code available. Same for
> oracle, vertica, and saphana.
>
> I am not sure about SaaSS - even postgresql (free software) may be used
> as a service provider by running it on server the user does not control.
> Probably, I do not fully understand how SaaSS is defined (I did read
> https://www.gnu.org/philosophy/who-does-that-server-really-serve.html)
>
> Earlier in the thread, https://github.com/dbcli/athenacli was proposed
> as another CLI to support. Athenacli itself is distributed under BSD-3 -
> free license. However, the CLI is just an interface to Amazon Athena -
> server-side database service.
>
> From my limited understanding, the main purpose of Amazon Athena is
> querying "big data" databases for further analysis, which does not
> constitute SaaSS (AFAIU) - users may not own the "big data" and may not
> have enough resources on their own computers to run the SQL queries that
> utilize machine learning models.
>
>> There are situations where it is acceptable for a GNU package to
>> support its use together with certain nonfree programs. Mainly when
>> the nonfree program so well known that this support mainly encourage
>> people who already use that nonfree program to start using the GNU
>> package with it, and is unlikely to do the converse.
>>
>> See the GNU Maintainers Guide for more details.
>
> It is hard to define "well known". For me, oracle and mssql databases
> are well-known (just by company name), while saphana and vertica are
> not. But I do not work with SQL and thus lack expertise about what is
> being used in reality. How to judge?
>
>> However, use with a SaaSS system (service as a software substitute) is
>> a different issue (though it has much in common). I'd like to think
>> about it and ask advisors for advice. These details can help me start
>> to think about it.
>
> I feel very confused about possible guidelines for SaaSS.
>
> SaaSS does not always require specific CLI tools to be used.
> Consider common HTTP requests or GraphQL that might be employed to
> communicate with SaaSS. Should we stop supporting HTTP requests just
> because they can be used to communicate with SaaSS? Probably no.
> What about something more specific like the ability to query remote
> database provided by SaaSS service? One may just need login/password +
> free sql implementation. What if it is not SELECT query, but INSERT
> query sharing the data with SaaSS? What about the history of SELECT
> queries being associated with the user and the sold to third-party? What
> if external free CLI tool is needed? non-free CLI? There should probably
> be a boundary somewhere, but it is not clear where it should lie.
next prev parent reply other threads:[~2023-01-23 20:44 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 10:48 [PATCH] ob-sql: Add support for Athena Daniel Kraus
2023-01-16 11:13 ` Ihor Radchenko
2023-01-16 11:52 ` Daniel Kraus
2023-01-16 20:50 ` Tim Cross
2023-01-17 9:42 ` Daniel Kraus
2023-01-17 10:06 ` Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena) Ihor Radchenko
2023-01-17 11:38 ` Tim Cross
2023-01-23 4:23 ` Richard Stallman
2023-01-23 6:33 ` Jean Louis
2023-01-25 4:31 ` Richard Stallman
2023-01-25 7:57 ` Tim Cross
2023-01-25 12:35 ` Ihor Radchenko
2023-01-25 14:05 ` Tim Cross
2023-01-25 14:31 ` Ihor Radchenko
2023-01-25 21:11 ` Tim Cross
2023-02-26 2:59 ` Richard Stallman
2023-01-28 4:45 ` Richard Stallman
2023-01-30 14:51 ` Ihor Radchenko
2023-01-28 4:43 ` Richard Stallman
2023-01-25 11:51 ` Jean Louis
2023-01-29 5:15 ` Richard Stallman
2023-01-23 12:45 ` Ihor Radchenko
2023-01-23 20:12 ` Tim Cross [this message]
2023-01-26 4:25 ` Richard Stallman
2023-01-26 6:59 ` Supporting non-free SQL clients in ob-sql Loris Bennett
2023-01-26 10:22 ` Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena) Ihor Radchenko
2023-01-26 11:05 ` Supporting non-free SQL clients in ob-sql Heinz Tuechler
2023-01-26 11:14 ` Ihor Radchenko
2023-01-26 11:47 ` Heinz Tuechler
2023-01-28 4:45 ` Supporting non-free SQL clients in ob-sql (was: [PATCH] ob-sql: Add support for Athena) Richard Stallman
2023-01-29 14:21 ` Ihor Radchenko
2023-02-04 5:15 ` Richard Stallman
2023-01-26 4:26 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63cef162.170a0220.faa08.09ef@mx.google.com \
--to=theophilusx@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=rms@gnu.org \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).