Infinite


  • Home

  • Categories

  • Archives

  • Tags

  • Sitemap

  • RSS

  • Search

C++ Atomic

Posted on 2018-01-20 | Post modified 2019-11-16 | In program | Visitors

What exactly is std::atomic
C++ atomics and memory ordering

This is used to prevent the CPU from doing the instruction reordering.

An operation (or set of operations) is atomic, linearizable, indivisible or uninterruptible if it appears to the rest of the system to occur at once without being interrupted. Atomicity is a guarantee of isolation from interrupts, signals, concurrent processes and threads.

Read more »

what is mutual exclusion 互斥

Posted on 2018-01-20 | Post modified 2019-11-16 | In program | Visitors

it is the requirement that one thread of execution never enter its critical section at the same time that another concurrent thread of execution enters its own critical section

不允许多线程对 critical section (可以是 share variables)的同时访问。

下面是用 linked list 的删除操作来说明。

1

两个线程同时进行删除操作,分别想删除 i 和 i+1,同时执行了

  • node(i-1)->next = node(i)->next (为了删除 node(i))
  • node(i)->next = node(i+1)->next (为了删除 node(i+1))
    Read more »

review on Geospatial Performance Improvements in MongoDB 3.2

Posted on 2018-01-15 | Post modified 2019-11-16 | In database | Visitors

link

In mongoDB version before v3.2, $geoNear operation was sometimes slow for queries on dense datasets.

After version v3.2, this algorithm had been upgrade. This is a brief explanation about the upgrade.

The $geoNear algorithm iteratively expands its search in distance intervals (the red annulus shown below), aiming to have a few hundred documents per interval. Searching all documents in an interval is accomplished by finding an index cell covering. This covering ensures that all of the documents in the interval can be found using an index scan. The documents in the covering but not in the interval are filtered out afterwards. After all of the documents in an interval are found, they are sorted and returned.

Read more »

Paper review: A Scalable Distributed Spatial Index for the Internet-of-Things

Posted on 2018-01-15 | Post modified 2019-11-16 | In review | Visitors

This is an article about partitioning geo-index at SOCC17 from UCB by Anand.

Main idea

The era of the Internet of things is imminent. Big data of IoT is inherently geospatial in nature and has unpredictable skews in space and time.

In order to overcome the skews and give the best performance, partition and re-balance are critical to the database and key-value store. However, frequent re-balance operation will harm insertion performance.

Read more »

Dynamo: Amazon's Highly Available Key-value Store

Posted on 2018-01-12 | Post modified 2019-11-16 | In review | Visitors

Summary

This is the paper presented at 2007’s SOSP by Amazon.

In order to provide high availability Dynamo sacrifices consistency under certain failure scenarios ().

Amazon’s primary usecase for Dynamo is its shopping cart, where it’s really important to be highly available, or customers should be able to view and add items to shopping cart dispite of datacenter failure.

In a cluster consists of millions of components, it always have small but significant number of server or network components failing at any giving time. Dynamo should be able to treats these as normal case without impacting availability or performance.

Read more »

mongoDB index 与 performance

Posted on 2018-01-10 | Post modified 2019-11-16 | In database | Visitors
  • Introduce to NoSql

Single Field indexes

对 collection 里的某一个 field 创建的 index 就是 sigle field indexes。它的特点:

  • keys from only one Field
  • can find a single value for the indexes field
  • can find a range of values
  • can use dot notation to index field in subdocuments
  • can be used to find several distinct values in a single query
    Read more »
<1…567…10>
XS Zhao

XS Zhao

60 posts
12 categories
36 tags
GitHub Facebook Instagram E-Mail
Recent Posts
  1. Ethereum Project Infrastructure
  2. Dapp: Lottery Contract
  3. Write ethereum test code
  4. Review: bLSM:* A General Purpose Log Structured Merge Tree
  5. Review: ElasticBF: Fine-grained and Elastic Bloom Filter Towards Efficient Read for LSM-tree-based KV Stores
© 2017 - 2020 XS Zhao
Powered by Hexo
Theme - NexT.Muse
0%