README.md (2308B) - Raw
1 Welcome 2 ------- 3 4 NoSQL for cartographers. 5 6 7 Motiejus Jakštys 8 9 2019-11-08 10 11 12 13 14 15 16 17 18 Why me? 19 ------- 20 21 - 2008: first full-time software job. 22 - 2009-2012: graduated Computing Science in Glasgow. 23 - 2014-2016: job: Amazon Web Services. 24 - 2016-now: job: Uber. 25 26 SQL and NoSQL are part of the job. 27 28 29 30 31 32 33 34 35 What is a server? 36 ----------------- 37 38 Demonstration. 39 40 - pi 41 - pi-at-home.jpg 42 43 44 45 46 47 48 49 50 51 52 SQL 53 --- 54 55 - Invented > 50 years ago. 56 - Technologies change, concepts remain. 57 58 59 60 61 62 63 64 65 66 67 68 Power and limitation of SQL 69 --------------------------- 70 71 Let's model a house on a piece of land. 72 73 - There will be always a piece of land under a house. 74 - SQL says you can enforce this. 75 76 **They must be on the same server to enforce this constraint.** 77 78 79 What do we do? 80 81 82 83 84 Get a big database 85 ------------------ 86 87 $30 to about a $1M. 88 89 90 91 92 93 94 95 96 97 98 99 100 Alternatives 101 ============ 102 103 Split data across many servers! 104 105 Topology is not always needed: 106 - Pictures/videos. 107 - Stock prices. 108 - Sensor measurements. 109 110 111 Hey, No SQL! 112 113 114 115 116 117 118 119 Sort-of-SQL 120 ----------- 121 122 Leave the syntax, cut out constraints. 123 - familiar syntax. 124 - more storage. 125 - less features. 126 127 Hive: 128 ``` 129 SELECT a.foo FROM invites a WHERE a.ds='2008-08-15'; 130 ``` 131 132 133 134 135 136 137 Key-Value: fast & small 138 ----------------------- 139 140 - Different syntax 141 - Different features 142 143 DynamoDB: 144 ``` 145 table = dynamodb.create_table( 146 TableName='users', 147 KeySchema=[ 148 { 'AttributeName': 'username', 'KeyType': 'HASH' }, 149 { 'AttributeName': 'last_name', 'KeyType': 'RANGE' } 150 ], 151 ) 152 ``` 153 154 155 156 157 158 Key-Value: slow & very big 159 --------------------- 160 161 Videos or just large files? S3 is most popular. 162 163 Imaginge an infinite disk. 164 165 166 167 168 169 170 171 172 173 174 175 Cloud 176 ----- 177 178 "The Cloud" is just someone's servers with software. 179 180 - pi-datacenter.jpg 181 - datacenter.jpg 182 - snowball-edge.jpg 183 184 185 186 187 188 189 190 191 192 193 194 195 Storage 196 ------- 197 198 Storage in "the cloud" is quite cheap. People start moving. 199 200 https://www.youtube.com/watch?v=8vQmTZTq7nw 201 202 203 204 205 206 207 208 209 210 211 212 213 What next? 214 ---------- 215 216 - Create an account in S3. 217 - Upload a file there. 218 - Share it with everyone under your domain. 219 - It's free! 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 Want to know more? 235 ------------------ 236 237 - Stanford Computer Science 101: https://online.stanford.edu/courses/soe-ycscs101-sp-computer-science-101 238 - Python programming introduction for everyone: https://tutorial.djangogirls.org/en/ 239 - Cloud services: https://aws.amazon.com/