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

SEARCH KEYWORD -- Knowledge transfer



  Output a file with HTTP range header in PHP

When downloading a large file, we may encounter some network issues which causes download termination and only part of the file is downloaded. When the network connection resumes next time, we may need to redownload the file again from the beginning. In order to save bandwidth, http provides a Range parameter in its header which can control the file transfer flow. With the range parameter in the header, we can resume the download from where we stop. Here is a piece of PHP code snippet which uses...

   PHP, range,http, file transfer     2013-01-09 05:55:05

  App's user value doesn't necessarily bring business value

There is an old saying in Internet world, you can get business value as long as you can achieve user value. Is this statement outdated in mobile Internet era? This statement originated from PC Internet era, but now the time users spend on PC drops and user behavior tends to be stable and conservative. In contrast, people are more willing to stay on mobile devices. The difference between PC and mobile is that users are freely to move around on PC end. People can navigate from one link to another ...

   App,Business value,User value     2013-06-25 10:52:12

  The world's first HTML5 SIP client

This is the world's first open source HTML5 SIP client (May 12, 2012) entirely written in javascript for integration in social networks (FaceBook, Twitter, Google+), online games, e-commerce sites... No extension, plugin or gateway is needed. The media stack rely on WebRTC. The client can be used to connect to any SIP or IMS network from your preferred browser to make and receive audio/video calls and instant messages. The protocol parsers (SIP, SDP...) are highly optimized using Ragel loo...

   HTML5,SIP,CLient,Google     2012-05-21 06:18:34

  Big file transfer in Linux

It's very common that we need to transfer files between two different hosts such as backups. It is also an very simple task, we can use scp or rsync to complete the task well. But what if the file is very big, it may take some time to transfer it. How can we transfer a big file with high speed? Here we propose one solution. Copy file If we copy one uncompressed file, then we should follow below steps: Compress data Send it to another host Uncompress the data Verify the data integrity This will...

   Linux, SCP,ZIP     2013-01-10 05:55:50

  Why accessing Java HashMap may cause infinite loop in concurrent environment

HashMap in Java is frequently used to handle key/value pairs. But it is not a good candidate to be used in concurrent environment where ConcurrentHashMap should be used instead. If used in concurrent environment, it may cause lots of unexpected behavior even including make the program getting into an infinite loop situation. To understand how this can happen, let's first discuss how HaspMap works internally. In this post we will use implementation of HashMap before Java 8 as example, Java 8 prov...

   JAVA,HASHMAP,INFINITE LOOP     2020-03-29 01:47:00

  How does Base64 work

Base64 is a data encoding scheme used in safe data transfer such as HTTP and its extensions. Base64 encoding can conver arbitrary group of bytes into a sequence of readable ASCII characters. These converted characters can safely put in a HTTP header without causing any problem while the peers process the HTTP header. Base64 encoding was invented as part of the MIME content transfer encoding. It is similar to other encoding schemes such as Uuencode and BinHex but with higher efficiency....

   ALGORITHM,BASE64     2016-03-09 23:47:40

  Remote execute command in Java example

Frequently there is a need to logon to a remote system and run some commands or programs to get the output, many software can serve this purpose such as putty and gitshell.These software usually provide secure access to the remote system. But have you ever wondered what to do if you need to run commands on many different systems at the same time and get all these results back at a single place? Especially in big data era, many tasks may run on different distributed systems and you want o have a ...

   JSch, Example, Distributed system, SSH2     2014-12-12 03:20:19

  RAM is the new disk...

Jim Gray, a man who has contributed greatly to technology over the past 40 years, is credited with saying that memory is the new disk and disk is the new tape. With the proliferation of "real-time" web applications and systems that require massive scalability, how are hardware and software relating to this meme? Tim Bray, in his discussions about grid computing before it became such a hot topic, pointed out how advances in hardware around RAM and networking were allowing for the creation...

   RAM,Flash,Memory,,Future,Disk     2011-08-12 07:34:27

  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

  Understanding How is Data Stored in RDBMS

We all know that DBMS (database management system) is used to store (a massive amount of) data. However, have you ever wondered how is data stored in DBMS? In this post, we will focus on data storage in RDBMS, the most traditional relational database systems. Physical Storage Data can be stored in many different kinds of medium or devices, from the fastest but costy registers to the slow but cheap hard drives, or even magnetic tapes. Nowadays, IaaS providers such as AWS...

   RDBMS,DATABASE     2019-02-04 09:25:36