CouchDB了解(-) 特性及实现

概述 CouchDB,大家或多或少都听说过。它到底有什么特性,适合哪些应用场景,和我们常用的关系型数据库有什么区别? 这些问题,可能我们心里都不是非常清楚。在以前的Blog中(PS,不是在javaeye哦),我提及了几次CouchDB,但是仅仅 限于编译,安装这些浮在水面上的工作。今天抽出时间把最近关于CouchDB的一些了解整理一下。   CouchDB是什么 CouchDB一种半结构化面向文档的分布式,高容错的数据库系统,其提供RESTFul HTTP/JSON接口。其拥有MVCC特性,用户可以通过自定义Map/Reduce函数生成对应的View。 在CouchDB中,数据是以JSON字符的方式存储在文件中。   特性 RESTFul API:HTTP GET/PUT/POST/DELETE + JSON 基于文档存储,数据之间没有关系范式要求 每个数据库对应单个个文件(以JSON保存),Hot backup MVCC(Multi-Version-Concurrency-Control),读写均不锁定数据库 用户自定义View 内建备份机制 支持附件 使用Erlang开发(更多的特性) 应用场景 在我们的生活中,有很多document,比如信件,账单,笔记等,他们只是简单的信息,没有关系的需求,我们可能仅仅需要存储这些数据。 这样的情况下,CouchDB应该是很好的选择。当然其他使用关系型数据库的环境,也可以使用CouchDB来解决。   根据CouchDB的特性,在某些偶 尔连接网络的应用中,我们可以用CouchDB暂存数据,随后进行同步。也可以在Cloud环境中,作为分布式的数据存储。CouchDB提供给予 HTTP的API,这样所有的常见语言都可以使用CouchDB。   使用CouchDB,意味着我们不需要在像使用RMDBS一样,在设计应用前首先设计负责数据Table。我们的开发更加快速,灵活。   实现   在CouchDB中,Database表示一个数据库,每个Database对应一个”Storage”(后缀为.couch)以及多个View Index(用来存储View结果支持query)。       Database Storage中可以存储任意的Document,用户可以在Database中自定义View,方便对数据进行查询, View 默认使用JavaScript进行定义,定义好的相关函数保存在 design document中,而View对应的具体数据是保存在View Index文件中。我们可以通过HTTP API请求Database,Document,View,可以进行简单的Query,以及其他各种系统相关的信息。   Storage File结构 数据库文件的后缀为.couch,由Header和Body组成。 Header 包含两个完全相同的Header信息,每个Header的Size为2048 […]

Pathway from ACEGI to Spring Security 2.0

Formerly called ACEGI Security for Spring, the re-branded Spring Security 2.0 has delivered on its promises of making it simpler to use and improving developer productivity. Already considered as the Java platform’s most widely used enterprise security framework with over 250,000 downloads from SourceForge, Spring Security 2.0 provides a host of new features. This article outlines how […]

Google Android Tutorial

Google has recently released the Android platform for developing mobile applications. The language used for developing Android programs is Java, but it is not Java Micro Edition.  No wireless application developer can ignore  Android. Google is the best known brand name, among the users of the web and Android comes from Google.  I am presenting this […]

Is Hibernate the best choice?

Is Hibernate the best choice? Or is the technical marketing of other ORM vendors lacking? Recently Jonathan Lehr posed a question on his blog: “Is Hibernate the best choice?“, and this lead me to ask the same question. Although, I tend to use Hibernate as my first choice, it would be nice to see some […]

Tomcat Today, GlassFish Tomorrow?

While there are indeed several advantages to using GlassFish vs. Tomcat, it’s probably useful to know that Sun is the original creator of Tomcat and that any application running today on Tomcat should run just fine (no modification whatsoever) on GlassFish. Grizzly Historically, if you wanted to get good HTTP performance from Tomcat you really […]

Ten Amazing Java Applications

Java is such a great language and platform for any kind of application. It is open, fast, powerful, runs on any platform, and there are more jobs for Java than any other programming language. After reading more FUD and Java bashing from Ruby land I thought it would be fun to put together a list […]

The Best Java Tools You Never Knew Existed

I was at an awesome presentation at JavaOne of the long tail of Java tools that not many people have come across, which I had to share. So, in no particular order, and with my own emotive comments: Apache Abdera – work easily with Atom feeds. See also Rome. Antlr – this parser generator can look daunting, […]

Resin 3.2.1 破解文件 crack keygen

resin3.2.1 的破解文件,仅供学习所用,不得用于商业用途. 把附件里的文件覆盖${resin_home}\lib里的pro.jar 即可 没用用户的可以用test/test 下载 如果你的版本不是是resin3.2.1,如果覆盖不能用时,可以试一下,把附件里的pro.jar里的 \com\caucho\license 目录覆盖你的pro里相应目录 下載pro.jar

linux下使用nload查看网卡实时流量

linux下使用nload查看网卡实时流量 nload是一个网络流量统计工具,当前版本为0.7.2。下载地址:http://sourceforge.net/project/showfiles.php?group_id=35865 使用yum 安装也可以。 yum install nload 使用源码方式安装到/usr/local/nload,将/usr/local/nload/bin目录加入/etc/profile。 重新登陆ssh后,直接输入nload即可查看网卡的当前流量情况。nload eth0 — 查看名叫eth0网卡的流量 可查看当前、平均、最小、最大、总共等的流量情况,单位为bit,详细的使用说明请参见:http://www.debuntu.org/2006/07/14/74-nload-a-network-traffic-analyser

resin-pro-3.1.8破解下载

resin-pro-3.1.8在11月18号已经正式发布,这次有点慢了,主要是不知道这个版本已经发布了,以后有新版本发布时,请及时通知作者( dingl.com (At) gmail.com )。破解下载 :Resin Change Log我会及时破解Resin的最新版本!resin-pro-3.1.8.zipresin-pro-3.1.8.tar.gz原文:http://www.dingl.com/blog/archives/49