synchronization

Futex throughput on Linux

♀尐吖头ヾ 提交于 2020-02-28 07:03:41
问题 I have an async API which wraps some IO library. The library uses C style callbacks, the API is C++, so natural choice (IMHO) was to use std::future/std::promise to build this API. Something like std::future<void> Read(uint64_t addr, byte* buff, uint64_t buffSize) . However, when I was testing the implementation I saw that the bottleneck is the future/promise , more precisely, the futex used to implement promise/future . Since the futex, AFAIK, is user space and the fastest mechanism I know

Futex throughput on Linux

…衆ロ難τιáo~ 提交于 2020-02-28 07:03:38
问题 I have an async API which wraps some IO library. The library uses C style callbacks, the API is C++, so natural choice (IMHO) was to use std::future/std::promise to build this API. Something like std::future<void> Read(uint64_t addr, byte* buff, uint64_t buffSize) . However, when I was testing the implementation I saw that the bottleneck is the future/promise , more precisely, the futex used to implement promise/future . Since the futex, AFAIK, is user space and the fastest mechanism I know

Android: Enable/Disable Auto Sync and Background Data

久未见 提交于 2020-02-27 08:54:37
问题 I want to develop an application that disables the Background Data (new feature in Android 1.5) and Auto Sync and then enables GPRS/EDGE connection and vice versa. I figured out how to enable/disable GPRS/EDGE by changing the APN settings. (weird solution. However; Android developers couldn't think a user may want to disable GPRS/EDGE) But, I couldn't find a way to enable/disable Auto Sync and Background data. I investigated the Android code and as I understood, the Sync operation is an

synchronizing audio over a network

柔情痞子 提交于 2020-02-26 04:32:07
问题 I'm in startup of designing a client/server audio system which can stream audio arbitrarily over a network. One central server pumps out an audio stream and x number of clients receives the audio data and plays it. So far no magic needed and I have even got this scenario to work with VLC media player out of the box. However, the tricky part seems to be synchronizing the audio playback so that all clients are in audible synch (actual latency can be allowed as long as it is perceived to be in

How to keep two folders automatically synchronized?

大兔子大兔子 提交于 2020-02-26 04:31:19
问题 I would like to have a synchronized copy of one folder with all its subtree. It should work automatically in this way: whenever I create, modify, or delete stuff from the original folder those changes should be automatically applied to the sync-folder. Which is the best approach to this task? BTW: I'm on Ubuntu 12.04 Final goal is to have a separated real-time backup copy, without the use of symlinks or mount. I used Ubuntu One to synchronize data between my computers, and after a while

How to keep two folders automatically synchronized?

…衆ロ難τιáo~ 提交于 2020-02-26 04:31:19
问题 I would like to have a synchronized copy of one folder with all its subtree. It should work automatically in this way: whenever I create, modify, or delete stuff from the original folder those changes should be automatically applied to the sync-folder. Which is the best approach to this task? BTW: I'm on Ubuntu 12.04 Final goal is to have a separated real-time backup copy, without the use of symlinks or mount. I used Ubuntu One to synchronize data between my computers, and after a while

synchronizing audio over a network

故事扮演 提交于 2020-02-26 04:31:00
问题 I'm in startup of designing a client/server audio system which can stream audio arbitrarily over a network. One central server pumps out an audio stream and x number of clients receives the audio data and plays it. So far no magic needed and I have even got this scenario to work with VLC media player out of the box. However, the tricky part seems to be synchronizing the audio playback so that all clients are in audible synch (actual latency can be allowed as long as it is perceived to be in

Sync elasticsearch on connection with database - nodeJS

故事扮演 提交于 2020-02-25 21:25:06
问题 Aim : sync elasticsearch with postgres database Why : sometimes newtwork or cluster/server break so future updates should be recorded This article https://qafoo.com/blog/086_how_to_synchronize_a_database_with_elastic_search.html suggests that I should create a separate table updates that will sync elasticsearch's id , allowing to select new data (from database) since the last record (in elasticsearch). So I thought what if I could record elasticsearch's failure and successful connection: if

Uniquely identify files/folders in NTFS, even after move/rename

江枫思渺然 提交于 2020-02-24 11:01:14
问题 I haven't found a backup (synchronization) program which does what I want so I'm thinking about writing my own. What I have now does the following: It goes through the data in the source and for every file which has its archive bit set OR does not exist in the destination, copies it to the destination, overwriting a possibly existing file. When done, it checks for all files in the destination if it exists in the source, and if it doesn't, deletes it. The problem is that if I move or rename a

Uniquely identify files/folders in NTFS, even after move/rename

独自空忆成欢 提交于 2020-02-24 11:01:08
问题 I haven't found a backup (synchronization) program which does what I want so I'm thinking about writing my own. What I have now does the following: It goes through the data in the source and for every file which has its archive bit set OR does not exist in the destination, copies it to the destination, overwriting a possibly existing file. When done, it checks for all files in the destination if it exists in the source, and if it doesn't, deletes it. The problem is that if I move or rename a