Skip to content

Instantly share code, notes, and snippets.

@akimichi
akimichi / gist:4106260
Created November 18, 2012 17:06 — forked from jonifreeman/gist:3667222
Kiama rewrite
scala> import org.kiama.rewriting.Rewriter._
import org.kiama.rewriting.Rewriter._
scala> trait Expr
defined trait Expr
scala> case class Constant(x: Int) extends Expr
defined class Constant
scala> case class Add(e1: Expr, e2: Expr) extends Expr
@akimichi
akimichi / aggregate.js
Created September 28, 2012 03:18 — forked from cwestin/aggregate.js
Mongo shell script and sample documents used for my aggregation talk at MongoSF
/* sample aggregate command queries */
// make sure we're using the right db; this is the same as "use mydb;" in shell
db = db.getSisterDB("aggdb");
// just passing through fields
var p1 = db.runCommand(
{ aggregate : "article", pipeline : [
{ $project : {
tags : 1,
pageViews : 1
@akimichi
akimichi / aggregation.js
Created September 28, 2012 03:16 — forked from cwestin/aggregation.js
Mongo shell script and sample documents used for my aggregation talks 12/2011
// make sure we're using the right db; this is the same as "use aggdb;" in shell
db = db.getSiblingDB("aggdb");
// simple projection
var p1 = db.runCommand(
{ aggregate : "article", pipeline : [
{ $project : {
tags : 1,
pageViews : 1
}}
@akimichi
akimichi / Reader.scala
Created August 28, 2012 14:53 — forked from blouerat/Reader.scala
Reader Monad
/*
Based on the first part of the talk "Dead-Simple Dependency Injection in Scala" by @runarorama at NEScala 2012
http://marakana.com/s/dependency_injection_in_scala,1108/index.html
*/
class Connection {
def prepareStatement(query: String) = new Statement()
}
class Statement {
@akimichi
akimichi / XPathParser.scala
Created July 11, 2012 23:47 — forked from honnix/XPathParser.scala
simple xpath alike parser in scala combinator
// _[@type=="baoc" and ts10[@value=="1" and a==2] and ts20]
package com.honnix.xml.transformer
import scala.xml.NodeSeq
import scala.util.parsing.combinator.JavaTokenParsers
object XPathParser {
def apply(conditionalPath: String, topSelector: (NodeSeq, String) => NodeSeq) =
new XPathParser(conditionalPath, topSelector)
@akimichi
akimichi / maven.vim
Created April 23, 2012 10:45 — forked from schmmd/maven.vim
vim maven compiler file
" Compiler: maven
" Author: Michael Schmitz <michael@schmitztech.com>
" Last Change: 10/27/2011
if exists("current_compiler")
finish
endif
let current_compiler = "maven"
set makeprg=mvn\ clean\ compile

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う