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

 ALL


  How to do pprof for gRPC service

gRPC is a RPC framework based on HTTP and is frequently used for communications among micro service inside the same organization network. However,  the service functions cannot be accessed via normal HTTP URL as it's not a WEB framework. In this case, how to do pprof on a gRPC service?The trick is starting a HTTP server asynchronously while starting the gRPC service. This HTTP server can be accessed to run prrof debug.go func(){ http.ListenAndServe(":10001", nil)}()Since it uses the default ServerMux, the pprof related routes will be registered automatically after importing the package&nb...

3,881 0       PPROF GOLANG GRPC


  How Can Your Data Be Stolen Online?

In 2019, according to Statista, nearly 165 million sensitive records were exposed in the US due to data breaches. Unfortunately, data theft is not going anywhere. Hackers are using increasingly sophisticated methods to steal information, but thankfully there are measures you can take to ensure your data stays safe. Here are some of the most common ways people get their data stolen online and how you can take precautions against the methods cybercriminals use.Human ErrorHacking is one of the most common ways people get their data stolen online. But it is often due to online users making errors ...

900 0       DATA SECURITY PROTECTION KID


  Cloud Computing’s most Basic Concepts-Service Models

With the containerization of Docker, Kubernetes, CNCF, and the development of open-source communities, related frameworks and technology is booming and iterating rapidly. Cloud Computing, been applied for many years, is pushing developers into the new technological era. Companies and developers who are not using or not planning to use Cloud-Native gradually feel tremendous pressure in keeping up with the technology trends.The first step is to understand the concepts of IaaS, PaaS, FaaS, SaaS, Serverless, CaaS, etc., which appear in almost all cloud computing-related conferences, technologies, ...

1,356 0       CLOUD PAAS IAAS CONCEPT


  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-createdOne is creating worker when needed until the max number of workers createdIn this post, we will cover the demonstration of creating fixed number of workers pre-ahead. This approach is usually used when one knows there are lots of t...

6,315 0       WORKER POOL GOROUTINE GOLANG


  Using JavaScript to operate clipboard

Browsers allow JavaScript to read and write data on clipboard. Generally script should not modify user's clipboard to avoid impacting user expectation, but there are cases where this can indeed bring convenience to users. For example, for some code snippet, user can copy it to clipboard with one click instead of select and copy manually.There are three options for clipboard operation provided in JavaScript/browser:document.execCommand()Asynchronous Clipboard APIcopy and paste eventsThis post will briefly talk about these three options.document.execCommand()This is the early option for operatin...

3,260 0       JAVASCRIPT CLIPBOARD NAVIGATOR.CLIPBOARD


  What is encryption? Its role in the modern age

“Messages and calls are end-to-end encrypted.” If you are a WhatsApp user, you must have read this statement at the top of chats you open. Now, what does it mean? The statement signifies that all the messages or voice notes shared between users are encrypted, and no one can read or listen in on them.As mostly all of us use messaging apps and emails, information security has become a major concern. Moreover, we don’t know how many digital footprints we leave on the web can be tracked and used against us. We expose most of the details without even realizing it. For instance, by...

833 0       DATA SECURITY VPN


  Dos and Don’ts in Test automation in your project

Test automation is a vital step for any digital solution. With time, its architecture gets more complex, new features are added, and it acquires more users. Thus, your QA team needs to spend more time and effort to ensure the application usability and smooth user experience with no bugs and defects.So here are the things you need to consider before the start of the automation initiative:Define Success MetricsIt’s hard to measure success until you haven’t set up clear goals from the automation. It can be the complete automation of unit tests in the project, or increase the tests cov...

789 0       TESTING TEST AUTOMATION


  How does GoLang know how many CPUs to use?

When running lscpu command on Linux, it will list the CPU info on the machine. Take one example where there is one CPU with 2 cores and each core has two threads which indicates there are 4 cores available.Now let's see how many cores GoLang program would identify.From output, NumCPU and GOMAXPROCS both output 4 which is expected. How does go runtime get this info, does it get it through similar command like lscpu or /proc/cpuinfo? Let's dig more in GoLang's source code.In runtime/debug.go, it tells that this value is from the global variable ncpu which is set when process starts and...

6,882 0       NCPU GOLANG CPU