| MemSQL | MongoDB | |
|---|---|---|
| Category | Database | Database, Data Storage |
| Preference | 75% votesvotes | 25% votesvotes |
| Website | www.memsql.com | www.mongodb.org |
| License | Proprietary | AGPLv3 |
| Design | ||
| Database model | Relational, Distributed data structure | Document-oriented, Schema-less, NoSQL |
| Data storage | Volatile memory, File System | Volatile memory, File System |
| Embeddable | Yes | Yes |
| Features | ||
| Query language | SQL | API calls, JavaScript, REST |
| Data types | All MySQL, JSON, BLOB | JSON |
| Conditional entry updates | Yes | Yes |
| Map and reduce | Yes | Yes |
| Unicode | Yes | Yes |
| TTL for entries | No | Yes |
| Compression | Yes | Yes |
| Integrity | ||
| Integrity model | ACID, MVCC | BASE |
| Atomicity | Yes | Conditional |
| Consistency | Yes | Yes |
| Isolation | Yes | Yes |
| Durability (data storage) | Yes | Yes |
| Transactions | Yes | No |
| Referential integrity | Yes | No |
| Revision control | Yes | No |
| Locking model | Lock Free Model, MVCC | Optimistic Locking, Lock on write |
| Indexing | ||
| Secondary Indexes | Yes | Yes |
| Composite keys | Yes | Yes |
| Full text search | No | Yes |
| Geospatial Indexes | Yes | Yes |
| Graph support | No | No |
| Graph type | Oriented graph | ? |
| Distribution | ||
| Horizontal scalable | Yes | Yes |
| Replication | Yes | Yes |
| Replication mode | Master-Slave Replication | Master-Slave-Replica Replication |
| Sharding | Yes | Yes |
| Shared nothing architecture | Yes | Yes |
| Restrictions | ||
| Value size max. | 1 000 EB | 16 MB |
| System requirements | ||
| Operating system | Linux, Amazon EC2 | Linux, Windows, Mac OS X |
| Native driver | C, C++, php, Java, Python, Objective-C, Ruby, Go | Java, php, Ruby, C#, Python, JavaScript, Haskell, Perl, C++, Erlang, Scala, C, Go |
| Memory recommended | 8 GB | ? |
| Memory minimum | 8 GB | ? |
| Architecture | ||
| Programming language | C++ | C++ |
| More | ||
| Description | In-Memory Database used for real-time analytics. | Document Oriented Database |
| Multi-user system | Yes | Yes |
| Accelerometer sensor | No | ? |
| Price rating | ●●●○○ | ●●●●● |
| Software distribution | Package management system | Tarball, Ubuntu Software Center, Package management system, Windows Installer |
| Object-Relational Mapping (ORM) | Yes | Yes |
| Release Date | 18ᵗʰ June 2012 | March 2009 |
| Documentation level | ●●●●○ | ●●●●● |
| Distributed Counter | Yes | ? |
| Free to use | Yes | Yes |
| Active | Yes | Yes |
| Database Connection Pooling | Yes | Yes |
| Real time analytics | Yes | Yes |
| 2 Letter Country Code | US | ? |
| Cloud platform support | Amazon EC2 | Heroku, CloudBee, Bluemix, Amazon EC2, SoftLayer |
| Online backup | Yes | Yes |
| Function Based Index | Yes | No |
| Log | Yes | Yes |
| Download | www.memsql.com/#download | mongodb.org/downloads |
| Backup functionality | Good | Good |
| Query Cache | Yes | Yes |
| Ease of use | ●●●●○ | ●●●●● |
| Free for commercial use | No | Yes |
| Sorts | Yes | Yes |
| Perfomance | ●●●●○ | ●●●●○ |
| Materialized Views | No | No |
| Spring Data Support | Yes | Yes |
| JSON | Yes | Yes |
| Stored Procedure | No | Yes |
| Concurrency | Yes | ? |
| Multi-statement Transactions | Yes | Yes |
| Columner | Yes | ? |
| Brand | ? | MongoDB Inc |
| Extension/Plug-in | ? | Yes |
| Database | ? | MongoDB |
| Standard compliance | ? | No |
| RESTful | ? | Conditional |
| Lines of code | ? | 617 k |
| Community Driven | ? | Good |
| Web interface | ? | Yes |
| Data encryption | ? | Conditional |
| Admin Generator | ? | Yes |
| Partial Index | ? | No |
| Key length max | ? | 128 |
| Implementation flexibility | (0% global votes) | (48% global votes) |
| In-Place Update | ? | Yes |
| Capped Collections | ? | Yes |
| Tuneable write concerns | ? | Yes |
| Read preferences | ? | Yes |
| Open Source | ? | Yes |
| Op/s | ? | 5 000 |
| Triggers | ? | No |
| Pause Test | ? | Yes |
| Cross Domain Testing | ? | No |
| Pipeline Aggregation | ? | Yes |
| Geospatial | ? | Yes |
| Server Side Java Script | ? | Yes |
| Flexible Table(Schema) | ? | Yes |
| Geo-distributed | ? | Yes |
| Max rows in query result | ? | 1 000 |
| Re-Reduce | ? | Yes |
| Clustering over WAN | ? | Yes |
| Fully Distributed | ? | Yes |
| Auto-Sharding | ? | Yes |
| memcached protocol | ? | No |
| Monitoring UI | ? | Yes |
| Recursive queries | ? | No |
| Network datatype | ? | No |
| Windowed aggregate | ? | No |
| CLI` | ? | Yes |
2015年6月2日 星期二
MemSQL vs. MongoDB
2014年10月1日 星期三
2014年9月23日 星期二
Linux 圖片轉檔指令
convert beach.gif beach.pnm
NAME
convert - convert an image or sequence of images
SYNOPSIS
convert [ options ... ] input_file output_file
DESCRIPTION
Convert converts an input file using one image format to an output file with a differing image format. In addition, various types of image processing can be performed on the converted image during the conversion process. Convert recognizes the image formats listed in ImageMagick.
NAME
convert - convert an image or sequence of images
SYNOPSIS
convert [ options ... ] input_file output_file
DESCRIPTION
Convert converts an input file using one image format to an output file with a differing image format. In addition, various types of image processing can be performed on the converted image during the conversion process. Convert recognizes the image formats listed in ImageMagick.
2014年9月18日 星期四
Install Flask on CentOS 7.0
1. Install pip on CentOS 7.0
## First install the EPEL repo as per your Operating system version and architecture.
rpm -ivh http://mirror01.idc.hinet.net/EPEL/7/x86_64/e/epel-release-7-1.noarch.rpm
yum install -y python-pip
2. Install Flask
pip install Flask
## Test
vi hello.py
## Verify
python hello.py
* Running on http://0.0.0.0:80/
## First install the EPEL repo as per your Operating system version and architecture.
rpm -ivh http://mirror01.idc.hinet.net/EPEL/7/x86_64/e/epel-release-7-1.noarch.rpm
yum install -y python-pip
2. Install Flask
pip install Flask
## Test
vi hello.py
from flask import Flaskapp = Flask(__name__)
@app.route("/")def hello(): return "Hello World!"
if __name__ == "__main__": app.run()
## Verify
python hello.py
* Running on http://0.0.0.0:80/
2014年7月17日 星期四
Python: ConfigParser
[core]
cmd = /usr/bin/vim
[mod]
safe_edit = yes
time_interval = 20
python 程式如下:
#!/usr/bin/python
from ConfigParser import SafeConfigParser
parser = SafeConfigParser()
parser.read('test.conf')
#傳回字串 /usr/bin/vim
parser.get('core', 'cmd')
#傳回 boolean 值 True
parser.getboolean('mod', 'safe_edit')
#傳回整數值 20
parser.getint('mod', 'time_interval')
references:
http://williewu.blogspot.tw/2007/10/python-configparser.html
https://wiki.python.org/moin/ConfigParserExamples
https://docs.python.org/2.6/library/configparser.html
How to find script's directory
import os
print os.path.dirname(os.path.realpath(__file__))
http://stackoverflow.com/questions/4934806/python-how-to-find-scripts-directory
2014年7月15日 星期二
strip in C programming
strtok(Name, "\n");
references:
http://stackoverflow.com/questions/2693776/removing-trailing-newline-character-from-fgets-input
2014年5月5日 星期一
2014年3月26日 星期三
Linux TOP 指令說明
Linux TOP 指令說明
VIRT 程序使用的虛擬記憶體總量,單位 kb。VIRT=SWAP+RES
RES 程序使用的、未交換出的實體記憶體大小,單位 kb。RES=CODE+DATA
SHR 共享記憶體大小,單位 kb
reference
http://blog.ycnets.com/2013/09/01/linux-commandtop/
2014年1月17日 星期五
GnuPlot references
地圖/統計圖/3d 函數圖/實驗報告圖 -- Gnuplot 純畫圖 (作者: 洪朝貴老師)
http://user.frdm.info/ckhung/b/ma/gnuplot.php
Gnuplot 入門教學
http://randle.wordpress.com/2007/06/12/gnuplot-induction/
http://user.frdm.info/ckhung/b/ma/gnuplot.php
Gnuplot 入門教學
http://randle.wordpress.com/2007/06/12/gnuplot-induction/
2013年12月20日 星期五
Upgrade to CentOS 6.5 from CentOS 6.4
yum clean all
yum update glibc* yum* rpm* python*
yum update
reboot
cat /etc/redhat-release
## Output ##
CentOS release 6.5 (Final)
lsb_release -a
## Output ##
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
references:
http://www.if-not-true-then-false.com/2011/upgrade-centos-6/
yum update glibc* yum* rpm* python*
yum update
reboot
cat /etc/redhat-release
## Output ##
CentOS release 6.5 (Final)
lsb_release -a
## Output ##
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
references:
http://www.if-not-true-then-false.com/2011/upgrade-centos-6/
2013年7月30日 星期二
GDB: Missing separate debuginfos
Fixed GDB: Missing separate debuginfos
1. 修改 /etc/yum.repos.d/CentOS-Debuginfo.repo, set enabled=1
2. yum install yum-utils
3. debuginfo-install glibc
如果還是不行更新 gdb and glibc
1. 修改 /etc/yum.repos.d/CentOS-Debuginfo.repo, set enabled=1
2. yum install yum-utils
3. debuginfo-install glibc
2012年10月17日 星期三
Translate int to string
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
string int2str(int &);
int main(void) {
int i = 123;
string s;
s = int2str(i);
cout << s << endl;
}
string int2str(int &i) {
string s;
stringstream ss(s);
ss << i;
return ss.str();
}
#include <string>
#include <sstream>
using namespace std;
string int2str(int &);
int main(void) {
int i = 123;
string s;
s = int2str(i);
cout << s << endl;
}
string int2str(int &i) {
string s;
stringstream ss(s);
ss << i;
return ss.str();
}
2012年10月16日 星期二
2012年8月20日 星期一
2012年7月3日 星期二
C/C++ 中的括號
在 C語言中的括號分別化表
{ } 大括號表示函式本體的開始與結束
( ) 小括號在函式的宣告中使用
大括號的另類用法,指定了變數的作用範圍,在大括號中的變數都是局部變數,有效區域只在大括號中有效。有效利用這個特性可以使程式簡單明白。
int a = 5;
{
int a = 2;
printf("Here a=%d!!\n", a);
}
printf(" a=%d!!\n", a);
{ } 大括號表示函式本體的開始與結束
( ) 小括號在函式的宣告中使用
大括號的另類用法,指定了變數的作用範圍,在大括號中的變數都是局部變數,有效區域只在大括號中有效。有效利用這個特性可以使程式簡單明白。
int a = 5;
{
int a = 2;
printf("Here a=%d!!\n", a);
}
printf(" a=%d!!\n", a);
2012年5月29日 星期二
NFSv4 設定
最近在設定CentOS 6 的時候發現, NFS default 是用version 4. 不察之下發現設不起來 ><
底下是NFSv4 的設定
CentOS 6時,由於NFS為NFSv4,需多設定一個檔案為/etc/idmapd.conf 還有必須啟動rpcidmapd服務
Head Node
#### vi /etc/idmapd.conf
[General]
Verbosity = 1 #主要更改
# The following should be set to the local NFSv4 domain name
# The default is the host's DNS domain name.
Domain = snowfox #主要更改
.
. (略)
.
#Local-Realms =
[Mapping]
#Nobody-User = nobody
#Nobody-Group = nobody
然後 將rpcidmapd服務開啟 service rpcidmapd start chkconfig rpcidmapd --level 345 on
2012年5月28日 星期一
安裝 wxPython
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
yum install wxPython.x86_64 wxPython-devel.x86_64
Dependencies Resolved
==================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================
Installing:
wxPython x86_64 2.8.9.1-1.el5.rf dag 22 M
wxPython-devel x86_64 2.8.9.1-1.el5.rf dag 479 k
Installing for dependencies:
wxGTK x86_64 2.8.10-1.el5.rf dag 27 M
wxGTK-devel x86_64 2.8.10-1.el5.rf dag 1.1 M
2012年3月29日 星期四
Identify the speed of memory
dmidecode is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format.
dmidecode
# dmidecode 2.11
SMBIOS 2.5 present.
30 structures occupying 1372 bytes.
Table at 0x0009D800.
2012年3月5日 星期一
vm.swappiness
vm.swappiness is a tunable kernel parameter that controls how much the kernel favors swap over RAM. At the source code level, it’s also defined as the tendency to steal mapped memory. A high swappiness value means that the kernel will be more apt to unmap mapped pages. A low swappiness value means the opposite, the kernel will be less apt to unmap mapped pages. In other words, the higher the vm.swappiness value, the more the system will swap.
The default value I’ve seen on both enterprise level Red Hat and SLES servers is 60.
step of modify:
sysctl -w vm.swappiness=0 (default: 60)
swapoff -a
swapon -a
ADD vm.swappiness=0 to /etc/sysctl.conf
References:
What Is the Linux Kernel Parameter vm.swappiness?
http://overinfinityresearch.blogspot.com/2008/09/ubuntu804.html
訂閱:
文章 (Atom)