Internal services: Difference between revisions

From Decimal Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
No edit summary
No edit summary
Line 1: Line 1:
{{#seo:
{{#seo:
                     |title= Внутренние службы сети Decimal
                     |title= Internal services of the Decimal network
                     |titlemode= append  
                     |titlemode= append  
                     |keywords= КВнутренние службы сети Decimal
                     |keywords= Internal services of the Decimal network
                     |description= Внутренние службы сети Decimal
                     |description= Internal services of the Decimal network
                     }}
                     }}
<div class="mikio-article-content">
<div class="mikio-article-content">
 
<div class="mikio-tags">
<div class="mikio-tags">




</div>
</div>
'''Это старая версия документа!'''
'''This is an old version of the document!'''
 
 
-----
-----
 
<span id="vnutrennie_sluzhby_seti_decimal"></span>
<span id="vnutrennie_sluzhby_seti_decimal"></span>
= Внутренние службы сети Decimal =
= Internal Network Services Decimal =
 
<div class="level1">
<div class="level1">
 
В сети Decimal работает ряд служб — '''воркеров''' (Workers), которые собирают данные, поступающие непосредственно в блокчейн.
The Decimal network has a number of services — '''Workers''' (Workers), which collect data coming directly to the blockchain.
 
'''Данные''' — это блоки и транзакции разных типов: отправка, покупка, продажа, создание монет и так далее.
'''Data''' include blocks and transactions of different types: sending, buying, selling, creating coins, and so on.
 
Пользователи обозревателя (Explorer) делают запросы на поиск всевозможной информации о блокчейне. Все они проходят через специальный '''балансировщик''' (Balancer), который равномерно распределяет нагрузку и направляет соответствующие запросы на считывание из '''slave-хранилищ.'''
Users of the browser (Explorer) make requests to search for all kinds of information about the blockchain. All of them pass through a special '''balancer''', which evenly distributes the load and directs the corresponding read requests from '''slave-stores.'''
 
Так осуществляется буферизация данных и канала доступа на считывание из блокчейна с высокой пропускной способностью.
This is how buffering of data and the access channel for reading from the blockchain with high bandwidth is carried out.
 
 
</div>
</div>
<span id="buferizacija_dannyx"></span>
<span id="buferizacija_dannyx"></span>
= Буферизация данных =
= Data buffering =
 
<div class="level1">
<div class="level1">
 
'''Буферизация''' (от англ. buffer) — способ организации обмена данных в компьютерах и других вычислительных устройствах, который подразумевает использование буфера для временного хранения данных.
"Buffering" is a way of organizing data exchange in computers and other computing devices, which implies the use of a buffer for temporary data storage.
 
'''При вводе''' данных одни устройства или процессы производят запись данных в буфер, а другие — чтение из него, '''при выводе''' — наоборот. Процесс, выполнивший запись в буфер, может немедленно продолжать работу, не ожидая, пока данные будут обработаны другим процессом, которому они предназначены. В свою очередь, процесс, обработавший некоторую порцию данных, может немедленно прочитать из буфера следующую порцию.
'''When entering ''' data, some devices or processes write data to the buffer, while others read from it, '''when outputting''' — vice versa. The process that has written to the buffer can immediately continue working without waiting for the data to be processed by another process to which it is intended. In turn, the process that has processed some portion of data can immediately read the next portion from the buffer.
 
Таким образом, буферизация позволяет процессам, производящим ввод, вывод и обработку данных, выполняться параллельно, не ожидая, пока другой процесс выполнит свою часть работы. Поэтому '''буферизация данных широко применяется в многозадачных операционных системах.'''
'''Thus, buffering allows processes that perform input, output, and data processing to run in parallel, without waiting for another process to do its part. Therefore, data buffering is widely used in multitasking operating systems.'''
 
 
</div>
</div>
<span id="zachem_nuzhny"></span>
<span id="zachem_nuzhny"></span>
= Зачем нужны? =
= Why are they needed? =
 
<div class="level1">
<div class="level1">
 
Полагая, что пользователям будет интересен очень большой объём информации о состоянии и процессах в сети Decimal, а именно детали транзакций, блоки, валидаторы и их параметры, выпущенные монеты и так далее, '''DecimalChain позаботился о доступности всех этих данных''' и обеспечил их корректное и быстрое отображение с помощью внутренних служб.
Believing that users will be interested in a very large amount of information about the status and processes in the Decimal network, namely transaction details, blocks, validators and their parameters, issued coins, and so on, "'DecimalChain took care of the availability of all these data"' and ensured their correct and fast display using internal services.
 
С течением времени и увеличением блокчейна обрабатывать запросы будет всё сложнее. Возможны значительные временные задержки при выборке данных непосредственно из реплик блокчейна.
With the passage of time and the increase of the blockchain, it will become more and more difficult to process requests. Significant time delays are possible when fetching data directly from blockchain replicas.
 
DecimalChain организовал хранение в базе данных, способной удовлетворить огромное количество запросов и гарантированно предоставить нужную пользователям информацию.
DecimalChain has organized storage in a database capable of satisfying a huge number of requests and guaranteed to provide the information users need.
 
Процесс организован следующим образом. Изменения состояния в блокчейне генерируют '''события''' (events), которые мониторятся '''воркерами''' . Они разбирают на составные части всю поступающую информацию из блоков и транзакций и передают в '''индексер''' , в котором данные сортируются и индексируются. После этого упорядоченная информация записывается в '''базу данных''' (PostgreSQL), '''ведущую базу''' (Master) и дублируется на '''ведомых хранилищах''' (Slave) для гарантии сохранности. Все запросы от эксплорера поступают на '''ведомые базы данных''' через '''балансировщик''' (Load Balancer), организующий через программный интерфейс ( API ) равномерное распределение нагрузки.
The process is organized as follows. State changes in the blockchain generate "events", which are monitored by "workers". They disassemble all incoming information from blocks and transactions into its component parts and transmit it to the "indexer", in which the data is sorted and indexed. After that, the ordered information is written to the '''database''' (PostgreSQL), the 'master database' (Master) and duplicated on the 'slave repositories' (Slave) to guarantee safety. All requests from the explorer are sent to the "slave databases" through the "Load Balancer", which organizes uniform load distribution through the program interface (API).
 
Такая схема горизонтально масштабируемая, то есть если возрастает нагрузка, то можно добавлять ведомые базы. При этом мастерноды, где непосредственно хранятся реплики блокчейна, не нагружаются, так как архитектурно отделены от запросов пользователей и внешних служб.
This scheme is horizontally scalable, that is, if the load increases, then you can add slave bases. At the same time, masternodes, where replicas of the blockchain are directly stored, are not loaded, since they are architecturally separated from user requests and external services.
 
Благодаря индексированию базы данных способны с минимальными задержками выдать информацию о любых событиях и состояниях в блокчейне вне зависимости от размера самой базы данных.
Thanks to indexing, databases are able to provide information about any events and states in the blockchain with minimal delays, regardless of the size of the database itself.
 
 
</div>
</div>
<div style="clear:both">
<div style="clear:both">




</div>
</div>
 
</div>
</div>
  [[Category:Commoninfo]]
  [[Category:Commoninfo]]

Revision as of 06:03, 22 June 2022


This is an old version of the document!


Internal Network Services Decimal

The Decimal network has a number of services — Workers (Workers), which collect data coming directly to the blockchain.

Data include blocks and transactions of different types: sending, buying, selling, creating coins, and so on.

Users of the browser (Explorer) make requests to search for all kinds of information about the blockchain. All of them pass through a special balancer, which evenly distributes the load and directs the corresponding read requests from slave-stores.

This is how buffering of data and the access channel for reading from the blockchain with high bandwidth is carried out.

Data buffering

"Buffering" is a way of organizing data exchange in computers and other computing devices, which implies the use of a buffer for temporary data storage.

When entering data, some devices or processes write data to the buffer, while others read from it, when outputting — vice versa. The process that has written to the buffer can immediately continue working without waiting for the data to be processed by another process to which it is intended. In turn, the process that has processed some portion of data can immediately read the next portion from the buffer.

Thus, buffering allows processes that perform input, output, and data processing to run in parallel, without waiting for another process to do its part. Therefore, data buffering is widely used in multitasking operating systems.

Why are they needed?

Believing that users will be interested in a very large amount of information about the status and processes in the Decimal network, namely transaction details, blocks, validators and their parameters, issued coins, and so on, "'DecimalChain took care of the availability of all these data"' and ensured their correct and fast display using internal services.

With the passage of time and the increase of the blockchain, it will become more and more difficult to process requests. Significant time delays are possible when fetching data directly from blockchain replicas.

DecimalChain has organized storage in a database capable of satisfying a huge number of requests and guaranteed to provide the information users need.

The process is organized as follows. State changes in the blockchain generate "events", which are monitored by "workers". They disassemble all incoming information from blocks and transactions into its component parts and transmit it to the "indexer", in which the data is sorted and indexed. After that, the ordered information is written to the database (PostgreSQL), the 'master database' (Master) and duplicated on the 'slave repositories' (Slave) to guarantee safety. All requests from the explorer are sent to the "slave databases" through the "Load Balancer", which organizes uniform load distribution through the program interface (API).

This scheme is horizontally scalable, that is, if the load increases, then you can add slave bases. At the same time, masternodes, where replicas of the blockchain are directly stored, are not loaded, since they are architecturally separated from user requests and external services.

Thanks to indexing, databases are able to provide information about any events and states in the blockchain with minimal delays, regardless of the size of the database itself.