Rails Developers Meetup 2018: Day 1ãçºè¡¨è³æ https://techplay.jp/event/639872
ã¤ã¾ãããããã®ãã¼ã±ããã¯å°ãããããããã¼ã¿ãã¼ã¹ã®ãã¼ã±ããèªä½ãããå°ããã®ã§ããã¨ã¯è¨ããã©ãããä»ããããã·ã«ãªãããã§ããããï¼ ããã¼ã¸ããã¹ãã£ã³ã°ã¯ãæ¬è³ªçã«ã¯ã¦ã¼ã¶ã®ããã«AWSã§ãã¼ã¿ãã¼ã¹ãåãããã¨ã§ããããããã¨ã§ã¦ã¼ã¶ãã¡ã¯èªåã§åããå¿ è¦ããªããªãã¾ãããããã®ãµã¼ãã¹ã使ã代ããã«ãªãã®ã¯ãAWSã«èªåã§ãã¼ã¿ãã¼ã¹ãç«ã¦ããã¨ã§ãããããã£ã¦ãããã¼ã¸ããªãã¼ã¿ãã¼ã¹ãã¹ãã£ã³ã°ãµã¼ãã¹ã課éã§ããé¡ã«ã¯ãé常ã«å³ããä¸éããããã¨ã«ãªãã¾ããCompose.ioãmLabããRethinkDBããã1æ¡ãããã¯2æ¡å¤ãã¦ã¼ã¶ãæ±ããMongoDBãæä¾ãã¦ãããã¨ãèãã¦ãããã¼ã¸ããã¹ãã£ã³ã°ãæä¾ãããã¨ã«ã¯å°ãã®è¯ãç¹ããªãã¨ããçµè«ãä¸ãã¾ããã Database as a Serviceã¯ããã¼ã¸ããã¹ãã£ã³ã°ã®æ´ã«è¤éãªãã¼ã¸ã§ã³ã§ããD
mLab MongoDB Add-on DiscontinuedChange effective on 14 July 2020 The mLab team has discontinued their MongoDB add-on. The mLab MongoDB add-on will be removed from all Heroku apps on November 10, 2020. Users should remove add-on instances attached to their apps via the Dashboard or the CLI. Because the mLab MongoDB add-on affects customer data, users should consider taking preemptive action to avoi
ææ¥ããã®Webãµã¼ãã£ã³ãå éãããã¹ã¯ã¬ã¤ãã³ã°æè¡ï¼ ã¹ã¯ã¬ã¤ãã³ã°ã¨ããè¨èããåç¥ã§ããããï¼ ã¹ã¯ã¬ã¤ãã³ã°ã¨ã¯ï¼Webä¸ã«æ£ãã°ã£ãæ å ±ãã¾ã¨ãããå å·¥ããããã¦ï¼Webããã®æ å ±åéãå¹ççã«è¡ãããã®æ段ã®ãã¨ã§ãï¼ ã¹ã¯ã¬ã¤ãã³ã°ã使ãããªãã¨ï¼äººã®æ°ç¾ï¼æ°ååã®é度ã§Webã§èª¿ã¹ãã®ããããã¨ãã§ããããã«ããªãã¾ãï¼ ä»åã¯ï¼ãã®ã¹ã¯ã¬ã¤ãã³ã°ã¨ããæè¡ã«ã¤ãã¦ï¼ã©ã®ãããªãã®ãï¼èª°ã使ã£ã¦ããã®ãï¼ã©ããªãã¨ã«ä½¿ããã®ãï¼å®éã«ä½¿ãã«ã¯ã©ãããã°ããã®ãã«ã¤ãã¦ï¼è§£èª¬ãã¾ããï¼
æè¿ãMeteorã試ãã¦è¦ã¦ã¾ããããã¯ã¡ãã£ã¨ã¹ã´ã¤ãæ£ç´ãå½æRailsã«åããã®ã¨åãè奮ãããã Meteorã®èª¬æã¯ããªã¢ã«ã¿ã¤ã Webã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯Meteorã«ã¤ãã¦ãããããåãããããã®ã§ããã¡ãåç §ã å®ã¯ã2012å¹´ã®å ¬éæããåå¨ã¯ç¥ã£ã¦ããã ãã©ããã¥ã¼ããªã¢ã«è¦ããããã§ç¹ã«èå³ã¯ããã¾ããã§ããã ããããä»ã¯éãã¾ããããã¯ä¸»ã«ã¹ããã¢ããªã®éçºã«ããªãã®å¨åãçºæ®ãããã ã¨æ°ã¥ããããã§ãã ã¾ãããªãã§å ¬éæã«ãã¾ãèå³ããªãã£ããã§ãããããããRailsãªã©åã¬ã¤ã¤ã¼ã®Webã¢ããªã±ã¼ã·ã§ã³ã®éçºFWã¨ãã¦èãã¦ãã¾ããã ãã®å ´å SPA ãªã¢ã¯ãã£ããªéçºã¢ãã« ã¯ã©ã¤ã¢ã³ãã¨ãµã¼ããåä¸ã³ã¼ã(JS)ã§æ¸ãã ãµã¼ããµã¤ãã®DBãã¯ã©ã¤ã¢ã³ãããééçã«å¼ã³åºãã(IsomorphicãªDBã¢ãã«) ã¨ããç¹å¾´ã¯ãããããªã¢ã¯
æçåçå ±æã¢ããªãSnapDishãã®ã¨ã³ã¸ãã¢ããå¹´éç´300ä¸æè¦æ¨¡ã®ç¾ããï¼ãµã¤ãºã®å¤§ããªï¼åçæ稿ããã®é«é表示ãæ¯ããèæ¯ãèªãã¾ãã é¢é£ãµã¤ãã¹ã¿ããããã° - SnapDishã®ãããã³æè¡ããã° - SnapDishãæ¯ããæè¡ã´ã¡ãºæ ªå¼ä¼ç¤¾ å ¬å¼ãµã¤ã ã¢ããªã®ãã¼ã¸ã¸SnapDish æçã«ã¡ã© æè¡ã®æ¸ ç°ã§ãã MongoDB Aggregation Framework ãç´¹ä»ãããã¨æãã¾ãã MongoDB  2.2ï¼ãªãªã¼ã¹ãã¼ãï¼ã¸ ãã¼ã¸ã§ã³ã¢ããããMongoDB Aggregation Framework ã¨ããæ©è½ãå¼·åããã¾ããã ä»æ§ãè¦ãã¦ã¿ãã¨ãè¦æ £ããªãæãã«ãªã£ã¦ãã¦ããããã¾ãæ°ããäºãç¿çããªãã¨ãããªãã¨ããæ°æã¡ã«ããããã¾ãã ãã ããã® Aggregation Framework ã«ãã£ã¦ãSnapDishã«ããè¨å¤§ãªãã¼ã¿
Mogodbéè¨ MongoDBã®éè¨æ©è½ã便å©éãã¦æ³£ãã¦ããã話ã - Yuta.Kikuchiã®æ¥è¨ 1æç¨åã«MongoDBã使ã£ãéè¨æ©è½ã®ç´¹ä»ãããã¦ããã ãã@yutakikucã§ããå 容ã¯å ¨ã大ããäºç¡ãã£ãã®ã§ãããã¿ã¤ãã«ã§èªå°ãå¼ã£å¼µã£ã¦200è¿ãbookmarkãéããäºãã§ãã¾ããç¬ãã¿ãªããã®åèã«ãã¦ããã ãããã¨ã大å¤å¬ããæãã¾ããä»æ¥ã¯MongoDBã®éè¨ãããä¸æ©è¸ã¿è¾¼ãã å 容ãç´¹ä»ãã¦è¡ãããã¨æãã¾ããé¡æã¨ãã¦ã¯Aggregation Frameworkã¨MapReduceã«ã¤ãã¦ã§ããå ã«ä»å試ãã¦ã¿ãMongoDB-Versionã¯2.2.3ã§ããVersionã«ãã£ã¦æåãå¤ããã¨æãã®ã§æ³¨æãã¦ãã ããã $ mongo --version MongoDB shell version: 2.2.3 Aggregation Framewor
MongoDBã¤ã³ã»ã¢ã¯ã·ã§ã³ ä½è : Kyle Banker,Skyæ ªå¼ä¼ç¤¾çå·ç«å¸åºç社/ã¡ã¼ã«ã¼: ãªã©ã¤ãªã¼ã¸ã£ãã³çºå£²æ¥: 2012/12/14ã¡ãã£ã¢: 大åæ¬è³¼å ¥: 5人 ã¯ãªãã¯: 55åãã®ååãå«ãããã° (4件) ãè¦ã MongoDBéè¨æ©è½ CentOSã§Nginxã®ãã°ãFluentdã使ã£ã¦Mongodbã«ãªã¢ã«ã¿ã¤ã ã§æ ¼ç´ãã - Yuta.Kikuchiã®æ¥è¨ æ給3000åã®CEOã¨æ¶æããã¦ãã@yutakikucã§ããä»æ¥ã¯ç°¡åã«Mongodbã®ãã°éè¨æ©è½ãç´¹ä»ãã¾ããæ©è½ãè±å¯éãã¦æ³£ãã¦ãããã§ããã°è§£æãã人ã¯æ¯é使ã£ã¦ã¿ã¦ä¸ãããFluentdã§Mongodbã«Nginxã®Logãæµãè¾¼ãè¨å®ã¯ä¸ã®ã¨ã³ããªã¼ãåç §ãã¦ä¸ããã次åã¯AggregationFramework/MapReduceå¨ãã«ã¤ãã¦è§¦ãããã¨æãã¾ãã æ³£ãã話 : é
RDBMSã®å ´å SELECT * FROM userlog WHERE timestamp BETWEEN '2011-11-01' AND '2011-11-02' ORDER BY timestamp; Mongo Shellã®å ´å var query = { "timestamp" : { "$gte" : ISODate("2011-11-01T00:00:00+09:00"), "$lte" : ISODate("2011-11-02T00:00:00+09:00") } }; db.userlog.find(query).sort({timestamp:1}); å¢çå¤ãå«ã¿ãããªãå ´åã¯ã"$gt","$lt"ã¨æ¸ãã¾ãã var query = { "timestamp" : { "$gt" : ISODate("2011-11-01T00:00:00+09:00"),
Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. const mongoose = require('mongoose'); mongoose.connect('mongodb://127.0.0.1:27017/test'); const Cat = mongoose.model('Cat', { name: String }); const kitty = new Cat({ name: 'Zildjian' }); kitty.save().then(() => console.log('meow'));Mongoose provides a straight-forward, schema
MongoDBã¯ãSQLãã¼ã¿ãã¼ã¹ã«è¿ãNoSQLã§ããããã¥ã¡ã³ããã¼ã¿ãã¼ã¹ããã¼ã»ããªã¥ã¼åãã¼ã¿ã¹ãã¢ï¼key-valueã¹ãã¢ï¼ããªã¬ã¼ã·ã§ãã«ãã¼ã¿ãã¼ã¹ï¼RDBï¼ã®è¯ãã¨ãåããç®æãã¦ãã¾ãã使ãåæãRDBã«è¿ãã¨ããã¾ãã MongoDBã®ãã¼ã¿ãã¼ã¹æ§é MongoDBã¯ããã¼ã¿ãã¼ã¹ãã³ã¬ã¯ã·ã§ã³ãããã¥ã¡ã³ãã¨ããé層æ§é ã«ãªã£ã¦ãã¾ãï¼å³1ï¼ãã³ã¬ã¯ã·ã§ã³ã¯RDBã§ã¯ããã¼ãã«ã«ç¸å½ãããã®ã§ãã RDBã¨éããMongoDBã§ã¯ã¹ãã¼ããä¸è¦ã§ããRDBã§ã¯ãã¼ãã«ã®åè¡ï¼ã¬ã³ã¼ãï¼ããã©ã®ãããªãã¼ã¿ãã©ã®é ã«æã£ã¦ããããæåã«å®ç¾©ããå¿ è¦ãããã¾ããã¾ããåã¬ã³ã¼ãã¯ã¹ãã¼ãã§å®ç¾©ãããå ±éã®æ§é ãæã£ã¦ãã¾ãã ã¨ããããMongoDBã®ã³ã¬ã¯ã·ã§ã³ã¯ã¹ãã¼ãã¬ã¹ã§ãããã¬ã³ã¼ãã«ç¸å½ããããã¥ã¡ã³ãã¨ãããã¼ã¿ãä¿æãã¦ãã¾ãããä¸ã¤ã²ã¨ã¤ã®ããã¥
ããã«ã¡ã¯ãTokyo Otaku Mode CTOã®é¢æ ¹ã§ãã Tokyo Otaku Modeã§ã¯ã2013å¹´8æããotakumode.comä¸ã«ã«ã¼ãæ©è½ã追å ãã決æ¸ã¾ã§ãã¯ã³ã¹ãããã§ã§ããæµ·å¤åãECãµã¤ããã¹ã¿ã¼ããã¾ããã ã©ãããã·ã¹ãã æ§æã§otakumode.comãéç¨ããã¦ããããèãããæããNode.js + MongoDBã§ããã¨çããã¨ãã¨ã³ã¸ãã¢ã®çããã¯ä¸æ§ã«ã³ã£ãããã¾ããç¹ã«é©ãããã®ããMongoDBãã¡ã¤ã³ã®DBã«ä½¿ç¨ãã¦ããç¹ã§ããä¿¡é ¼æ§ã«å®è©ãããããã§ãªããã¾ãNoSQLã«å¯¾ããã©ã¤ããªã¤ã¡ã¼ã¸ãä¸è¬çã«ãããããECãµã¤ãã®ãããã¯ã·ã§ã³ã¨ãã¦ä½¿ããã¨ã«çåãæããã¦ããæ¹ãå¤ãã®ã§ãããã ããããååå®ç¨ã«èããæ¥ã æ©è½è¿½å ãå ¥ãæé·ãç¶ããã¹ã¿ã¼ãã¢ããã®ç°å¢ã§ãå®éã«1å¹´ééç¨ãã¦ããECãµã¤ããããã«ãããã¨ãäºå®ã§ãã ã
mongoã³ãã³ãããæ¥ç¶ããéã«ãªã¼ã«ãã¿ã¤ã(SQLè³)ããæã 人é¡ã«ã 調ã¹ãããå½¢ã§insertãselectãupdateãè¡ãæ¹æ³ã調ã¹ã¾ããã å®ç¾©åç § // use [ãã¼ã¿ãã¼ã¹å] use [ãã¼ã¿ãã¼ã¹å] // show databases show dbs // show tables show collectionsåç §ç³» // select * from [ã³ã¬ã¯ã·ã§ã³å] db.[ã³ã¬ã¯ã·ã§ã³å].find() // select * from [ã³ã¬ã¯ã·ã§ã³å] where x=4 db.[ã³ã¬ã¯ã·ã§ã³å].find({x:4}) // select j from [ã³ã¬ã¯ã·ã§ã³å] where x=4 db.[ã³ã¬ã¯ã·ã§ã³å].find({x:4}, {j:1}) // select * from [ã³ã¬ã¯ã·ã§ã³å] limit 1 db.[ã³ã¬ã¯ã·ã§ã³
ã»2å¹´ã§æé10åPVãæ¯ããã¾ã§æé·ããâ¨ZenClerkã®éç¨ä¸ã®å·¥å¤«ãç´¹ä» ã»AWSã®Tipsã¨ãããã話ã®å ±æ
2010å¹´04æ25æ¥00:16 NoSQL MySQL 10åã§ç解ããMongoDBã®ããã©ã¼ãã³ã¹ MongoDBã£ã¦ã¹ãã¼ãã¬ã¹ãªDBã§ãã«ã©ã ã決ããããªããããªå ´åã«ä½¿ãã¨å¹æçãªãã ã¨æããã§ãããããããããã¼ã¿ã¯ããã·ã¥ã«ãã¦ãJSON å½¢å¼ã§ MySQL ã«ä¿åããã°è¯ãã®ã§ã¯ï¼ãã¨ããæè¦ãããã ããã®ã§ããã®å ´åã¨ã®ããã©ã¼ãã³ã¹æ¯è¼ããã¦ã¿ã¾ããã â»æå㯠MySQL ã¨ã㦠innodb ã§ããè©ä¾¡ãã¦ããªãã£ããããmyisam ã®çµæã«ã¤ãã¦ã追è¨ãã¾ããã(2010/04/25追è¨) ãã³ããã¼ã¯ç°å¢ã®æºå 試ããç°å¢ã¨ãã¦ã¯ãMySQL 5.1.45, MongoDB 1.2.4 ã§ããMySQLå´ã¯ãããªæãã mysql> desc blogs; +------------+--------------+------+-----+---------
2.6対å¿ç MongoDBã®èãæ¬ The Little MongoDB Book Karl Seguin è / 濱é å¸ è¨³ i ç®æ¬¡ ç®æ¬¡ i ãã®æ¬ã«ã¤ã㦠iii ã©ã¤ã»ã³ã¹ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii èè ã«ã¤ã㦠. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii è¬è¾ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii ææ°ãã¼ã¸ã§ã³ . . . . . . . . . . . . . . . . . .
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}