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

SEARCH KEYWORD -- Directly memory access



  How Kafka achieves high throughput low latency

Kafka is a message streaming system with high throughput and low latency. It is widely adopted in lots of big companies. A well configured Kafka cluster can achieve super high throughput with millions of concurrent writes. How Kafka can achieve this? This post will try to explain some technologies used by Kafka. Page cache + Disk sequential write Every time when Kafka receives a record, it will write it to disk file eventually. But if it writes to disk every time it receives a record, it would ...

   BIG DATA,KAFKA     2019-03-08 09:42:57

  Using MemoryMappedBuffer to handle large file in Java

When handling large files, it will largely affect the process speed while using traditional FileInputStream, FileOutputStream or RandomAccessFile since they trigger lots of read and write operations. In Java NIO, a new way of handling large file is introduced which is to use MmeoryMappedBuffer to create memory mapped file. Memory-mapped I/O uses the filesystem to establish a virtual memory mapping from user space directly to the applicable filesystem pages. With a memory-mapped file, you can pre...

   JAVA,IO,NIO     2015-11-13 01:58:08

  malloc/free and new/delete in C++

malloc and free are C++/C language standard library functions, while new/delete are operator of C++. They can be used to allocate dynamic memory and free memory in C++ programs malloc/free can not meet the requirements of dynamic objects creation. Object needs to call the constructor to initialize the object when creating, the object needs to call the destructor before it is destroyed  Since malloc() and free() are library functions rather than operators, the compiler has no control permiss...

   C++,memory,malloc,free,new,delete     2012-06-20 06:52:09

  ByteBuffer in Java

ByteBuffer is introduced in java.nio since Java 1.4. It provides a way of representing raw structured data such as from a file or from network. It enables fast access of underlying data compared to traditional ways like byte[] Prior to Java 1.4, if you want to represent a structured raw data, you need to create a byte[] and then having a set of checks to delimit the byte array to get the expected tokens. There are three ways to create a ByteBuffer: Wrapping an exiting array by calling ByteBuffe...

   JAVA,BYTEBUFFER,ALLOCATION     2015-07-08 03:17:44

  UIWebView Secrets - Part1 - Memory Leaks on Xmlhttprequest

My first blog post on iphone subject reveal a big memory bug when using UIWebView component. This is the (only one) component to display some HTML content in an iphone interface. UIWebView object has a lot of differents issues and I’m going to highlight the biggest of them. Actually, all XMLHttpRequests used in javascript code are fully leaking!!! I mean when you do a request that retrieve 100ko of data, your memory used grow up for 100ko! This bug is not always active, but almost always....

   XMLHttpRequest,Memory leak,Mobile device,UIWebView     2011-11-25 13:46:30

  Why cannot compare double values directly for equality?

A question in PHP: Get some value from the database and use floatval() to convert it to floatint point value, then compare it with another value which is also converted to floating point value with floatval(). These two values are the same when using var_dump() to output, the two outputs are float(8.87), they are the same. But when comparing them for equality, the result is weird., they are not equal. Why?To analyze this question, we need to start with PHP data types. PHP uses weak types. In PHP...

   PHP,floating, precision,compare,equality     2012-06-27 09:01:36

  What surprise Google brings us in Nexus 5?

Because Nexus 4 performed well after release, many people are confident of the performance of the upcoming Nexus 5. It is manufactured by LG and equipped with attractive configurations. LG Nexus 5 will have Android 5 installed, as for hardware, it will have a 5.2 inch screen with a resolution of 1920x1080  Also the processor will be a 2.3GHz Quad-Core processor. The exciting part is it has a 4GB(Some says it's 3GB) memory which is larger than almost all current Android devices which have 2G...

   Nexus 5,Google,LG     2013-04-08 07:37:41

  12 useful Chrome commands

Many useful features of Chrome don't show up on its menus. You can access them through the chrome:// command. In this article we will introduce 12 useful chrome:// commands. 1. chrome://flags It can be used to turn on or turn off some chrome features. 2. chrome://dns This command will show the domain name list caught by the browser. 3. chrome://downloads You can access this through chrome menu as well. The shortcut is Ctrl+J 4. chrome://extensions This command equals to Menu->Tools->Ext...

   Chrome,chrome://     2013-01-25 04:38:03

  An experience of fixing a memory-corruption bug

During the last 4 months, I was disturbed by a memory-corruption bug, and this bug will cause program crash. Until last Monday, I found the root cause and fixed it. This debug process is a difficult but memorable experience, so I will share it in this article.   My program works as a SMS Hub. When it receives a SMS, it will allocate a structure in heap memory like this: typedef struct { ...... int *a[8]; ...... } info; After processing the SMS, the program will free the m...

   c, debug, unix, solaris, multi-thread     2014-05-04 03:52:43

  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