惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Know Your Adversary
Know Your Adversary
小众软件
小众软件
L
LangChain Blog
月光博客
月光博客
博客园 - Franky
Microsoft Azure Blog
Microsoft Azure Blog
Y
Y Combinator Blog
有赞技术团队
有赞技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
V
Visual Studio Blog
TaoSecurity Blog
TaoSecurity Blog
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
L
LINUX DO - 热门话题
C
Check Point Blog
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
The Hacker News
The Hacker News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
博客园 - 司徒正美
T
Threatpost
P
Palo Alto Networks Blog
A
About on SuperTechFans
Spread Privacy
Spread Privacy
Engineering at Meta
Engineering at Meta
N
News | PayPal Newsroom
T
Tailwind CSS Blog
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
A
Arctic Wolf
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 聂微东
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Vulnerabilities – Threatpost
H
Hacker News: Front Page

博客园 - tmfc

LightCloud设计特点 有怪兽,有怪兽 - 通过MONSTER OF COMPRESSION选择压缩算法 [翻译]更有效的使用垃圾收集– 第一部分 企业架构应用模式读书笔记(四) 企业架构应用模式读书笔记(三)下 企业架构应用模式读书笔记(三)上 企业应用架构模式读书笔记(二) 企业应用架构模式读书笔记(一) 对[解耦的故事]的一些补充 解耦的故事(二)-松耦合时代的来临 解耦的故事(一)-tmfc的开关 [翻译]了解ASP.NET底层架构系列文章(包括Word下载) [翻译]了解ASP.NET底层架构(完) [翻译]了解ASP.NET底层架构(八) [翻译]了解ASP.NET底层架构(七) [翻译]了解ASP.NET底层架构(六) [翻译]了解ASP.NET底层架构(五) [翻译]了解ASP.NET底层架构(四) [翻译]了解ASP.NET底层架构(三)
LightCloud -- 分布式键-值数据库
tmfc · 2009-03-07 · via 博客园 - tmfc

Plurk.com在今年2月28日开源了LightCloud这个分布式的键-值数据库,根据官方网站的信息,有以下特性

  •  
    • 基于Tokyo Tyrant(这个项目貌似又是另一个名叫Tokyo Cabinet的数据库系统的网络接口)。Tokyo Tyrant是最快的键-值数据库之一[性能测试],并且已经开发了好几年并且在n个网站中被应用。
    • 性能非常好(可以和memcached进行对比)
    • 在很少的服务器上面可以存储百万级的数据量
    • 简单的通过添加节点来扩展
    • 节点可以通过master-master复制来进行备份。很容易添加自动错误恢复和负载均衡功能
    • 使用Lua语言进行扩展
    • 备份和恢复数据时不需要关机
    • LightCloud Manager工具可以很方便的管理节点,备份节点,查看状态
    • 非常小巧(客户端大约500行,Manager大约400行)
    • 纯python开发,但是很容易移植到其他语言

和Memcached以及MySql的区别

Memcached是缓存服务器,而LightCloud内存储的数据是持久的(到底是数据库嘛)。

MySql和其他关系数据库服务器存储键-值对时效率不高(肯定没LightCloud这种专用的高)。

和Memcached性能对比

对LightCloud和Memcached做10,000次set和get

Elapsed for 10000 gets: 1.74538516998 seconds [memcache]
Elapsed for 10000 gets: 3.57339096069 seconds [lightcloud]

Elapsed for 10000 sets: 1.88236999512 seconds [memcache]
Elapsed for 10000 sets: 9.23674893379 seconds [lightcloud]

值得注意的一点是Memcached是完全在内存中操作的,而LightCloud是会读写硬盘的。

而Tokyo Tyrant官网提供的数据更加惊人(LightCloud在Tokyo Tyrant上增加了网络和Python语言执行开销)

1 million GETS in < 0.5 seconds

1 million SETS in < 0.5 seconds

使用Lua进行扩展

Lua扩展貌似是由Tokyo Tyrant提供的

下面是一个简单的扩展,扩展出一个incr命令

function incr(key, value)
   value = tonumber(value)
   if not value then
      return nil
   end
   local old = tonumber(_get(key))
   if old then
      value = value + old
   end
   if not _put(key, value) then
      return nil
   end
   return value
end