IIJ Technical WEEK Cloudbusting Machine(CBM)

Similar documents
…l…b…g…‘†[…N…v…“…O…›…~…fi…OfiÁŸ_

Microsoft PowerPoint - shudo-NoSQL-data-model ppt

test

2 Java 35 Java Java HTML/CSS/JavaScript Java Java JSP MySQL Java 9:00 17:30 12:00 13: 項目 日数 時間 習得目標スキル Java 2 15 Web Java Java J

3 Powered by mod_perl, Apache & MySQL use Item; my $item = Item->new( id => 1, name => ' ', price => 1200,

1,.,,,., RDBM, SQL. OSS,, SQL,,.

1 SQL Server SQL Oracle SQL SQL* Plus PL/SQL 2 SQL Server SQL Server SQL Oracle SQL SQL*Plus SQL Server GUI 1-1 osql 1-1 Transact- SQL SELECTFROM 058

1 ex01.sql ex01.sql ; user_id from (select user_id ;) user_id * select select (3+4)*7, SIN(PI()/2) ; (1) select < > from < > ; :, * user_id user_name

ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web

,, create table drop table alter table

n n n ( ) n Oracle 16 PostgreSQL 3 MySQL

hands_on_4.PDF

2009 Web B012-1

CAC

WEB DB PRESS Vol.1 65


Wiki Wiki Wiki...


_IMv2.key

FileMaker ODBC and JDBC Guide

ストラドプロシージャの呼び出し方

FileMaker 16 ODBC と JDBC ガイド


PowerPoint プレゼンテーション

Microsoft Word - tutorial3-dbreverse.docx

_02-5.ppt

FileMaker 15 ODBC と JDBC ガイド

PowerPoint Presentation

[1]...1 [2]...1 [3] Java Web...3 [4] Java Web...18 [

_02-4.ppt

領域サイズの見積方法

Web SOAP Internet Web REST SOAP REST 3 REST SOAP 4

Microsoft Word - 430_15_Developing_Stored_Procedure.doc


: ORDER BY

CAS Yale Open Source software Authentication Authorization (nu-cas) Backend Database Authentication Authorization Powered by A

PowerPoint -O80_RKI.PDF

54 5 PHP Web hellow.php 1:<?php 2: echo "Hellow, PHP!Y=n"; 3:?> echo PHP C 2: printf("hellow, PHP!Y=n"); PHP (php) $ php hellow.php Hellow, PHP! 5.1.2

Microsoft PowerPoint pptx

FileMaker ODBC and JDBC Guide

Microsoft PowerPoint - db03-5.ppt

BC4J...4 BC4J Association JSP BC4J JSP OC4J

IBM Software Group DB2 Information Management Software DB2 V8 XML SQL/XML 2 XML XML UDF XMLExtender XML XML XMLCollection, XMLColumn XML UDF Informati

Agenda Scalability Availability CAP Theorem Scalability Availability Consistency BASE Transaction

橡実践Oracle Objects for OLE

橡j_Oracle_whitepaper.PDF

_02_3.ppt

PowerRDBconnector説明書(SQLServer編)

Lotus Domino XML活用の基礎!

KWCR3.0 instration

FileMaker Cloud App FileMaker Pro FileMaker Go FileMaker WebDirect App FileMaker Cloud Amazon Web Services (AWS) Marketplace AWS FileMaker Server File

Oracle Web Conferencing Oracle Collaboration Suite 2 (9.0.4) Creation Date: May 14, 2003 Last Update: Jan 21, 2005 Version: 1.21

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

関係データベース

C3印刷用.PDF

Wiki

Gray [6] cross tabulation CUBE, ROLL UP Johnson [7] pivoting SQL 3. SuperSQL SuperSQL SuperSQL SQL [1] [2] SQL SELECT GENERATE <media> <TFE> GENER- AT

haskell.gby

Oracle Rdb: SQL Update

csj-report.pdf

28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment

Oracle9i

SQLite データベース IS04 組み込み 1

~~~~~~~~~~~~~~~~~~ wait Call CPU time 1, latch: library cache 7, latch: library cache lock 4, job scheduler co

Transcription:

Cloudbusting Machine CBM IIJ

Project Gryfon PaaS

Cloudbusting Machine CBM Project Gryfon PaaS http://www.gryfon.iij-ii.co.jp/ Key-Value Store KVS C GQL PHP-C MySQL 5.0.77 Cassandra 0.7.2 MongoDB 1.8.2 zipbench

Key-Value Store API

Key-Value Store KVS Key-Value Store NoSQL Key-Value Store Key-Value Store Google BigTable Amazon Dynamo

Key-Value Store RDB SQL vs NoSQL RDB KVS vs RDB KVS ACID vs Eventual consistency CAP RDB ACID ACID AtomicityConsistencyIsolationDurability KVS Eventual consistency http://lpd.epfl.ch/sgilbert/pubs/brewersconjecture-sigact.pdf ConsistencyAvailabilityPartitionTolerance RDB C+A KVS C+P A+P

Key-Value Store KVS C+P BigTableHBaseHypertableMongoDB P2PA+P DynamoVoldemortCassandra Yahoo! Cloud Serving Benchmark http://www.brianfrankcooper.net/pubs/ycsb.pdf CouchDBMongoDB BigTableHbaseHypertableCassandra Voldemort

Key-Value Store SQL SQL SQL MongoDB http://www.mongodb.org/display/docs/sql+to+mongo+mapping+chart SQL RDBNoSQLRDBNoSQL http://www.atmarkit.co.jp/flinux/rensai/nosql/nosql_03/03_1.html http://www.atmarkit.co.jp/flinux/rensai/nosql/nosql_04/04_1.html

CQI KVS CBM KVS SQLKVS PHP KVS/RDB KVSRDB KVS RDB KVS KVS

Google AppEngine appserver XMPP URL

Google AppEngineGAE GAE GAE SQL API Python: Java: JDO/JPA Go: CQI C++/PHP GAE GAE/P Google AppEngine for Python SDK http://code.google.com/intl/ja/appengine/downloads.html GQE TyphoonAE http://code.google.com/p/typhoonae/ GAE SDK GAE/P

GAE/P Python Execution Environment Application Backend Servers Indexing Megastore Model Interface Google RPC Transactio n Datastore API BigTable Table GFS Store

GAE/P Datastore API Datastore API: Google AppEngine db Datastore API GQLdb GAE/P SDK Python google/appengine/api google/appengine/datastore api/datastore.py API datastore/datastore_query.py datastore/datastore_rpc.py api/datastore_types.py datastore/datastore_index.py datastore/entity_pbpy

GAE/P Datastore API api/datastore.py Query Class Run Get Count Get Put Delete datastore/datastore_query.py Query Class YAML datastore/datastore_index.py make_rpc_call datastore/datastore_rpc.py Get Put Delete

GAE/P class MainPage(webapp.RequestHandler): def get(self): self.response.out.write('<html><body>') greetings = db.gqlquery("select * FROM Greeting ORDER BY date DESC LIMIT 10") for greeting in greetings: if greeting.author: self.response.out.write('<b>%s</b> wrote:' % greeting.author.nickname()) else: self.response.out.write('an anonymous person wrote:') self.response.out.write('<blockquote>%s</blockquote>' % cgi.escape(greeting.content)) # Write the submission form and the footer of the page self.response.out.write(""" <form action="/sign" method="post"> <div><textarea name="content" rows="3" cols="60"></textarea></div> <div><input type="submit" value="sign Guestbook"></div> </form> </body> </html>""")

PHP Execute Environment Storage A CQI API Storage A Driver User Defined Object Datastore Bridge Storage B User Defined Object Query Engine Storage B Driver User Defined Object Storage C GAE DataStore API Storage C Driver

L PHP Application Java Application YYY Application ZZZ Application PHP Interface Java Interface YYY Interface ZZZ Interface PHP-C Binding Java-C Binding YY-C Binding ZZZ-C Binding Query Engine QE GQL Parser DataStore Bridge S KVS Driver MongoDB KVS Driver XXX KVS Driver Cassandra KVS Driver YYY MongoDB XXX Cassandra YYY

Query Engine GQL Datastore Bridge API Storage Driver GAE/P Datastore API KVS Query Engine GQLSELECT SELECTConditionOrdering ANCESTOR Datastore Bridge Storage Driver Storage Driver KVS Cassandra/MongoDB Hypertable C

API CAPI ${PREFIX}/include/cqi.h CQI CQI_t *cqi_new(char *driver, char *user, char *passwd, char *host, int port); void cqi_free(cqi_t *cqi); GQL query_t *cqi_analyze(cqi_t *cqi, char *gqlstr); int cqi_attach(cqi_t *cqi, char *aux); int cqi_detach(cqi_t *cqi); int cqi_put(cqi_t *cqi, entity_t *ep); int cqi_delete(cqi_t *cqi, entity_t *ep); entity_t *cqi_fetch(cqi_t *cqi, query_t *qp, int *count); int cqi_count(cqi_t *cqi, query_t *qp);

C int main(int argc, char *argv[]) { CQI_t *cqi; query_t *qp; entity_t *ep; char *gqlstr = "SELECT * FROM xzip"; int i, n; cqi = cqi_new( Cassandra", // driver "root", // user "root", // passwd "127.0.0.1", // host 9160); // port cqi_attach(cqi, "xzipcode.xzip"); // connect datastore qp = cqi_analyze(cqi, gqlstr); cqi_query_show(qp); n = cqi_count(cqi, qp); printf("\n# %d entries\n", n); if (n > 0) { ep = cqi_fetch(cqi, qp, &n); if (ep!= NULL) { for (i = 0; i < n; i++) { printf("\n# %d\n", i); cqi_entity_show(&ep[i]); } } cqi_entity_free(ep); } } cqi_query_free(qp); cqi_detach(cqi); cqi_free(cqi); exit(0); // disconnect datastore

PHP php if(!extension_loaded('cqi_php')) { dl('cqi_php.'. PHP_SHLIB_SUFFIX); } $query_string = 'SELECT * FROM xzip'; $queryarray = array(); $gql = array('main_sentence' => $query_string, 'param_count' => count($queryarray), 'param' => $queryarray); $result = cqi_analyze($gql); $qarray = $result['query']; $query = $qarray[0]; $driver = array('driver' => 'cassandra', 'user' => 'root', 'passwd' => 'root', 'host' => '127.0.0.1', 'port' => 9160, 'aux' => 'xzipcode.xzip'); $result = cqi_count($driver, $query); $result = cqi_fetch($driver, $query);?>

ORM KVSMongoDB RDB KVS KVSCassandra KVS KVS RDB KVS KVS

KVS KVS SQL CQL: Cassandra HQL: Hypertable SQL RDB SQL KVS Oracle Cassandra Netfilix: Replacing Datacenter Oracle with global apache cassandra on AWS http://lanyrd.com/2011/cassandrasf/sgdwy/ http://www.slideshare.net/adrianco/migrating-netflix-from-oracle-to-global-cassandra

KVS DataStax Cassandra http://www.datastax.com/ Oracle NoSQL http://www.oracle.com/us/products/database/nosql/resources/index.html KVS CQI SQLKVS PHP PDOPHP Data Object

PHP Data Object PDO PHPRDB MySQLSQLite CPEAR:DB PDO Core PDO Driver CQIPDO PHPPHP PDO PDOStatement http://www.php.net/manual/ja/class.pdo.php http://www.php.net/manual/ja/class.pdostatement.php

PDOCQI PDOSQL CQI SQL SQL KVS KVS SQL KVSCQI API PDOAPICQIAPI

PDOCQI CQI PDOCQI CBM 0.2 L PHP Application PDO Application PDO Application PHP Interface PHP-C Binding Query Engine PDO Core QE GQL Parser PDO CQI Driver SQL Parser PDO Cassandra Driver SQL Parser PDO MongoDB Driver SQL Parser S KVS Driver MongoDB DataStore Bridge KVS Driver Cassandra KVS Driver Cassandra KVS Driver MongoDB MongoDB Cassandra Cassandra MongoDB

PDOCQI Cassadra MongoDB PDO Driver PDO Core Cassandra/MongoDB PDO CQI Driver SQL Parser SQL SQLite SQLtokenize/parse http://www.sqlite.org/arch.html CREATE TABLE/INSERT/SELECT/DELETE/DROP TABLE KVS KVS Driver KVS KVS KVS Driver PDO

PDOCQICassandra Driver Apache Cassandra 1.0 Thrift Driver SQL CQLCassandra Query Language Secondary Index WHERE CREATE TABLE INSERT varchar NOT NULL/PRIMARY KEY UNIQUE KEY Cassandra PDO

PDOCQICassandra Driver DELETE WHERE DROP TABLE SELECT WHERE ORDER BY GROUP BY HAVING JOIN KEYKEY *KEY

PDOCQIMongoDB Driver MongoDB 2.0 mongo-c-driver 0.1 https://github.com/mongodb/mongo-c-driver SQL Mongo QueryBSON CREATE TABLE INSERT varchar NOT NULL/PRIMARY KEYUNIQUE MongoDBid mongo-c-driver API PDO

PDOCQIMongoDB Driver DELETE/DROP TABLE SELECT WHERE ORDER BY GROUP BY HAVING JOIN SELECT

Cloudbusting MachineCBM0.2 PDOCQI Cassandra/ MongoDB CQI 0.2.1 CQI Hypertable SQL ORDER BY Zend Engine JOINSQL KVS PHP KVSPaxos http://en.wikipedia.org/wiki/paxos_(computer_science)

In Progress KVS BigTable Store SQL SQL KVSSQL SQLQL SQL KVSRDB KVS RDB KVS KVS