Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Blocking



  What is blocking and how would you troubleshoot it?

Blocking is a common occurrence in an SQL server context, but if you are new to the world of database management you might not know what this issue entails and perhaps even fear that it is a sign of serious underlying problems. To allay your fears and clear up the mystery, here is a brief overview of blocking and the steps you can take to tackle it. Image Source: Pixabay SQL blocking explained SQL blocking according to SentryOne is an offshoot of the way that concurrent databases operate. Becau...

   SQL,DEADLOCK     2020-09-17 08:50:55

  What can select do in GoLang

In Go language, select is a keyword used to listen to and perform IO operations related to channels. With the select statement, we can simultaneously listen to multiple channels and perform corresponding operations when any of the channels are ready. This article will summarize the common uses of the select statement and provide some considerations when using it. Basic syntax The basic syntax of the select statement is as follows: select { case <-channel1: // when channel1 has data to ...

   GOLANG,SELECT,USAGE,SYNTAX,TUTORIAL     2023-08-12 20:17:02

  NIO vs IO in Java

Java 1.4 provides a new API for handling IO -- NIO. This is a non-blocking and buffer oriented IO API. Below are main differences between the NIO and IO in Java. IO NIO Stream oriented Buffer oriented Blocking IO Non-blocking IO N/A Using selector Stream oriented vs Buffer oriented The main difference is that IO is stream oriented where the data is read byte by byte and the data will not be buffered normally.This means there is no pointer to move forward and backward in the stream. I...

   JAVA,IO,NIO     2016-01-10 01:40:02

  A Solution to CPU-intensive Tasks in IO Loops

Back in October 2011, Ted Dziuba infamously said that Node.js is Cancer.  A provocative title to a provocative article.  The only thing it didn’t really provoke in the commentary was much thought ;)  Zing. My interpretation of the article is that Ted holds up the classic blocking-IO process-per-request (or  thread per request; same difference) model as superior.  Yet we all remember where the blocking-IO forking model got Apache in the early days.  ...

   CPU,Intensive IO loops,Solution,C++     2012-02-06 07:42:40

  Why is single threaded Redis so fast

Redis is a high-performance, in-memory key-value database. According to official test reports, it can support around 100,000 QPS (queries per second) on a single machine. However, Redis uses a single-threaded architecture in its design. Why does Redis still have such high performance with a single-threaded design? Wouldn't it be better to use multiple threads for concurrent request processing? In this article, let's explore why Redis has a single-threaded architecture and still maintains its spe...

   REDIS,SINGLE-THREADED,MULTI-THREADING     2023-02-28 05:16:22

  Practice of using spinlock instead of mutex

Spinlock and mutex are two important concepts in multithreading programs. They are used to lock some shared resource to prevent concurrent access which may affect data consistency. But they do have differences, what are the differences? when should we use spinlock instead of mutex? The Theory In theory, when a thread tries to lock a mutex and it does not succeed, because the mutex is already locked, it will go to sleep, immediately allowing another thread to run. It will continue to sleep until...

   Spinlock,Mutex,Concurrency     2014-04-19 21:54:12

  What kind of automated testing does Facebook do?

We do several kinds of testing. Some specifics:For our PHP code, we have a suite of a few thousand test classes using the PHPUnit framework. They range in complexity from simple true unit tests to large-scale integration tests that hit our production backend services. The PHPUnit tests are run both by developers as part of their workflow and continuously by an automated test runner on dedicated hardware. Our developer tools automatically use code coverage data to run tests that cover the ...

   Facebook,Testing,PHP,Automated testing     2012-02-28 08:10:10

  Why there is white/blank space instead of AdSense ad on my website?

Usually if you see on your website a white/blank space instead of Adsense ads, this means that Adsense cannot show adds in that unit for some reasons (we are going to talk about possible reasons below) and also you have enabled the “Fill space with a solid color” feature (in the “Choose what to display if no relevant ads are available” settings of this ad unit). I probably should also say that if you set “Show public service ads” instead of the “F...

   AdSense,Ads,Blank,Reason,Solution     2011-07-25 12:52:29

  Different ways of handling concurrent job in GoLang

GoLang provides very good support of concurrency and the way to make some code to run concurrent is pretty simple and straightforward. Adding a simple go before a normal function call will make the function call asynchronous. In real cases normally people would concurrently run some jobs to improve the speed and efficiency. One important part of running jobs concurrently is about aggregating results so that the consequent function call would be able to proceed. There are multiple ways handling t...

   COMPARISON,WORKER POOL,WAITGROUP,CONCURRENT     2021-05-15 11:13:53

  Chrome to block mixed content downloads in version 86

Google has announced its plan to block mixed content downloads in Chrome in February 2020 and now the day to block mixed content downloads is coming soon as we are nearing October when Chrome 86 is supposed to be released. What is mixed content downloads? According to Google, it is non-HTTPS downloads started on secure pages. For example, if you access a page called https://example.com/download, and in this page, there is a download link to http://download.example.com/something, ...

   CHROME,MIXED CONTENT DOWNLOADS     2020-09-18 21:10:53