實時數據庫的9個屬性

1 月 15

Raima徽標在灰色的背景上

什麼是實時數據庫?

實時數據庫是一種數據庫系統,能夠處理流量不斷變化且對時間極為敏感的數據工作負載。與傳統數據庫不同,傳統數據庫包含的數據是永久性的,並且更改頻率要低得多。 

實時處理意味著可以非常快速地處理交易,從而使組織或其他集成系統可以立即對數據進行操作。實時數據庫通常用於會計,銀行,法律,醫療記錄,多媒體,過程控制,預訂系統和科學數據分析。


 

實時數據庫如何工作?

實時數據庫(也稱為實時數據庫)是具有擴展性能和吞吐量功能的傳統數據庫。它們將時間限制應用於數據,以指示數據在哪個時間點仍然有效(也稱為時間有效性)。在許多情況下,外界的傳感器或提要會不斷使用新的,當前相關的數據來更新數據。

實時數據庫必須滿足幾個嚴格的標準:

  • 處理對時間極為敏感的查詢
  • 僅返回時間上有效的數據
  • 支持查詢和響應的優先級調度

In a real time database system, there is a significant concern as to how to record the exact time at which data was recorded and queries were received-detailed timestamps provide a clear time reference. Based on these timestamps, the system must ensure realtime database queries are processed consistently under the above constraints. 

實時數據庫還必須解決實時數據庫查詢無法足夠快地回答的情況。例如,如果數據提供較晚,則可以為其提供指示響應時間的標記,因此操作員可以考慮響應是否仍然有意義。

隨著實時應用程序的指數級增長,實時數據庫的研究和開發在未來幾年可能會增加。視頻通話現在在世界範圍內無處不在,諸如WhatsApp和Facebook之類的消息傳遞和社交應用擁有數十億用戶,並且對具有實時屬性的高清視頻和音頻的實時流傳輸的需求也在不斷增長。將會出現新的協議和技術,以更有效地處理實時交易。

 

實時數據庫的9個特徵

The burden on software in a “live” information system is simply to keep up. Processing must occur at a rate faster than the activity. It must represent the state of a system within a certain time tolerance. A stock quote should be only a few seconds old, but a temperature reading from an elementary school can be 15 minutes old. Both are considered “real time” data.

滿足硬實時系統確定性要求的數據庫系統通常需要簡化版本,其中查詢和更新是簡單且有界的。儘管該領域的技術和算法在不斷改進,但仍然只有少數幾個數據庫系統真正可以滿足硬實時要求。

1.表現

“Keeping up” with live activity is the requirement of the database system together with the software that captures and/or displays the data. When there are 100 events/minute, and the system can handle 1000 events/minute, then everything’s fine. But what if events average 2000/minute with bursts of over 10,000? In this case, a system that is three times faster is required. Higher performing database management systems will be able to solve more real time problems.

2.歷史記錄

如果正在讀取傳感器並且正在顯示數據表示,則可能不需要數據庫。但是,如果必須記錄實時數據顯示以便可以生成歷史視圖或摘要,則數據庫必須能夠及時捕獲和存儲此數據,以利於將來的訪問。

3.維持關係

監視實時數據經常涉及在滿足某些條件時發出警報或觸發其他操作。這些條件可能涉及數據庫中是否存在數據,因此必須執行快速查找。它們還可能取決於數據庫中記錄之間的連接。需要數據庫系統維護可以快速創建或查詢的關聯和查找。

4.排隊

Assuming that inputs into a live system are irregular, as they often are, the system must handle bursts of events that can be processed soon, where “soon” is during a quieter period. Then it is likely that processing the events in order is important. So a queuing model that maintains order in the backlog will satisfy this requirement.

5.耐用性

同樣,假設數據不是瞬態的,則存在數據庫系統以保持數據安全,這通常意味著將其放入磁盤驅動器或閃存驅動器。最好的系統將以可恢復的方式執行此操作,這意味著計算機崩潰不會導致數據庫損壞。

6.批處理

將數據寫入持久性介質的事務是數據庫系統中最耗時的功能。對於每個事件執行一個事務可能並不總是很重要。在這種情況下,一個事務可能一次提交2到200個事件,這意味著數據庫系統使用的資源要少得多,因此執行速度更快。批處理取決於數據丟失(在發生崩潰的情況下)的容忍度以及數據的新鮮度要求。例如,如果實時數據的顯示每五秒鐘更新一次,則在最後五秒鐘內發生的300個事件被提交了300個事務(每個事件1個事件)或3個事務(每個100個事務),則沒有什麼區別。

7.條件數據

One technique to allow greater volumes of data to be archived is to reduce, or “condition” the data before storing it. This may involve filters that ignore parts of it, or translations that reduce larger representations into smaller ones. Both of these techniques may require fast indexing of previously stored data.

8.無干擾查詢

If a system is strained to capture and store event data, it may be slowed down even more when the data must be read for display purposes. Techniques for reading data without locks are needed to prevent this. Two common techniques are known as MVCC and dirty-reading. MVCC stands for “Multi Version Concurrency Control” and creates a virtual snapshot of a database so that a consistent query can be made. Dirty reading is even faster when it is not necessary to rely upon the consistency of relationships between records in a database.

9.匯總

Another common computing model has multiple “collector” computers that capture and store event data locally, then pass it on to an aggregation site. The common technology to solve this problem is replication. This means that the changes to the local databases are also made to the aggregate database. This usually implies that the computers are connected through networking.

Meaningful handling of live, time-sensitive data is the new real time. The old hard real time systems are still very important and pervasive, but cannot use many of today’s open source or commercial database management systems.

 

實時數據庫示例應用 

實時應用程序(RTA)是在用戶搜索的當前或當前時間範圍內運行的應用程序。延遲必須小於預定義的值。 

RTAs are evaluated using a metric called worst-case execution time (WCET)-this is the maximum time allowed for a task, given a specific hardware configuration. Applications with a WCET of several seconds or less are considered real time. The process of operating under real time constraints is known as real-time computing (RTC).

以下是一些RTAs的示例:

  • 互聯網協議語音(VoIP)
  • 消息,聊天和即時消息(IM)應用程序
  • 視頻會議
  • 線上游戲
  • 股票交易
  • 多個投標人的電子商務交易

 

Raima實時數據庫解決方案

Raima數據庫管理器(或RDM)是符合ACID的嵌入式數據庫管理系統,旨在用於嵌入式系統應用程序。 RDM旨在利用多核計算機,網絡(本地或廣域)以及磁盤或內存中的存儲管理。 RDM支持多種應用程序編程接口(API):低級C API,C ++和SQL(本機,ODBC,JDBC,ADO.NET和REST)。 RDM具有高度的可移植性,可以在Windows,Linux,Unix和一些實時或嵌入式操作系統上使用。也提供源代碼許可證。

RDM同時支持非SQL(記錄和游標級別的數據庫訪問)以及SQL數據庫的設計和操作功能。非SQL功能對於資源最受限制的嵌入式系統環境非常重要,在這些環境中,優先考慮在很小的空間內獲得高性能。對於在大多數嵌入式系統環境中佔用足夠小的空間,SQL在提供一種廣為人知的標準數據庫訪問方法方面很重要。

 

Get notified about new RDM updates

Be the first to know about new Raima Database Manager updates when they go live, use cases, industry trends and more.