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

SEARCH KEYWORD -- Close



  A Programming Idiom You've Never Heard Of

Here are some sequences of events: Take the rake out of the shed, use it to pile up the leaves in the backyard, then put the rake back in the shed. Fly to Seattle, see the sights, then fly home. Put the key in the door, open it, then take the key out of the door. Wake-up your phone, check the time, then put it back to sleep. See the pattern? You do something, then do something else, then you undo the first thing. Or more accurately, the last step is the inverse of the first. Once you're aware ...

   Programming,Idiom,Strange     2012-01-04 08:12:25

  Easy Parallel Processing in PHP

The proliferation of multicore CPUs and the inability of our learned CPU vendors to squeeze many more GHz into their designs means that often the only way to get additional performance is by writing clever parallel software. One problem we were having is that some of our batch processing jobs were taking too long to run. In order to speed the processing, we tried to split the processing file into half, and let a separate PHP process run each job. Given that we were using a dual core serv...

   PHP,Parallel processing,Multithreading like,Sleep     2011-12-12 10:58:59

  Service discovery with etcd

In previous post, we have talked about etcd and its usage. This post we will cover how to implement server discovery with etcd. Service discovery is to solve one of the most commonly seen scenarios in distributed system where how to find the corresponding target service to talk to. In short, it is to find some server which one can talk to based on some service name. A complete service discovery system include below three key functions: Service registration: A service must register itself to so...

   ETCD,SERVICE DISCOVERY,DEMO,TUTORIAL     2021-03-08 05:36:29

  SpaceX's Starlink satellites were endangering other satellites

On 3 Dec 2021, The Permanent Mission of China sent a note to UN General Assembly complaining two dangerous approaches to China's Shenzhou space station from SpaceX's Starlink satellites during 2021. These two dangerous approaches were happening in July and October respectively and they almost caused collisions of the Starlink satellites and the Shenzhou space station because the two SpaceX satellites manoeuvred continuously to the orbit of China's space station. These dangerous approaches forced...

   SHENZHOU SPACE STATION,SPACEX STARLINK,CHINA SPACE STATION     2021-12-27 10:56:51

  Demo on creating worker pool in GoLang

A worker pool is a pool where a specified number of workers(usually goroutine) created and run to pick up tasks. This can allow multiple tasks to be ran at the same time while keeping the number of workers a fixed number to avoid overuse of resource in the program. There are usually two approaches of creating worker pool. One is with fixed number of workers pre-created One is creating worker when needed until the max number of workers created In this post, we will cover the demonstration of cr...

   WORKER POOL,GOLANG,GOROUTINE     2021-01-24 05:04:00

  Generating CSR using Java

A CSR(Certificate Signing Request) is a kind of request generated by an application and is to be sent to a Certificate Authority to create a signed certificate which can be distributed. It usually contains certificate information such as subject name, public key info and signature info. In Java, keytool can be used to generate a certificate request with option -certreq.  But sometimes if an application wants to create a CSR programmatically, keytool will not do a favor, instead you should u...

   JAVA,SECURITY,CSR,CERTIFICATE REQUEST     2016-05-25 04:49:17

  Is Facebook developing RSS reader?

According to Sina Tech, on Thursday developer Tom Waddington said that he found some strings like "RSS feeds" in Facebook codes, it means that Facebook may launch its own RSS reader.Google announced in March this year that they would close its RSS subscription service Google Reader on July 1 mainly because its use had constantly declined in the past few years. Subsequently, many companies competing to launch Google Reader alternatives. Waddington believes that this time Facebook will also join t...

   Facebook,RSS reader     2013-06-14 12:41:11

  A simple tutorial on GoLang connecting to Clickhouse

Go, also known as Golang, is a statically-typed, concurrent programming language created by Google. ClickHouse is a high-performance, column-oriented database management system that can be used for real-time data analysis. This tutorial will provide a deep dive into how to connect to ClickHouse from a Go program, including how to perform common database operations such as SELECT and INSERT statements. Before proceeding, it is assumed that you already have Go and ClickHouse installed on your mach...

   GOLANG,CLICKHOUSE,TUTORIAL     2023-02-11 07:05:36

  Mastering Go Channels: How to Build Concurrent Applications Like a Pro

Introduction In the world of concurrent programming, Go channels have quickly become a popular tool for building fast and efficient applications. Utilizing channels can help you take full advantage of the power of Go's lightweight threads, or goroutines, and enable you to easily and effectively manage data sharing and synchronization. In this article, we'll dive deep into the world of Go channels and show you how to build concurrent applications like a pro. Understanding Go Channels To start, le...

   GOLANG,CHANNEL,CONCURRENCY     2023-04-21 14:47:47

  php://input in PHP

When using xml-rpc, server side will get the data from client with php://input method instead of $_POST. Hence today we will discuss php://input. PHP official manual has below explanation to php://input: “php://input allows you to read raw POST data. It is a less memory intensive alternative to $HTTP_RAW_POST_DATA and does not need any special php.ini directives. php://input is not available with enctype=”multipart/form-data”. Here we und...

   php://input, IO, input     2013-02-25 20:43:00