Возможно, стоит пояснить разницу между синхронизацией из thread/process-safe и синхронизацией с помощью Lock🤔
Наша задача — заставить разные процессы и потоки обращаться к базе данных (или любым другим ресурсам) последовательно. Чтобы не случилось так называемого race condition, то есть состояние гонки. Это когда разные потоки или процессы пытаются одновременно что-то сделать с одним и тем же ресурсом.
В этом случае нам нужна какая-то логика ограничения. Пока один процесс не завершил своё действие, другие не могут получить доступ к ресурсу.
Так вот, thread-safe и process-safe означает что отдельно взятые операции записи в БД гарантированно будут последовательны. Запросы из разных процессов или потоков выстроятся в очередь и не будут мешать друг другу. Лучше всего когда этот блок реализован на уровне БД в виде атомарных операций или ещё как-то.
Но зачем нам тогда еще дополнительный Lock?
Этот способ синхронизации используется когда процесс никак не укладывается в одно действие и должен сделать множество операций прежде чем дать доступ следующему. В этом случае процесс ставит некий глобальный Lock на ресурс и никто другой, даже получив законное право на доступ, не может ничего сделать. Все ждут пока этот Lock не будет снят.
Это решается на уровне приложения и правильность реализации полностью в вашей ответственности. Например, если забыли разблокировать или сделали перекрёстный Lock (Deadlock как на картинке), то всё зависнет в бесконечном ожидании.
#basic
🔰Airdrop: Ebees
💸Value: 8000 #EBS worth of ($12)
🪐Referral: 2000 $EBS for Each ($3)
⏳Distribution Date: After TGE
💎Ratings: ⭐️⭐️⭐️⭐️⭐️
🔗Airdrop Link: https://t.me/EbeesAirdropRound2Bot
Note: Airdrop will end on 5th September and rewards will be distributed to the winners TRC-20 wallet on after .
TGE September 6th 2022
Disclaimer: Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop tokens. Also we don't recommend you to invest in any new projects, just join airdrop for free
#EBS Television founder Aman Fissehatsion dies
Aman Fissehatsion, founder and Chief Executive Officer of EBS Television, has died after receiving medical treatment for an illness, the station announced today, 11 February 2026.
In a statement issued Wednesday, EBS Television said Aman “played an irreplaceable role in the growth of #Ethiopian media and the success of EBS.” The station described him as “a man of outstanding vision,” adding that while his passing represents a loss to both his family and the institution, “the vision of Aman Fissehatsion will continue.”
The management and staff of EBS Television also expressed what they described as deep sorrow over his death.
Prime Minister #Abiy Ahmed (PhD) extended condolences following the announcement. In a message posted on his official Facebook page, the Prime Minister said Aman was “one of those who played a crucial role in the development of Ethiopia’s private media.”
https://www.facebook.com/share/p/189cm3oGQX/
#java#ai#apache_kafka#aws#azure#cloud#cloud_first#cloud_native#ebs#gcp#kafka#llm#messaging#minio#s3#serverless#spot#streaming
AutoMQ provides a cloud-native alternative to Apache Kafka that runs on S3 storage, cutting costs by up to 90% while enabling instant scaling and eliminating cross-zone traffic fees. It offers high reliability, serverless operation, and full Kafka compatibility, making it easier and cheaper to manage large-scale data streaming without sacrificing performance or features.
https://github.com/AutoMQ/automq