- Tatsuhiro Ujihisa
- http://ujihisa.blogspot.com/
- 非同期とは?
- スレッド、プロセス
- プロセス生成
;;; eval-last-sexp-popup.el --- eval here | |
;; Copyright (C) 2010, 2011 SAKURAI Masashi | |
;; Author: SAKURAI Masashi <m.sakurai at kiwanami.net> | |
;; Keywords: convenience | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or |
#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に感謝したいと思う
基礎知識
読み物系
# config/initializers/redcarpet.rb | |
module ActionView | |
module Template::Handlers | |
class Markdown | |
class_attribute :default_format | |
self.default_format = Mime::HTML | |
def call(template) | |
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :autolink => true, :space_after_headers => true) | |
markdown.render(template.source).html_safe.inspect |
# -*- coding: utf-8 -*- | |
# takagi RT | |
# | |
# e.g. :takagi $xx | |
# | |
Earthquake.init do | |
command %r|^:takagi\s+(\d+)$|, :as => :takagi do |m| | |
st = cache.read("status:" + m[1]) | |
text = sprintf("だったら黙ってろクソが RT @%s %s" % [st["user"]["screen_name"], st["text"]]) | |
async_e { twitter.update(text, :in_reply_to_status_id => m[1]) } if confirm("update '#{text}'") |
# Rubyで関数合成 | |
# | |
# irb(main):016:0> f = "foo".method(:==) | |
# => #<Method: String#==> | |
# irb(main):017:0> g = lambda{|x| puts "result : #{x}"} | |
# => #<Proc:0x007fdafa06c0c0@(irb):17 (lambda)> | |
# irb(main):018:0> (f >> g).call("foo") | |
# result : true | |
# => nil | |
# irb(main):019:0> (f >> :to_s).call("hoge") |
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
関連: RFC 2394