SQLiteIsServerless 是无服务器的

database

大多数 SQL 数据库引擎是作为单独的服务器进程实现的。 希望访问数据库的程序使用某种进程间通信(通常是 tcp / ip)与服务器通信,以向服务器发送请求并接收回来的结果。 不是这样工作的。 使用 SQLite,想要访问数据库的进程直接从磁盘上的数据库文件读写数据库。 没有中间服务器进程。

There are advantages and disadvantages to being serverless. The main advantage is that there is no separate server process to install, setup, configure, initialize, manage, and troubleshoot. This is one reason why SQLite is a "zero-configuration" database engine. Programs that use SQLite require no administrative support for setting up the database engine before they are run. Any program that is able to access the disk is able to use an SQLite database.

无服务器有优点也有缺点。 其主要优点是没有单独的服务器进程来安装、设置、配置、初始化、管理和故障排除。 这就是 SQLite 是一个“零配置”数据库引擎的原因之一。 使用 SQLite 的程序在运行之前不需要设置数据库引擎的管理支持。 任何能够访问磁盘的程序都能够使用 SQLite 数据库。

On the other hand, a database engine that uses a server can provide better protection from bugs in the client application - stray pointers in a client cannot corrupt memory on the server. And because a server is a single persistent process, it is able to control database access with more precision, allowing for finer-grained locking and better concurrency.

另一方面,使用服务器的数据库引擎可以更好地保护客户机应用程序中的 bug ——客户机中的寄生指针不会损坏服务器上的内存。 由于服务器是一个单一的持久进程,因此它能够以更高的精度控制数据库访问,从而实现更细粒度的锁定和更好的并发性。

Most SQL database engines are client/server based. Of those that are serverless, SQLite is the only one known to this author that allows multiple applications to access the same database at the same time.

大多数 SQL 数据库引擎是基于客户机 / 服务器的。 在那些无服务器的应用程序中,SQLite 是本文作者所知的唯一一个允许多个应用程序同时访问同一个数据库的应用程序。

2. Classic Serverless Vs. Neo-Serverless 经典的无服务器 vs 新服务器

(This section was added on 2018-04-02)

(此部分是在2018-04-02年度增加的)

Recently, folks have begun to use the word "serverless" to mean something subtly different from its intended meaning in this document. Here are two possible definitions of "serverless":

最近,人们开始使用“无服务器(serverless)”这个词来表示一些与本文意图稍有不同的东西。 以下是“无服务器”的两种可能定义:

  1. Classic Serverless: The database engine runs within the same process, thread, and address space as the application. There is no message passing or network activity.

    经典无服务器: 数据库引擎与应用程序在相同的进程、线程和地址空间中运行。 没有消息传递或网络活动。

  2. Neo-Serverless: The database engine runs in a separate namespace from the application, probably on a separate machine, but the database is provided as a turn-key service by the hosting provider, requires no management or administration by the application owners, and is so easy to use that the developers can think of the database as being serverless even if it really does use a server under the covers.

    Neo-serverless: 数据库引擎在与应用程序分离的名称空间中运行,可能在单独的机器上运行,但数据库作为交钥匙服务由宿主服务提供商提供,不需要应用程序所有者进行管理或管理,而且使用非常简单,以至于开发人员可以认为数据库是无服务器的,即使它确实在掩护下使用了服务器。

SQLite is an example of a classic serverless database engine. With SQLite, there are no other processes, threads, machines, or other mechanisms (apart from host computer OS and filesystem) to help provide database services or implementation. There really is no server.

Sqlite 是一个典型的无服务器数据库引擎的例子。 使用 SQLite,没有其他进程、线程、机器或其他机制(除了主机计算机 OS 和文件系统)来帮助提供数据库服务或实现。 实际上没有服务器。

Microsoft Azure Cosmo DB and Amazon S3 are examples of a neo-serverless databases. These database are implemented by server processes running separately in the cloud. But the servers are maintained and administered by the ISP, not by the application developer. Application developers just use the service. Developers do not have to provision, configure, or manage database server instances, as all of that work is handled automatically by the service provider. Database servers do in fact exist, they are just hidden from the developers.

Microsoft Azure Cosmo DB 和 amazons3是新无服务数据库的例子。 这些数据库是由在云中单独运行的服务器进程实现的。 但是,服务器是由 ISP 而不是应用程序开发人员维护和管理的。 应用程序开发人员只是使用该服务。 开发人员不必提供、配置或管理数据库服务器实例,因为所有这些工作都由服务提供者自动处理。 数据库服务器确实存在,只是对开发人员隐藏了。

It is important to understand these two different definitions for "serverless". When a database claims to be "serverless", be sure to discern whether they mean "classic serverless" or "neo-serverless".

理解“无服务器”的这两个不同定义非常重要。 当一个数据库声称是“无服务器”时,一定要辨别它们是指“典型的无服务器”还是“新服务器”。

以上是 SQLiteIsServerless 是无服务器的 的全部内容, 来源链接: utcz.com/z/532087.html

回到顶部