Skip to content

Instantly share code, notes, and snippets.

View ohneda's full-sized avatar

Yuichi Oneda ohneda

  • Fujisan Magazine Service USA
  • Berkeley CA, USA
View GitHub Profile

SQLiteで始める最新データベース運用 - プロのエンジニアが教える実践的ガイド(by claude-3.5-sonnet)

「MySQLしか使ったことないけど、SQLiteって実用的なの?」 「レプリケーションやバックアップってどうするんだろう?」

私もかつてはそう感じていました。しかし、近年ではSQLiteを本番環境で活用することが増え、その実力に度肝を抜かれました。この記事では、私の現場経験から導き出した、SQLiteを本番環境で最大活用するための具体的なノウハウをお伝えします。

📚 この記事の対象

  • MySQLやPostgreSQLは使用経験があるけれど、SQLiteにはまだ手を出していない方。
@ohneda
ohneda / sqlite.md
Last active November 7, 2024 07:27

プロダクション環境でのSQLite活用術:MySQLやPostgreSQLとの比較と最新の使い方(OpenAI o1-preview)

はじめに

エンジニアの皆さん、普段の開発でMySQLやPostgreSQLを使いこなしていることと思います。「SQLite?それってモバイルアプリや小規模なプロジェクト向けのデータベースでしょ?」と感じている方も多いのではないでしょうか。

しかし、最近の技術の進歩により、SQLiteはプロダクション環境でも十分に活用できるデータベースとして再評価されています。実際に、SQLiteを使ったモダンなアプリケーションやサービスが増えてきています。

本記事では、SQLiteの最新の使い方や、その特徴をMySQLやPostgreSQLと比較しながら、プロダクション環境でどのように活用できるのかを詳しく解説します。

@ohneda
ohneda / chapter1.md
Last active August 29, 2015 14:06
サービスデザインパターン

第一章 オブジェクトからWebサービスへ

  1. Webサービスとはなにか
    • サービスをどのように使えば、論理的な機能を複数のアプリケーションで共有できるのか。構成の異なるコンピュータプラットフォームを強調して動くソフトウェアにできるのか
    • Web サービスは、異なるシステムを統合する方法を提供し、再利用可能なビジネス機能を、HTTP 経由で公開するもの
  2. ローカルオブジェクトから分散オブジェクトへ
    • オブジェクトとは、振る舞い(例:ビジネスロジック)とデータをカプセル化するために、現代の多くのプログラミング言語で使われているパラダイム
      • オブジェクトのホワイトボックス再利用
        • オブジェクトを使う開発者が、オブジェクトの実装に自由にアクセスできること
  • クライアントがオブジェクトを直接操作する
class GroovyBook {
String title
static main( args ){
Date now = new Date()
100000.times {
new GroovyBook( title: "title${it}")
}
println new Date().time - now.time
# users generic .zshrc file for zsh(1)
## Environment variable configuration
#
# LANG
#
export LANG=ja_JP.UTF-8
## Default shell configuration
#
@ohneda
ohneda / .vimrc
Created August 23, 2012 03:39
.vimrc
syntax on
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=0
set number
set smartindent
set incsearch
set hlsearch
@ohneda
ohneda / .tmux.conf
Created March 1, 2012 22:03
tmux configuration file
# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $
#
# By Nicholas Marriott. Public domain.
#
# This configuration file binds many of the common GNU screen key bindings to
# appropriate tmux key bindings. Note that for some key bindings there is no
# tmux analogue and also that this set omits binding some commands available in
# tmux but not in screen.
#
# Note this is only a selection of key bindings and they are in addition to the
@ohneda
ohneda / h2.sh
Created January 9, 2012 23:30
h2 database init script ( based on Jenkins init script )
# /etc/default/h2
# defaults for h2 database server
# pulled in from the init script; makes things easier.
NAME=h2
# location of java
JAVA=/usr/bin/java
# arguments to pass to java
@ohneda
ohneda / emacs.rb
Created December 28, 2011 04:06
patch for homebrew emacs-23.3b supporting emacs-inline.patch in non-japanese environments and ATOK24.
diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb
index 856a34a..e46a312 100644
--- a/Library/Formula/emacs.rb
+++ b/Library/Formula/emacs.rb
@@ -28,7 +28,7 @@ class Emacs < Formula
def patches
p = []
-
+ p0 = []
@ohneda
ohneda / grails-version
Created December 21, 2011 22:40
Smart Bash/Zsh Aliases to Run Appropriate Grails Version
# via http://naleid.com/blog/2011/09/26/smart-bash-zsh-aliases-to-run-appropriate-grails-version/
GRAILS_CMD=$1
shift
if [ -f application.properties ]; then
export GRAILS_VERSION=`grep app.grails.version application.properties | sed -E 's/.*=(.*)/\1/'`
export GRAILS_HOME="/Users/ohneda/opt/grails-$GRAILS_VERSION"
echo "application.properties found, using \$GRAILS_HOME of $GRAILS_HOME"
else
echo "application.properties NOT found, leaving \$GRAILS_HOME as $GRAILS_HOME"