1 00:00:12,160 --> 00:00:17,920 welcome back everyone to the devops 2 00:00:14,400 --> 00:00:19,920 track here at pycon online 2021 i hope 3 00:00:17,920 --> 00:00:22,560 you're enjoying the day and all of the 4 00:00:19,920 --> 00:00:23,840 talks that we've had available for you 5 00:00:22,560 --> 00:00:25,439 i've certainly been enjoying this has 6 00:00:23,840 --> 00:00:27,199 been been fascinating it's always 7 00:00:25,439 --> 00:00:29,279 interesting seeing how things come 8 00:00:27,199 --> 00:00:30,880 together as as all this planning that 9 00:00:29,279 --> 00:00:32,239 we've done you don't quite know how it's 10 00:00:30,880 --> 00:00:34,079 going to work out until we're actually 11 00:00:32,239 --> 00:00:36,000 live but it's excellent when we see it 12 00:00:34,079 --> 00:00:38,879 happens and so far we haven't had 13 00:00:36,000 --> 00:00:40,320 anything fall over dramatically um so 14 00:00:38,879 --> 00:00:41,920 there's still time hopefully we can 15 00:00:40,320 --> 00:00:43,440 break something really really badly by 16 00:00:41,920 --> 00:00:44,719 the end of the day it is the devil's 17 00:00:43,440 --> 00:00:46,719 track after all 18 00:00:44,719 --> 00:00:48,719 but here to uh give us our next talk we 19 00:00:46,719 --> 00:00:50,559 have matthew coles who's here to talk 20 00:00:48,719 --> 00:00:53,280 about when a little web app needs to 21 00:00:50,559 --> 00:00:55,520 grow up a journey from a hobby project 22 00:00:53,280 --> 00:00:57,440 to production i'm keen to find out what 23 00:00:55,520 --> 00:00:59,600 this project was and hear about this 24 00:00:57,440 --> 00:01:01,120 journey and uh we have a pre-arranged 25 00:00:59,600 --> 00:01:03,600 signal to make sure that matthew can 26 00:01:01,120 --> 00:01:05,760 come in at the right time so matthew 27 00:01:03,600 --> 00:01:06,880 cacor cacor 28 00:01:05,760 --> 00:01:09,439 over to you 29 00:01:06,880 --> 00:01:11,520 perfect uh read loud and clear so um 30 00:01:09,439 --> 00:01:14,240 yeah like thanks everyone for joining um 31 00:01:11,520 --> 00:01:16,720 pycon my name is matthew coles 32 00:01:14,240 --> 00:01:18,400 i'm working in cloud at the moment so i 33 00:01:16,720 --> 00:01:20,159 work for one of the the cloud technology 34 00:01:18,400 --> 00:01:22,720 companies but i've always been building 35 00:01:20,159 --> 00:01:24,320 apps a lot of the apps that i've built 36 00:01:22,720 --> 00:01:26,640 are kind of like hobby projects weekend 37 00:01:24,320 --> 00:01:29,119 projects um as well as like the ones 38 00:01:26,640 --> 00:01:31,200 that we we have for work as well so this 39 00:01:29,119 --> 00:01:32,640 the story is really about a hobby 40 00:01:31,200 --> 00:01:34,960 project that turned into something a bit 41 00:01:32,640 --> 00:01:37,280 more um hence the name and some of the 42 00:01:34,960 --> 00:01:38,799 learnings that i had with that and and i 43 00:01:37,280 --> 00:01:40,560 guess you know one of the most 44 00:01:38,799 --> 00:01:42,880 interesting things is like how do these 45 00:01:40,560 --> 00:01:45,360 things grow like and and how should you 46 00:01:42,880 --> 00:01:46,640 start because it is quite scary um 47 00:01:45,360 --> 00:01:48,399 you know thinking about building 48 00:01:46,640 --> 00:01:50,580 something from scratch and all the 49 00:01:48,399 --> 00:01:51,680 different things so anyways um 50 00:01:50,580 --> 00:01:53,200 [Music] 51 00:01:51,680 --> 00:01:54,560 considering we're on the dev oops track 52 00:01:53,200 --> 00:01:57,520 the only other thing that i'll call out 53 00:01:54,560 --> 00:01:59,200 very quickly is uh i uh i have yet i 54 00:01:57,520 --> 00:02:01,040 just moved into a new space and i've got 55 00:01:59,200 --> 00:02:03,119 like a whole bunch of stuff half built 56 00:02:01,040 --> 00:02:04,479 in the background um so i didn't manage 57 00:02:03,119 --> 00:02:06,399 to finish everything in my new little 58 00:02:04,479 --> 00:02:08,959 working from home area um so hopefully 59 00:02:06,399 --> 00:02:11,840 that happens next week but yeah 60 00:02:08,959 --> 00:02:12,640 let's get straight into it 61 00:02:11,840 --> 00:02:14,640 so 62 00:02:12,640 --> 00:02:17,440 this uh project that i wanted to talk 63 00:02:14,640 --> 00:02:19,440 about i started with like something that 64 00:02:17,440 --> 00:02:21,280 a friend came and 65 00:02:19,440 --> 00:02:23,360 chatted to me about they said they were 66 00:02:21,280 --> 00:02:26,000 doing an event um they wanted to be able 67 00:02:23,360 --> 00:02:28,000 to have uh some t-shirts that were um 68 00:02:26,000 --> 00:02:29,920 able to be delivered to people that were 69 00:02:28,000 --> 00:02:32,000 attending the event 70 00:02:29,920 --> 00:02:33,920 and the the issue that they had was they 71 00:02:32,000 --> 00:02:36,560 they didn't really trust uh any of the 72 00:02:33,920 --> 00:02:38,800 third parties that had like quick easy 73 00:02:36,560 --> 00:02:39,840 form systems or form solutions that they 74 00:02:38,800 --> 00:02:42,319 could use 75 00:02:39,840 --> 00:02:44,080 the other thing is uh you know like my 76 00:02:42,319 --> 00:02:45,120 friend she was very security conscious 77 00:02:44,080 --> 00:02:47,040 as well 78 00:02:45,120 --> 00:02:49,599 and so she didn't really want to store 79 00:02:47,040 --> 00:02:51,440 much data when it came to the t-shirts 80 00:02:49,599 --> 00:02:54,480 as well she just wanted a form that 81 00:02:51,440 --> 00:02:56,560 would basically send off to a vendor 82 00:02:54,480 --> 00:02:58,640 and so with that i said yeah no problems 83 00:02:56,560 --> 00:03:00,640 i'll treat it like a weekend project and 84 00:02:58,640 --> 00:03:01,519 you can see a shot of my lego on the 85 00:03:00,640 --> 00:03:03,120 side 86 00:03:01,519 --> 00:03:04,800 if i'm not working on side projects on 87 00:03:03,120 --> 00:03:06,640 the weekend i'm usually building legos 88 00:03:04,800 --> 00:03:08,720 this is one of the sets that i built 89 00:03:06,640 --> 00:03:09,760 from i think it was the creators lego 90 00:03:08,720 --> 00:03:13,040 creators 91 00:03:09,760 --> 00:03:15,519 so you can take a look at that there 92 00:03:13,040 --> 00:03:17,200 so i sketched out a rough architecture 93 00:03:15,519 --> 00:03:18,640 of what i thought would be needed for 94 00:03:17,200 --> 00:03:20,720 this application based on those 95 00:03:18,640 --> 00:03:23,280 specifications that she provided you 96 00:03:20,720 --> 00:03:26,000 know i knew that i would be 97 00:03:23,280 --> 00:03:27,680 creating some form of web application 98 00:03:26,000 --> 00:03:29,680 it's probably going to be delivered out 99 00:03:27,680 --> 00:03:31,519 on a server 100 00:03:29,680 --> 00:03:33,120 it's going to have a whole bunch of 101 00:03:31,519 --> 00:03:35,360 different form elements i'm probably 102 00:03:33,120 --> 00:03:38,480 going to need to know like the person's 103 00:03:35,360 --> 00:03:40,480 name their address their phone number 104 00:03:38,480 --> 00:03:43,840 you know what type of t-shirt that they 105 00:03:40,480 --> 00:03:45,519 want what's the size what's the color 106 00:03:43,840 --> 00:03:47,200 i might have some different details and 107 00:03:45,519 --> 00:03:49,440 some of the graphics as well 108 00:03:47,200 --> 00:03:51,280 and you know this this design was was 109 00:03:49,440 --> 00:03:53,280 simply around like let's not have a 110 00:03:51,280 --> 00:03:55,360 database or anything let's just like 111 00:03:53,280 --> 00:03:57,439 take exactly what's entered in that form 112 00:03:55,360 --> 00:03:59,120 and feed it into an email service and 113 00:03:57,439 --> 00:04:01,439 that email service is going to then 114 00:03:59,120 --> 00:04:03,120 notify the end user like the order's 115 00:04:01,439 --> 00:04:04,560 been submitted to that up uh to the 116 00:04:03,120 --> 00:04:06,560 vendor that's handling the t-shirt 117 00:04:04,560 --> 00:04:08,480 orders uh but it's also gonna at the 118 00:04:06,560 --> 00:04:11,280 same time on that same thread also kind 119 00:04:08,480 --> 00:04:12,799 of act as the catalyst for the vendor to 120 00:04:11,280 --> 00:04:15,760 put that order together and ship it out 121 00:04:12,799 --> 00:04:16,720 to the customer so it's fairly simple 122 00:04:15,760 --> 00:04:18,400 but 123 00:04:16,720 --> 00:04:19,680 knowing me and the way that i work and i 124 00:04:18,400 --> 00:04:21,519 think a lot of other people work this 125 00:04:19,680 --> 00:04:22,400 way as well 126 00:04:21,519 --> 00:04:23,919 i 127 00:04:22,400 --> 00:04:26,800 i kind of want all the things when i 128 00:04:23,919 --> 00:04:28,960 build an app so this is kind of like 129 00:04:26,800 --> 00:04:31,520 you know why i wanted to to talk about 130 00:04:28,960 --> 00:04:34,320 this as a topic but you know like i i 131 00:04:31,520 --> 00:04:36,479 could have like massively like um over 132 00:04:34,320 --> 00:04:38,080 overscope this i guess i'm always 133 00:04:36,479 --> 00:04:39,680 wanting to learn certain things i always 134 00:04:38,080 --> 00:04:41,840 have like a backlog of things that i 135 00:04:39,680 --> 00:04:44,560 want to learn i always want it to be a 136 00:04:41,840 --> 00:04:46,320 really cool amazing app and um you know 137 00:04:44,560 --> 00:04:47,759 like that kind of got me thinking on 138 00:04:46,320 --> 00:04:49,600 this weekend before i started the 139 00:04:47,759 --> 00:04:51,600 project like how do i should i have 140 00:04:49,600 --> 00:04:53,120 user's login is that really needed how 141 00:04:51,600 --> 00:04:54,720 do i handle logging should it be 142 00:04:53,120 --> 00:04:56,800 container based should i use docker 143 00:04:54,720 --> 00:04:58,479 kubernetes or something 144 00:04:56,800 --> 00:04:59,759 how am i going to handle like form 145 00:04:58,479 --> 00:05:01,360 validation 146 00:04:59,759 --> 00:05:02,639 like i can have simple validation on 147 00:05:01,360 --> 00:05:03,919 certain elements that are getting sent 148 00:05:02,639 --> 00:05:07,280 to me but do we need additional 149 00:05:03,919 --> 00:05:09,840 validations to uh make sure that user 150 00:05:07,280 --> 00:05:11,280 email address is really an email a valid 151 00:05:09,840 --> 00:05:13,840 email address rather than just being 152 00:05:11,280 --> 00:05:15,280 entered as an email address um are we 153 00:05:13,840 --> 00:05:17,280 going to have to track orders and give 154 00:05:15,280 --> 00:05:19,759 updates to customers like can i make 155 00:05:17,280 --> 00:05:21,919 this nice and slick so i can just like 156 00:05:19,759 --> 00:05:24,560 do a git push have it arrive in my git 157 00:05:21,919 --> 00:05:25,759 repository and then ci cd does all the 158 00:05:24,560 --> 00:05:28,240 things and builds the environment 159 00:05:25,759 --> 00:05:29,600 magically for me uh which is nice 160 00:05:28,240 --> 00:05:32,800 and then the other thing is like you 161 00:05:29,600 --> 00:05:34,800 know i i spent a bit of time with react 162 00:05:32,800 --> 00:05:36,560 i really wanted to build a lot of this 163 00:05:34,800 --> 00:05:39,039 in flask a fort flask would be a really 164 00:05:36,560 --> 00:05:41,039 nice framework to use and i really like 165 00:05:39,039 --> 00:05:42,880 i'm using python as a language but i'm 166 00:05:41,039 --> 00:05:44,880 like you know do i need to have like a 167 00:05:42,880 --> 00:05:47,360 very slick front end should i be doing 168 00:05:44,880 --> 00:05:49,120 react and javascript at the very start 169 00:05:47,360 --> 00:05:50,880 and the last thing is like messaging 170 00:05:49,120 --> 00:05:52,800 queues as well so i send off an order 171 00:05:50,880 --> 00:05:55,120 and it might be action by a system 172 00:05:52,800 --> 00:05:57,360 eventually i might have a database maybe 173 00:05:55,120 --> 00:05:59,280 i need redis for state if i have user's 174 00:05:57,360 --> 00:06:01,120 login and maybe i use it for a couple of 175 00:05:59,280 --> 00:06:03,600 other things as well 176 00:06:01,120 --> 00:06:05,120 do i need an authentication server do i 177 00:06:03,600 --> 00:06:06,880 need monitoring alarming if something 178 00:06:05,120 --> 00:06:09,199 goes wrong like how many times is this 179 00:06:06,880 --> 00:06:10,800 going to be used how how often am i 180 00:06:09,199 --> 00:06:12,800 going to have to actually monitor this 181 00:06:10,800 --> 00:06:14,639 when it comes to 182 00:06:12,800 --> 00:06:16,000 you know the the orders coming in and 183 00:06:14,639 --> 00:06:17,680 making sure that it's up and available 184 00:06:16,000 --> 00:06:20,000 for everyone all the time 185 00:06:17,680 --> 00:06:22,319 uh you can see on the other side as well 186 00:06:20,000 --> 00:06:25,840 i was also thinking about um you know 187 00:06:22,319 --> 00:06:28,000 the customer tracking uh notifications 188 00:06:25,840 --> 00:06:29,600 so um it's not just the the order 189 00:06:28,000 --> 00:06:31,280 tracking but it's like how do i keep the 190 00:06:29,600 --> 00:06:33,199 customer completely updated on the life 191 00:06:31,280 --> 00:06:34,720 cycle of like the t-shirt being produced 192 00:06:33,199 --> 00:06:35,600 and everything else 193 00:06:34,720 --> 00:06:37,520 so 194 00:06:35,600 --> 00:06:38,639 this is kind of like the the default way 195 00:06:37,520 --> 00:06:40,720 that i work 196 00:06:38,639 --> 00:06:42,479 and it's very different to what was 197 00:06:40,720 --> 00:06:44,400 actually needed for the project and 198 00:06:42,479 --> 00:06:47,280 because it was a weekend project i kind 199 00:06:44,400 --> 00:06:48,560 of made that final call to escape 200 00:06:47,280 --> 00:06:50,639 dreamland 201 00:06:48,560 --> 00:06:52,319 so get my head out of the the clouds in 202 00:06:50,639 --> 00:06:54,880 the sky and just simply focus on what 203 00:06:52,319 --> 00:06:57,199 was actually needed to be delivered 204 00:06:54,880 --> 00:06:59,199 and it takes a lot of energy and 205 00:06:57,199 --> 00:07:01,360 patience for me to do that 206 00:06:59,199 --> 00:07:03,440 and uh and we got there eventually right 207 00:07:01,360 --> 00:07:05,599 so i just really needed to get started 208 00:07:03,440 --> 00:07:07,360 so yeah i went back to my favorite tools 209 00:07:05,599 --> 00:07:10,479 as i mentioned beforehand python and 210 00:07:07,360 --> 00:07:13,599 flask and i started to work to build the 211 00:07:10,479 --> 00:07:13,599 app over the weekend 212 00:07:13,840 --> 00:07:19,120 so easy done and dusted i've made what i 213 00:07:16,400 --> 00:07:22,000 designed very simple it all works 214 00:07:19,120 --> 00:07:23,680 end to end very very nicely 215 00:07:22,000 --> 00:07:25,520 you know like it was just one simple 216 00:07:23,680 --> 00:07:28,240 event one simple use case i can 217 00:07:25,520 --> 00:07:29,280 basically park it now 218 00:07:28,240 --> 00:07:31,599 but no 219 00:07:29,280 --> 00:07:34,400 that didn't happen in the end about two 220 00:07:31,599 --> 00:07:36,160 months later i had a couple of new 221 00:07:34,400 --> 00:07:38,080 people other friends that wanted to 222 00:07:36,160 --> 00:07:39,840 leverage this um solution from me as 223 00:07:38,080 --> 00:07:42,080 well um they reached out and the 224 00:07:39,840 --> 00:07:46,720 original friend she wanted uh to use it 225 00:07:42,080 --> 00:07:48,160 for another event as well so i guess 226 00:07:46,720 --> 00:07:50,000 what that meant was that i needed to 227 00:07:48,160 --> 00:07:51,520 make a few changes 228 00:07:50,000 --> 00:07:53,360 and this is kind of like the purpose of 229 00:07:51,520 --> 00:07:55,280 the talk as well right like if i'd if 230 00:07:53,360 --> 00:07:57,360 i'd over complicated things and built 231 00:07:55,280 --> 00:08:00,160 what i thought was needed at the very 232 00:07:57,360 --> 00:08:02,160 start the app would be very different to 233 00:08:00,160 --> 00:08:04,080 what it is today and i'll show you the 234 00:08:02,160 --> 00:08:05,440 differences at the very end 235 00:08:04,080 --> 00:08:08,000 but i wanted to talk to some of the 236 00:08:05,440 --> 00:08:09,599 complexities of um of the solution that 237 00:08:08,000 --> 00:08:11,919 i built as well so you can kind of see 238 00:08:09,599 --> 00:08:14,319 the the journey that i went on and the 239 00:08:11,919 --> 00:08:15,919 complexities and how i kind of came out 240 00:08:14,319 --> 00:08:17,599 the other end with quite a different 241 00:08:15,919 --> 00:08:19,440 architecture and quite a different 242 00:08:17,599 --> 00:08:20,960 application than i thought and that's 243 00:08:19,440 --> 00:08:23,039 just all built through that muscle of 244 00:08:20,960 --> 00:08:26,000 experience so i'm really happy that i i 245 00:08:23,039 --> 00:08:28,319 started with a basic concept and then i 246 00:08:26,000 --> 00:08:31,360 basically added and iterated through 247 00:08:28,319 --> 00:08:32,959 that at each stage that um something 248 00:08:31,360 --> 00:08:34,479 needed to happen and the project needed 249 00:08:32,959 --> 00:08:35,519 to grow or the app needed to grow as 250 00:08:34,479 --> 00:08:37,760 well 251 00:08:35,519 --> 00:08:40,080 so the new request that came in was they 252 00:08:37,760 --> 00:08:43,120 had a couple of new items very similar 253 00:08:40,080 --> 00:08:44,080 to t-shirts i think they were track suit 254 00:08:43,120 --> 00:08:46,080 pants 255 00:08:44,080 --> 00:08:48,800 uh by memory so my friend she wanted to 256 00:08:46,080 --> 00:08:50,720 have track suit pants this time around 257 00:08:48,800 --> 00:08:52,560 the other thing was uh 258 00:08:50,720 --> 00:08:54,720 the other friend that came to me two 259 00:08:52,560 --> 00:08:56,320 months later as well so this is two 260 00:08:54,720 --> 00:08:59,279 people 261 00:08:56,320 --> 00:09:02,000 she wanted to use it for different 262 00:08:59,279 --> 00:09:04,000 orders so she she was 263 00:09:02,000 --> 00:09:05,440 she had a different vendor and 264 00:09:04,000 --> 00:09:07,920 a slightly different thing i think it 265 00:09:05,440 --> 00:09:09,360 was a hoodie if i remember correctly 266 00:09:07,920 --> 00:09:12,000 but she wasn't going to use that same 267 00:09:09,360 --> 00:09:12,800 vendor and what that effectively meant 268 00:09:12,000 --> 00:09:14,800 was 269 00:09:12,800 --> 00:09:17,680 rather than having like a list emailed 270 00:09:14,800 --> 00:09:20,320 to one vendor i now had multiple vendors 271 00:09:17,680 --> 00:09:21,600 that i had to bring in and support with 272 00:09:20,320 --> 00:09:23,040 my application 273 00:09:21,600 --> 00:09:24,959 but those vendors also had different 274 00:09:23,040 --> 00:09:26,959 ways of working like the first one was 275 00:09:24,959 --> 00:09:28,320 very very flexible and could just send 276 00:09:26,959 --> 00:09:30,640 on demand 277 00:09:28,320 --> 00:09:32,000 you know just in time delivery i guess 278 00:09:30,640 --> 00:09:34,800 the other one 279 00:09:32,000 --> 00:09:37,360 was really focused on having like a full 280 00:09:34,800 --> 00:09:39,920 list of all the orders that were needed 281 00:09:37,360 --> 00:09:42,880 for all the customers and like at a 282 00:09:39,920 --> 00:09:43,680 certain time in the uh before the event 283 00:09:42,880 --> 00:09:45,440 um 284 00:09:43,680 --> 00:09:46,959 that company would then ship everything 285 00:09:45,440 --> 00:09:49,360 all at once and so they kind of wanted 286 00:09:46,959 --> 00:09:50,880 everything presented in line items 287 00:09:49,360 --> 00:09:52,560 so that kind of got me thinking about 288 00:09:50,880 --> 00:09:55,920 the architecture again 289 00:09:52,560 --> 00:09:58,480 and i kind of realized in some cases 290 00:09:55,920 --> 00:10:00,240 i am actually going to have to introduce 291 00:09:58,480 --> 00:10:02,800 a database um 292 00:10:00,240 --> 00:10:04,399 and think about the security and privacy 293 00:10:02,800 --> 00:10:06,800 of this as well i don't really like 294 00:10:04,399 --> 00:10:08,560 handling usernames addresses 295 00:10:06,800 --> 00:10:11,040 phone numbers and all of that 296 00:10:08,560 --> 00:10:12,800 um so you know i was very careful on 297 00:10:11,040 --> 00:10:15,680 what i thought about in the security and 298 00:10:12,800 --> 00:10:17,440 privacy realm of things 299 00:10:15,680 --> 00:10:20,000 but but introducing this database as 300 00:10:17,440 --> 00:10:22,160 well um you know i i ended up creating 301 00:10:20,000 --> 00:10:24,320 like i think an events table um to 302 00:10:22,160 --> 00:10:26,640 manage like the couple of events that 303 00:10:24,320 --> 00:10:28,560 were coming in but i was still manually 304 00:10:26,640 --> 00:10:30,640 like almost like creating a 305 00:10:28,560 --> 00:10:31,600 a 306 00:10:30,640 --> 00:10:33,920 like a 307 00:10:31,600 --> 00:10:36,240 every single event like i was starting 308 00:10:33,920 --> 00:10:37,760 to as more ass came in i had this like 309 00:10:36,240 --> 00:10:39,920 structured um 310 00:10:37,760 --> 00:10:41,680 like event 311 00:10:39,920 --> 00:10:44,000 uh item type 312 00:10:41,680 --> 00:10:46,320 is how i'd refer to it so it's like um 313 00:10:44,000 --> 00:10:48,480 you know this event has t-shirts um 314 00:10:46,320 --> 00:10:49,440 t-shirts have sizings and they have 315 00:10:48,480 --> 00:10:50,720 types 316 00:10:49,440 --> 00:10:52,640 but um 317 00:10:50,720 --> 00:10:55,200 you know like uh hoodies 318 00:10:52,640 --> 00:10:56,800 uh might be uh unisex so you don't 319 00:10:55,200 --> 00:10:58,640 really need to know the type it's all 320 00:10:56,800 --> 00:11:00,959 gonna be the one um but it still needs 321 00:10:58,640 --> 00:11:02,800 the item size and so that kind of like 322 00:11:00,959 --> 00:11:04,480 made me think a little bit more about do 323 00:11:02,800 --> 00:11:06,480 i need more flexibility should i be 324 00:11:04,480 --> 00:11:09,120 using sql or should i 325 00:11:06,480 --> 00:11:10,959 move across to nosql 326 00:11:09,120 --> 00:11:12,800 because i can have things as like a json 327 00:11:10,959 --> 00:11:14,240 string and maybe an object and i don't 328 00:11:12,800 --> 00:11:16,000 have to it means that i'll be more 329 00:11:14,240 --> 00:11:18,079 flexible if we start offering more than 330 00:11:16,000 --> 00:11:21,120 t-shirts so it's kind of like my thought 331 00:11:18,079 --> 00:11:23,040 process here um and i'm really happy 332 00:11:21,120 --> 00:11:26,560 that i did that in the end 333 00:11:23,040 --> 00:11:29,839 because new items and more vendors came 334 00:11:26,560 --> 00:11:32,160 so we had uh we had breakfast getting 335 00:11:29,839 --> 00:11:34,640 delivered um was one of the use cases my 336 00:11:32,160 --> 00:11:36,880 friends said they wanted to send um you 337 00:11:34,640 --> 00:11:39,519 know a bunch of friends for a particular 338 00:11:36,880 --> 00:11:41,040 event uh breakfast on the house and we 339 00:11:39,519 --> 00:11:43,040 have breakfast delivered across 340 00:11:41,040 --> 00:11:43,920 melbourne using the application which is 341 00:11:43,040 --> 00:11:44,880 really 342 00:11:43,920 --> 00:11:46,640 cool 343 00:11:44,880 --> 00:11:49,519 we had those hoodie cases we had 344 00:11:46,640 --> 00:11:52,160 t-shirts as well we had socks we had 345 00:11:49,519 --> 00:11:54,240 i couldn't find a emoji for rubik's cube 346 00:11:52,160 --> 00:11:56,320 maybe that will come sunday down in the 347 00:11:54,240 --> 00:11:58,240 future so i've got an ice cube here but 348 00:11:56,320 --> 00:12:00,399 we were like sending off rubik's cubes 349 00:11:58,240 --> 00:12:01,279 and pins and just a whole bunch of other 350 00:12:00,399 --> 00:12:04,079 stuff 351 00:12:01,279 --> 00:12:07,360 and so if i go back one i'm really happy 352 00:12:04,079 --> 00:12:08,639 that i chose to go the nosql route 353 00:12:07,360 --> 00:12:10,160 you know it would have been perfectly 354 00:12:08,639 --> 00:12:11,839 fine for sql there's ways of working 355 00:12:10,160 --> 00:12:13,839 this into sql 356 00:12:11,839 --> 00:12:16,000 but you know like this is a project in 357 00:12:13,839 --> 00:12:17,600 my side time and it was really good to 358 00:12:16,000 --> 00:12:19,279 just have a json object that i could 359 00:12:17,600 --> 00:12:20,880 interpret and uh 360 00:12:19,279 --> 00:12:22,399 and show the different elements that 361 00:12:20,880 --> 00:12:24,399 customers might need to put to the order 362 00:12:22,399 --> 00:12:27,040 list so kind of made my life a little 363 00:12:24,399 --> 00:12:29,360 bit simpler for the side project which 364 00:12:27,040 --> 00:12:31,040 is yeah which is really good 365 00:12:29,360 --> 00:12:32,480 i ended up creating that vendor table 366 00:12:31,040 --> 00:12:34,399 because i realized we've got multiple 367 00:12:32,480 --> 00:12:35,680 vendors here and i had that flexible 368 00:12:34,399 --> 00:12:37,360 solution of like 369 00:12:35,680 --> 00:12:39,760 using the database versus just sending 370 00:12:37,360 --> 00:12:41,200 an email depending on like um the 371 00:12:39,760 --> 00:12:43,040 preference of the vendor i had that 372 00:12:41,200 --> 00:12:44,320 design in the table as well 373 00:12:43,040 --> 00:12:46,560 the other thing that i had to start 374 00:12:44,320 --> 00:12:49,519 thinking about was like the event hooks 375 00:12:46,560 --> 00:12:51,440 right like um when when does the event 376 00:12:49,519 --> 00:12:52,959 close when should i send the order data 377 00:12:51,440 --> 00:12:54,800 to the vendor 378 00:12:52,959 --> 00:12:56,399 and the customers like when am i going 379 00:12:54,800 --> 00:12:57,760 to clear the data out because i don't 380 00:12:56,399 --> 00:12:59,760 really like to store this type of 381 00:12:57,760 --> 00:13:02,399 information long term right so i want i 382 00:12:59,760 --> 00:13:04,800 want it all gone once the event's gone 383 00:13:02,399 --> 00:13:06,160 but you also need a little bit 384 00:13:04,800 --> 00:13:08,560 you need to keep it for a little bit of 385 00:13:06,160 --> 00:13:11,440 time as well because sometimes customers 386 00:13:08,560 --> 00:13:12,320 need to change the order uh sometimes 387 00:13:11,440 --> 00:13:14,399 the 388 00:13:12,320 --> 00:13:15,920 vendor might lose the order as well so i 389 00:13:14,399 --> 00:13:17,760 had to think about timing around all 390 00:13:15,920 --> 00:13:19,120 these things um also which was quite 391 00:13:17,760 --> 00:13:20,959 interesting so you can see i'm like 392 00:13:19,120 --> 00:13:22,639 learning a lot from 393 00:13:20,959 --> 00:13:25,519 what i originally thought the ultimate 394 00:13:22,639 --> 00:13:26,959 version of this could be um it's kind of 395 00:13:25,519 --> 00:13:28,880 it's already branched off to something 396 00:13:26,959 --> 00:13:31,440 that's a bit more unexpected as i kind 397 00:13:28,880 --> 00:13:33,200 of get domain uh knowledge of how these 398 00:13:31,440 --> 00:13:35,279 things work 399 00:13:33,200 --> 00:13:37,040 and then the other thing was um i was 400 00:13:35,279 --> 00:13:38,560 still updating a lot of code for each of 401 00:13:37,040 --> 00:13:40,480 the different events so every time a new 402 00:13:38,560 --> 00:13:42,480 event needed to be created 403 00:13:40,480 --> 00:13:44,320 i would be like creating a route for 404 00:13:42,480 --> 00:13:45,920 that event so you could have slash the 405 00:13:44,320 --> 00:13:47,519 event name 406 00:13:45,920 --> 00:13:49,120 i was 407 00:13:47,519 --> 00:13:50,720 i was kind of like rebuilding the 408 00:13:49,120 --> 00:13:52,800 application as well redeploying the 409 00:13:50,720 --> 00:13:54,560 application so you know there was a bit 410 00:13:52,800 --> 00:13:56,639 of manual love that i needed to do there 411 00:13:54,560 --> 00:13:59,600 in some events they wanted 412 00:13:56,639 --> 00:14:01,360 a quick image hosted or they wanted a 413 00:13:59,600 --> 00:14:03,360 detailed description versus no 414 00:14:01,360 --> 00:14:04,800 description no images 415 00:14:03,360 --> 00:14:06,639 they might have wanted different colors 416 00:14:04,800 --> 00:14:08,079 in the background and all of that so 417 00:14:06,639 --> 00:14:10,639 things were kind of changing quite 418 00:14:08,079 --> 00:14:10,639 rapidly 419 00:14:10,959 --> 00:14:15,279 the next thing was that that kind of 420 00:14:13,360 --> 00:14:17,920 took me into branding and allowing 421 00:14:15,279 --> 00:14:20,160 others to manage events because this was 422 00:14:17,920 --> 00:14:21,920 a hobby project uh this was just a side 423 00:14:20,160 --> 00:14:23,920 project and this was for fun and this is 424 00:14:21,920 --> 00:14:25,920 to help a whole bunch of friends so that 425 00:14:23,920 --> 00:14:27,120 suddenly needed use cases for this as 426 00:14:25,920 --> 00:14:28,240 well so they could send things 427 00:14:27,120 --> 00:14:30,639 everywhere 428 00:14:28,240 --> 00:14:32,320 and so i i started to think maybe it's 429 00:14:30,639 --> 00:14:34,880 time that i have 430 00:14:32,320 --> 00:14:36,720 a administration portal or a form 431 00:14:34,880 --> 00:14:38,880 builder and and those things are 432 00:14:36,720 --> 00:14:39,839 complicated beasts i tell you 433 00:14:38,880 --> 00:14:43,920 um 434 00:14:39,839 --> 00:14:45,760 you know i i i wanted to not have to um 435 00:14:43,920 --> 00:14:48,480 manually change the code with the routes 436 00:14:45,760 --> 00:14:50,000 each time so i started to try and like 437 00:14:48,480 --> 00:14:51,680 clone the app 438 00:14:50,000 --> 00:14:53,519 and have it deploy with a subdomain to 439 00:14:51,680 --> 00:14:55,760 make my life easier so i looked at some 440 00:14:53,519 --> 00:14:57,600 of the cloud solutions in that space 441 00:14:55,760 --> 00:15:00,800 to make things quite easy for me where 442 00:14:57,600 --> 00:15:02,720 like if i um if i simply made a request 443 00:15:00,800 --> 00:15:04,639 i could set up a new subdomain and and 444 00:15:02,720 --> 00:15:06,399 have the app deploy and then have the 445 00:15:04,639 --> 00:15:07,519 data that's relevant to that particular 446 00:15:06,399 --> 00:15:08,399 program 447 00:15:07,519 --> 00:15:10,320 um 448 00:15:08,399 --> 00:15:12,480 some of my friends wanted codes as well 449 00:15:10,320 --> 00:15:14,160 so if anyone found that page like it 450 00:15:12,480 --> 00:15:16,160 could be a unique code that was entered 451 00:15:14,160 --> 00:15:17,839 to say hey i am part of this event so 452 00:15:16,160 --> 00:15:20,079 they didn't want authentication as such 453 00:15:17,839 --> 00:15:22,000 but like um this redemption code that 454 00:15:20,079 --> 00:15:23,360 could be used so i ended up having like 455 00:15:22,000 --> 00:15:24,959 a code table 456 00:15:23,360 --> 00:15:27,360 to manage this as well 457 00:15:24,959 --> 00:15:28,800 um you know on the admin portal and the 458 00:15:27,360 --> 00:15:31,199 form builder side i needed some 459 00:15:28,800 --> 00:15:33,360 authentication i needed the people that 460 00:15:31,199 --> 00:15:34,959 were building the events that i'd say go 461 00:15:33,360 --> 00:15:36,720 yeah create your event here they'd have 462 00:15:34,959 --> 00:15:38,880 to log in and i wanted them to be 463 00:15:36,720 --> 00:15:40,800 managed it was too i didn't really want 464 00:15:38,880 --> 00:15:42,399 to do this for end users uh because i 465 00:15:40,800 --> 00:15:44,399 thought authentication is a bit heavy 466 00:15:42,399 --> 00:15:45,839 like no one's really going to use my app 467 00:15:44,399 --> 00:15:47,519 twice right like they're just going to 468 00:15:45,839 --> 00:15:49,600 go to a particular event put in their 469 00:15:47,519 --> 00:15:51,360 details and then you know have a product 470 00:15:49,600 --> 00:15:53,279 shipped to them so i didn't really put 471 00:15:51,360 --> 00:15:55,279 authentication on the end user side but 472 00:15:53,279 --> 00:15:57,519 i thought you know my my main fringe 473 00:15:55,279 --> 00:15:58,880 she's been using it multiple times i've 474 00:15:57,519 --> 00:16:00,800 got other friends that want to use it 475 00:15:58,880 --> 00:16:02,959 like multiple times that's where i kind 476 00:16:00,800 --> 00:16:04,560 of started to look at that admin portal 477 00:16:02,959 --> 00:16:06,720 the form builder was a real headache 478 00:16:04,560 --> 00:16:08,320 actually i ended up like having a little 479 00:16:06,720 --> 00:16:11,199 bit of react here but most of it was 480 00:16:08,320 --> 00:16:13,680 made in python and um what i essentially 481 00:16:11,199 --> 00:16:16,160 was doing was like i was uh i was saving 482 00:16:13,680 --> 00:16:19,040 to the database this adjacent object 483 00:16:16,160 --> 00:16:21,600 like so they could add remove fields 484 00:16:19,040 --> 00:16:23,920 and then like if you become a point 485 00:16:21,600 --> 00:16:25,120 where um you know they've built exactly 486 00:16:23,920 --> 00:16:26,800 what they want 487 00:16:25,120 --> 00:16:29,120 and that will save the json and the 488 00:16:26,800 --> 00:16:32,240 database and then um what i can have is 489 00:16:29,120 --> 00:16:34,880 i can have my application deploy and um 490 00:16:32,240 --> 00:16:37,279 and i can have those fields shown for 491 00:16:34,880 --> 00:16:39,519 that particular event um you know based 492 00:16:37,279 --> 00:16:41,440 on what they've built out so that was 493 00:16:39,519 --> 00:16:43,360 really complicated to work for that took 494 00:16:41,440 --> 00:16:45,680 me a couple of weeks to to kind of like 495 00:16:43,360 --> 00:16:46,880 look at and find a solution there and 496 00:16:45,680 --> 00:16:49,199 leverage a couple of different open 497 00:16:46,880 --> 00:16:51,440 source things if i remember correctly 498 00:16:49,199 --> 00:16:52,880 um and then the other thing was i wanted 499 00:16:51,440 --> 00:16:54,959 more automated deployments so i'd 500 00:16:52,880 --> 00:16:57,360 started to look into like when i submit 501 00:16:54,959 --> 00:16:59,519 code um could i have multiple branches 502 00:16:57,360 --> 00:17:02,240 could i have that enacted ci cd to do 503 00:16:59,519 --> 00:17:04,640 the builds can i have some 504 00:17:02,240 --> 00:17:06,959 some level of control over um doing the 505 00:17:04,640 --> 00:17:08,640 builds issuing like ssl certificates for 506 00:17:06,959 --> 00:17:10,559 each of the different urls creating like 507 00:17:08,640 --> 00:17:11,760 the urls and the routes the urls and all 508 00:17:10,559 --> 00:17:13,360 of that 509 00:17:11,760 --> 00:17:16,480 so i kind of got into the deep end with 510 00:17:13,360 --> 00:17:18,400 all this stuff uh the last thing was uh 511 00:17:16,480 --> 00:17:19,839 rather than having everything served 512 00:17:18,400 --> 00:17:21,919 through the flask web application 513 00:17:19,839 --> 00:17:23,839 including images and stuff i started to 514 00:17:21,919 --> 00:17:26,079 think about moving it to like object 515 00:17:23,839 --> 00:17:28,319 storage or hosting so i looked at my my 516 00:17:26,079 --> 00:17:31,520 uh the cloud solutions around that 517 00:17:28,319 --> 00:17:32,640 and i started to host the images there 518 00:17:31,520 --> 00:17:34,799 because that kind of took a little bit 519 00:17:32,640 --> 00:17:36,480 of the headache around uploading off of 520 00:17:34,799 --> 00:17:39,200 my hands and somebody else could worry 521 00:17:36,480 --> 00:17:42,000 about that if anyone's done like uh you 522 00:17:39,200 --> 00:17:44,160 know image hosting or this and that um 523 00:17:42,000 --> 00:17:46,160 you know it's it's a very it's a very 524 00:17:44,160 --> 00:17:48,080 big pain to implement securely so i 525 00:17:46,160 --> 00:17:50,640 usually pass it on to the hosting 526 00:17:48,080 --> 00:17:54,160 provider to have some kind of hosting 527 00:17:50,640 --> 00:17:54,960 you know object storage solution there 528 00:17:54,160 --> 00:17:56,720 now 529 00:17:54,960 --> 00:17:57,760 i'm just gonna make sure i'm on time yep 530 00:17:56,720 --> 00:18:00,559 perfect 531 00:17:57,760 --> 00:18:02,640 now the next thing was the cost was 532 00:18:00,559 --> 00:18:04,720 erratic right like i would have the 533 00:18:02,640 --> 00:18:06,799 server that was running all the time or 534 00:18:04,720 --> 00:18:08,960 set of servers and like i'd have them 535 00:18:06,799 --> 00:18:11,039 running for the whole event but i might 536 00:18:08,960 --> 00:18:13,440 only get like a couple of hundred to a 537 00:18:11,039 --> 00:18:15,360 couple of thousand orders over a period 538 00:18:13,440 --> 00:18:17,760 of like a month um leading up to each of 539 00:18:15,360 --> 00:18:19,760 these events before the merch was sent 540 00:18:17,760 --> 00:18:21,280 and um you know i was paying out of my 541 00:18:19,760 --> 00:18:23,520 own personal pocket for this this was 542 00:18:21,280 --> 00:18:26,160 all for friends and you know got it it 543 00:18:23,520 --> 00:18:28,320 got very um expensive having multiple 544 00:18:26,160 --> 00:18:29,600 servers um you know mocked up and 545 00:18:28,320 --> 00:18:32,160 running for about 546 00:18:29,600 --> 00:18:34,320 um a month each and you know my cloud 547 00:18:32,160 --> 00:18:36,400 bill was going up to about you know a 548 00:18:34,320 --> 00:18:38,240 couple hundred bucks which is not ideal 549 00:18:36,400 --> 00:18:40,080 when it's out of my pocket and so it 550 00:18:38,240 --> 00:18:42,640 kind of got me rethinking like what am i 551 00:18:40,080 --> 00:18:44,160 going to do here right like 552 00:18:42,640 --> 00:18:46,640 am i going to 553 00:18:44,160 --> 00:18:50,000 am i going to have a look at like having 554 00:18:46,640 --> 00:18:51,280 a containerized solution um and having 555 00:18:50,000 --> 00:18:53,360 very small 556 00:18:51,280 --> 00:18:56,160 containers launch and then like i'm 557 00:18:53,360 --> 00:18:58,559 scaling them up if i need to i couldn't 558 00:18:56,160 --> 00:19:00,880 really work out a way of effectively um 559 00:18:58,559 --> 00:19:02,799 pausing these containers um 560 00:19:00,880 --> 00:19:05,200 like one of the challenges that i had in 561 00:19:02,799 --> 00:19:07,039 the space was like um 562 00:19:05,200 --> 00:19:10,400 i don't want the user to have to wait 563 00:19:07,039 --> 00:19:13,120 for a server to relaunch for you know a 564 00:19:10,400 --> 00:19:14,880 minute before the url loads for them if 565 00:19:13,120 --> 00:19:16,160 if like i haven't had much activity for 566 00:19:14,880 --> 00:19:18,240 like four or five 567 00:19:16,160 --> 00:19:20,160 hours on the ordering system 568 00:19:18,240 --> 00:19:21,679 um and it was still 569 00:19:20,160 --> 00:19:22,960 cost with all the different services 570 00:19:21,679 --> 00:19:24,720 that are all the different servers that 571 00:19:22,960 --> 00:19:26,640 i was spitting up so that kind of led me 572 00:19:24,720 --> 00:19:28,080 down the serverless route and i thought 573 00:19:26,640 --> 00:19:30,960 serverless is actually a pretty good 574 00:19:28,080 --> 00:19:32,720 solution for this application um 575 00:19:30,960 --> 00:19:36,000 serverless solutions are kind of 576 00:19:32,720 --> 00:19:38,400 ephemeral like they launch very quickly 577 00:19:36,000 --> 00:19:39,919 um they do a particular task and then 578 00:19:38,400 --> 00:19:42,080 they kind of go back to sleep until 579 00:19:39,919 --> 00:19:44,640 somebody comes back right so i thought 580 00:19:42,080 --> 00:19:46,960 well what i could do is i could use a 581 00:19:44,640 --> 00:19:49,200 a cdn a content delivery network i could 582 00:19:46,960 --> 00:19:50,960 have my images stored 583 00:19:49,200 --> 00:19:53,520 within my object storage my object 584 00:19:50,960 --> 00:19:54,880 hosting and then what i could do is i 585 00:19:53,520 --> 00:19:57,600 could just write 586 00:19:54,880 --> 00:19:59,200 small snippets of code to basically like 587 00:19:57,600 --> 00:20:00,720 enact what i want to do with the data 588 00:19:59,200 --> 00:20:03,039 and check what's in the database and 589 00:20:00,720 --> 00:20:05,039 send notifications and this and that 590 00:20:03,039 --> 00:20:07,200 and so i felt like it was a pretty good 591 00:20:05,039 --> 00:20:09,200 fit for serverless plus i wanted to play 592 00:20:07,200 --> 00:20:10,320 with it to be honest as well and learn a 593 00:20:09,200 --> 00:20:12,480 bit more 594 00:20:10,320 --> 00:20:14,640 i say flask serverless here 595 00:20:12,480 --> 00:20:15,919 it wasn't actually flask i used 596 00:20:14,640 --> 00:20:18,320 something very similar i found a 597 00:20:15,919 --> 00:20:20,240 framework in particular 598 00:20:18,320 --> 00:20:22,240 that was built for a particular cloud 599 00:20:20,240 --> 00:20:23,760 vendor so i i ended up using that 600 00:20:22,240 --> 00:20:25,360 solution um 601 00:20:23,760 --> 00:20:27,200 and that worked really really nicely for 602 00:20:25,360 --> 00:20:28,880 me uh it meant that i could tie into 603 00:20:27,200 --> 00:20:30,400 like their object storage quite easily 604 00:20:28,880 --> 00:20:33,280 the database storage quite easily with 605 00:20:30,400 --> 00:20:36,000 minimal work and to kind of move from 606 00:20:33,280 --> 00:20:38,159 like that existing um flask application 607 00:20:36,000 --> 00:20:39,919 to floss uh to the serverless 608 00:20:38,159 --> 00:20:41,440 application it was actually kind of 609 00:20:39,919 --> 00:20:43,440 minimal effort right like because i 610 00:20:41,440 --> 00:20:45,840 basically just copy pasted the routes 611 00:20:43,440 --> 00:20:48,000 and set up separate files and 612 00:20:45,840 --> 00:20:49,760 kind of separated things a little bit 613 00:20:48,000 --> 00:20:51,200 and reworked a little bit of the uh the 614 00:20:49,760 --> 00:20:52,159 logic it was a lot quicker than i'd 615 00:20:51,200 --> 00:20:54,559 thought 616 00:20:52,159 --> 00:20:55,760 um i'd probably i'd probably go down the 617 00:20:54,559 --> 00:20:57,840 container route if i had something 618 00:20:55,760 --> 00:21:00,960 really heavy that was always accessed um 619 00:20:57,840 --> 00:21:03,440 just in case anyone's wondering um so i 620 00:21:00,960 --> 00:21:05,200 always found that interesting too um you 621 00:21:03,440 --> 00:21:06,880 know like there's always a point where 622 00:21:05,200 --> 00:21:08,640 it's like is this a serverless use case 623 00:21:06,880 --> 00:21:11,120 is this a containers use case or should 624 00:21:08,640 --> 00:21:13,360 i keep my like existing app running as 625 00:21:11,120 --> 00:21:16,159 is and deploy you know like it didn't 626 00:21:13,360 --> 00:21:18,799 one go as one thing um which i might do 627 00:21:16,159 --> 00:21:20,640 if you know if i uh if i need to 628 00:21:18,799 --> 00:21:22,480 maintain state and i've kind of baked it 629 00:21:20,640 --> 00:21:24,480 into my app for some silly reason 630 00:21:22,480 --> 00:21:26,640 sometimes you know it happens 631 00:21:24,480 --> 00:21:28,640 um so i went down that route and the 632 00:21:26,640 --> 00:21:31,440 other thing was like i had a couple of 633 00:21:28,640 --> 00:21:33,840 users kind of say that they they had uh 634 00:21:31,440 --> 00:21:36,480 lost their order or they 635 00:21:33,840 --> 00:21:39,280 um or they don't think the form worked 636 00:21:36,480 --> 00:21:41,280 for whatever reason uh and so i kind of 637 00:21:39,280 --> 00:21:43,919 started to think i might need to do some 638 00:21:41,280 --> 00:21:46,159 logging here um i might want to have 639 00:21:43,919 --> 00:21:48,640 like some alarming like based on certain 640 00:21:46,159 --> 00:21:50,480 events as well i might want some alarms 641 00:21:48,640 --> 00:21:52,400 set up if the bill starts getting too 642 00:21:50,480 --> 00:21:54,000 expensive and i haven't realized i've 643 00:21:52,400 --> 00:21:56,159 done something in particular and that's 644 00:21:54,000 --> 00:21:57,760 eating up cost 645 00:21:56,159 --> 00:21:59,919 but most of the alarm was there to make 646 00:21:57,760 --> 00:22:01,200 sure that like um things were scaling up 647 00:21:59,919 --> 00:22:03,760 and things were deploying and things 648 00:22:01,200 --> 00:22:05,280 were working as expected and then i also 649 00:22:03,760 --> 00:22:08,000 like just for fun because i wanted to 650 00:22:05,280 --> 00:22:09,200 learn as well um but i also wanted like 651 00:22:08,000 --> 00:22:11,600 um 652 00:22:09,200 --> 00:22:13,919 to not just like deploy the app each 653 00:22:11,600 --> 00:22:15,520 time in ci cd i wanted to kind of create 654 00:22:13,919 --> 00:22:17,200 these as like many many little 655 00:22:15,520 --> 00:22:19,280 applications so they talk to the same 656 00:22:17,200 --> 00:22:21,600 central database they'd be storing 657 00:22:19,280 --> 00:22:23,120 things in the same bucket um but i 658 00:22:21,600 --> 00:22:24,320 started to think about how do i create 659 00:22:23,120 --> 00:22:26,960 like a whole bunch of like 660 00:22:24,320 --> 00:22:28,480 infrastructure around um so that i could 661 00:22:26,960 --> 00:22:30,799 recreate the whole environment through 662 00:22:28,480 --> 00:22:32,240 code um very very quickly so i looked at 663 00:22:30,799 --> 00:22:34,159 like some of the tools in that space 664 00:22:32,240 --> 00:22:36,400 which is really cool too 665 00:22:34,159 --> 00:22:38,480 i also started to and 666 00:22:36,400 --> 00:22:40,240 this is like something that was was in 667 00:22:38,480 --> 00:22:41,760 the works and i actually hadn't finished 668 00:22:40,240 --> 00:22:43,760 off because i haven't used uh the 669 00:22:41,760 --> 00:22:45,440 application for a little while now but i 670 00:22:43,760 --> 00:22:47,360 started to think about like not just 671 00:22:45,440 --> 00:22:49,760 having like email as a notification 672 00:22:47,360 --> 00:22:51,520 service um from my cloud provider i was 673 00:22:49,760 --> 00:22:52,320 using like a tool that they had for that 674 00:22:51,520 --> 00:22:53,280 there 675 00:22:52,320 --> 00:22:54,799 um 676 00:22:53,280 --> 00:22:57,520 i started to think about like do i 677 00:22:54,799 --> 00:22:59,840 introduce sms as well and that might 678 00:22:57,520 --> 00:23:01,360 help with um the customer 679 00:22:59,840 --> 00:23:02,640 you know in these bulk orders where they 680 00:23:01,360 --> 00:23:04,320 might submit at the very start of the 681 00:23:02,640 --> 00:23:05,600 month the order doesn't get processed to 682 00:23:04,320 --> 00:23:08,320 the end of the month at least they can 683 00:23:05,600 --> 00:23:09,840 see their journey um with that with that 684 00:23:08,320 --> 00:23:12,240 vendor it's like hey 685 00:23:09,840 --> 00:23:14,320 if the vendor's able to expose like 686 00:23:12,240 --> 00:23:17,360 updates on my side i could translate 687 00:23:14,320 --> 00:23:18,799 them was what i was thinking and i could 688 00:23:17,360 --> 00:23:20,320 basically have 689 00:23:18,799 --> 00:23:23,440 let's say 690 00:23:20,320 --> 00:23:25,200 let's say uh the order is starting to 691 00:23:23,440 --> 00:23:28,080 get processed the order is now in 692 00:23:25,200 --> 00:23:29,679 manufacturing the order has been shipped 693 00:23:28,080 --> 00:23:31,200 and then you get shipping updates until 694 00:23:29,679 --> 00:23:32,240 it arrives at your doorstep so i kind of 695 00:23:31,200 --> 00:23:34,559 thought that would be a really cool 696 00:23:32,240 --> 00:23:37,280 experience and sms doesn't cost that 697 00:23:34,559 --> 00:23:39,200 much as well um so it wouldn't be free 698 00:23:37,280 --> 00:23:40,880 but i thought that would just like make 699 00:23:39,200 --> 00:23:42,240 the app more friendly for end users to 700 00:23:40,880 --> 00:23:43,520 use even though i'm running it out of my 701 00:23:42,240 --> 00:23:45,840 own pocket 702 00:23:43,520 --> 00:23:48,240 um so that's that's kind of like where 703 00:23:45,840 --> 00:23:51,440 we ended up right um 704 00:23:48,240 --> 00:23:53,279 and this is kind of where we are today 705 00:23:51,440 --> 00:23:55,039 so i wanted to kind of do a comparation 706 00:23:53,279 --> 00:23:56,640 right like if i'd started with my 707 00:23:55,039 --> 00:23:58,400 perfect architecture my perfect 708 00:23:56,640 --> 00:24:00,400 application the perfect way of building 709 00:23:58,400 --> 00:24:03,600 things based on my head i wasn't really 710 00:24:00,400 --> 00:24:05,200 a domain level expert in the space 711 00:24:03,600 --> 00:24:07,760 i would have ended up with a very 712 00:24:05,200 --> 00:24:09,679 different um you know product at the end 713 00:24:07,760 --> 00:24:11,360 of the day so i wouldn't have i wouldn't 714 00:24:09,679 --> 00:24:14,080 have realized like i needed more 715 00:24:11,360 --> 00:24:15,200 flexibility in my tables i wouldn't i 716 00:24:14,080 --> 00:24:16,880 would have realized that i probably 717 00:24:15,200 --> 00:24:18,640 didn't actually need to use redis 718 00:24:16,880 --> 00:24:20,960 because i wasn't really maintaining like 719 00:24:18,640 --> 00:24:22,720 authentication or state from end users 720 00:24:20,960 --> 00:24:24,159 um i was simply just like creating the 721 00:24:22,720 --> 00:24:26,559 order and then having things handled 722 00:24:24,159 --> 00:24:28,320 from there um you know i wanted to to 723 00:24:26,559 --> 00:24:29,760 kind of go down the container route but 724 00:24:28,320 --> 00:24:32,000 i realized that serverless was going to 725 00:24:29,760 --> 00:24:33,279 be cheaper for this use case 726 00:24:32,000 --> 00:24:35,039 you can see how different the two 727 00:24:33,279 --> 00:24:36,960 solutions are when you kind of compare 728 00:24:35,039 --> 00:24:38,159 the really basic architectural diagrams 729 00:24:36,960 --> 00:24:41,039 that i've got here 730 00:24:38,159 --> 00:24:44,720 so this this kind of comes to i guess my 731 00:24:41,039 --> 00:24:46,400 learnings and the summary itself um 732 00:24:44,720 --> 00:24:47,919 so you know 733 00:24:46,400 --> 00:24:50,559 essentially like just a recap for 734 00:24:47,919 --> 00:24:52,240 everyone it was a weekend hobby project 735 00:24:50,559 --> 00:24:54,720 um i could have massively over 736 00:24:52,240 --> 00:24:56,559 complicated you just as you just saw 737 00:24:54,720 --> 00:24:58,159 projects kind of i guess this is 738 00:24:56,559 --> 00:25:00,159 probably the key learning that i had or 739 00:24:58,159 --> 00:25:02,159 the key thing in summary is projects 740 00:25:00,159 --> 00:25:03,600 take on their own life um as they get 741 00:25:02,159 --> 00:25:05,919 used in real life 742 00:25:03,600 --> 00:25:08,720 and so it kind of made me second think 743 00:25:05,919 --> 00:25:10,240 about trying to lock things in 744 00:25:08,720 --> 00:25:11,840 at the end of the day and kind of 745 00:25:10,240 --> 00:25:13,279 setting out this is exactly what the 746 00:25:11,840 --> 00:25:15,200 app's going to be this is how it's going 747 00:25:13,279 --> 00:25:17,039 to grow up like this is how i'm going to 748 00:25:15,200 --> 00:25:19,279 productionize things 749 00:25:17,039 --> 00:25:21,360 because i think all of that stuff adds 750 00:25:19,279 --> 00:25:23,840 adds weight to me getting started right 751 00:25:21,360 --> 00:25:25,840 like i i have to 752 00:25:23,840 --> 00:25:27,600 i have to think about all these things 753 00:25:25,840 --> 00:25:29,919 and then there's so much complexity and 754 00:25:27,600 --> 00:25:31,760 it's so overwhelming it kind of delays 755 00:25:29,919 --> 00:25:33,840 you getting started but it also can 756 00:25:31,760 --> 00:25:35,440 delay like once you've gotten started 757 00:25:33,840 --> 00:25:38,720 like you being able to deliver something 758 00:25:35,440 --> 00:25:39,919 very quick and valuable for end users 759 00:25:38,720 --> 00:25:42,320 that's actually going to get used and 760 00:25:39,919 --> 00:25:44,400 you're going to get feedback from right 761 00:25:42,320 --> 00:25:46,080 now as you can see i kind of use some of 762 00:25:44,400 --> 00:25:48,559 my own photos 763 00:25:46,080 --> 00:25:50,080 in the deck but i've tried to use emojis 764 00:25:48,559 --> 00:25:51,840 for the rest just because i like to 765 00:25:50,080 --> 00:25:53,200 fully own everything that i've i've 766 00:25:51,840 --> 00:25:55,039 built here 767 00:25:53,200 --> 00:25:56,640 so you can see it's a recycle pattern 768 00:25:55,039 --> 00:25:58,080 but my additional learnings and it's 769 00:25:56,640 --> 00:26:00,559 really supposed to be like an 770 00:25:58,080 --> 00:26:02,720 evolutionary loop right so it's it's 771 00:26:00,559 --> 00:26:04,400 like things things have a life cycle um 772 00:26:02,720 --> 00:26:06,080 you have a development life cycle you 773 00:26:04,400 --> 00:26:08,240 have a feature 774 00:26:06,080 --> 00:26:09,520 life cycle you have a life cycle as you 775 00:26:08,240 --> 00:26:11,360 work through bugs 776 00:26:09,520 --> 00:26:13,279 and i guess like i've just really 777 00:26:11,360 --> 00:26:15,120 learned to not over engineer or over 778 00:26:13,279 --> 00:26:17,039 architect or over design things at the 779 00:26:15,120 --> 00:26:18,559 start kind of just let them breathe as 780 00:26:17,039 --> 00:26:20,480 i've said beforehand 781 00:26:18,559 --> 00:26:23,120 um you know the app is ever changing and 782 00:26:20,480 --> 00:26:25,279 growing it's never finished it's okay 783 00:26:23,120 --> 00:26:27,520 you know design or architect for what's 784 00:26:25,279 --> 00:26:29,919 exactly needed at the time and what 785 00:26:27,520 --> 00:26:31,520 people are asking for don't don't try 786 00:26:29,919 --> 00:26:34,159 and over engineer everything from the 787 00:26:31,520 --> 00:26:35,919 start again so kind of the same point 788 00:26:34,159 --> 00:26:38,000 and the other thing is like refactoring 789 00:26:35,919 --> 00:26:40,000 is like good right like it's it's really 790 00:26:38,000 --> 00:26:43,039 nice to rework over the code that i've 791 00:26:40,000 --> 00:26:45,039 got and see it grow and um and see that 792 00:26:43,039 --> 00:26:46,880 growth um at the different application 793 00:26:45,039 --> 00:26:47,840 stages you know like i can go back and i 794 00:26:46,880 --> 00:26:49,679 can 795 00:26:47,840 --> 00:26:51,360 see the original code that i had versus 796 00:26:49,679 --> 00:26:52,960 where it ended up and it's kind of 797 00:26:51,360 --> 00:26:55,360 really satisfying to see that growth 798 00:26:52,960 --> 00:26:56,960 over time too so it's just a nice little 799 00:26:55,360 --> 00:26:58,240 thing that i found 800 00:26:56,960 --> 00:26:59,919 so this is it 801 00:26:58,240 --> 00:27:01,600 i just wanted to kind of take you 802 00:26:59,919 --> 00:27:03,360 through one of the journeys that i'd had 803 00:27:01,600 --> 00:27:05,120 and shared some of the learnings that i 804 00:27:03,360 --> 00:27:08,400 discovered within that journey i hope 805 00:27:05,120 --> 00:27:10,080 this was valuable uh to uh to people um 806 00:27:08,400 --> 00:27:12,640 hopefully it kind of gets you second 807 00:27:10,080 --> 00:27:14,320 thinking um you know about making things 808 00:27:12,640 --> 00:27:16,559 too complex to get started with just 809 00:27:14,320 --> 00:27:20,960 design for exactly what you need 810 00:27:16,559 --> 00:27:24,000 i think it's really um it's really uh it 811 00:27:20,960 --> 00:27:25,600 kind of it really helps me 812 00:27:24,000 --> 00:27:28,399 kind of just get through that initial 813 00:27:25,600 --> 00:27:30,320 hump of like this is so such a complex 814 00:27:28,399 --> 00:27:32,399 beast it's going to take me forever and 815 00:27:30,320 --> 00:27:34,399 actually get me hands on the tools and 816 00:27:32,399 --> 00:27:36,000 started to build so that's kind of 817 00:27:34,399 --> 00:27:38,320 that's kind of my main learning so 818 00:27:36,000 --> 00:27:39,919 thanks everyone for for watching i can 819 00:27:38,320 --> 00:27:42,080 hover around for questions but i might 820 00:27:39,919 --> 00:27:43,679 pass back to you justin 821 00:27:42,080 --> 00:27:45,600 well we we have a few questions that 822 00:27:43,679 --> 00:27:47,360 have popped up through the chat so um we 823 00:27:45,600 --> 00:27:49,279 and we have a bit of time now so uh 824 00:27:47,360 --> 00:27:51,039 let's let's ask and answer a few of them 825 00:27:49,279 --> 00:27:54,159 if if that's okay with you 826 00:27:51,039 --> 00:27:56,080 yeah let's go for it awesome um so i'm 827 00:27:54,159 --> 00:27:58,320 gonna cherry pick one in particular 828 00:27:56,080 --> 00:28:02,320 which came in later but how many hours 829 00:27:58,320 --> 00:28:04,480 went into this alleged side project 830 00:28:02,320 --> 00:28:06,399 yeah so i mean it was over a weekend to 831 00:28:04,480 --> 00:28:09,679 start right so we're talking about six 832 00:28:06,399 --> 00:28:13,919 or seven hours uh to do the base level 833 00:28:09,679 --> 00:28:17,840 and then i think it's turned into 834 00:28:13,919 --> 00:28:17,840 200 hours maybe more 835 00:28:18,000 --> 00:28:22,000 so it's a part-time job now 836 00:28:19,919 --> 00:28:23,600 yeah basically yeah it's a side it's a 837 00:28:22,000 --> 00:28:26,080 it's an after hours project that just 838 00:28:23,600 --> 00:28:26,880 like gets uh iterated on uh now and then 839 00:28:26,080 --> 00:28:27,679 yep 840 00:28:26,880 --> 00:28:30,320 right 841 00:28:27,679 --> 00:28:32,480 uh another question um is did you make 842 00:28:30,320 --> 00:28:34,000 the the architecture diagrams as you 843 00:28:32,480 --> 00:28:37,200 were going or is this something that 844 00:28:34,000 --> 00:28:39,039 you've done in developing the talk 845 00:28:37,200 --> 00:28:42,159 yeah so i did the architecture diagrams 846 00:28:39,039 --> 00:28:43,520 in the talk um so i built them just via 847 00:28:42,159 --> 00:28:45,679 powerpoint 848 00:28:43,520 --> 00:28:46,960 the reason kind of why i do that is 849 00:28:45,679 --> 00:28:48,799 because they're actually usually just 850 00:28:46,960 --> 00:28:51,600 sketches in my notebook right and they 851 00:28:48,799 --> 00:28:53,200 i'm not very good at sketching so 852 00:28:51,600 --> 00:28:55,279 um i needed to clean up a lot of the 853 00:28:53,200 --> 00:28:57,840 stuff and the other thing is i'm not too 854 00:28:55,279 --> 00:28:59,600 worried about like having a diagram as i 855 00:28:57,840 --> 00:29:00,799 produce things right i just want to get 856 00:28:59,600 --> 00:29:02,799 in there and build so i need to 857 00:29:00,799 --> 00:29:05,279 understand what the use cases 858 00:29:02,799 --> 00:29:07,279 document the use case in my notes 859 00:29:05,279 --> 00:29:09,200 um and then kind of like think about and 860 00:29:07,279 --> 00:29:10,399 explore solutions for that use case and 861 00:29:09,200 --> 00:29:12,720 and that's kind of what i've walked 862 00:29:10,399 --> 00:29:14,720 through today so i actually never really 863 00:29:12,720 --> 00:29:16,000 produce architecture diagrams until i 864 00:29:14,720 --> 00:29:17,279 need to 865 00:29:16,000 --> 00:29:18,480 walk someone else through something 866 00:29:17,279 --> 00:29:20,799 right 867 00:29:18,480 --> 00:29:22,640 right so did you like sketch them on on 868 00:29:20,799 --> 00:29:24,480 a pad as you were working it out or is 869 00:29:22,640 --> 00:29:26,480 it really the architecture just kind of 870 00:29:24,480 --> 00:29:29,039 emerged as you were building it and then 871 00:29:26,480 --> 00:29:31,520 you've made it pretty now yeah it's it's 872 00:29:29,039 --> 00:29:33,360 it's bits and pieces right so um you 873 00:29:31,520 --> 00:29:35,039 know like i just put it in my notebook 874 00:29:33,360 --> 00:29:36,399 and if i need to sketch something out 875 00:29:35,039 --> 00:29:38,159 and document it then i can look at it 876 00:29:36,399 --> 00:29:41,120 later and go yeah what am i going to do 877 00:29:38,159 --> 00:29:44,320 about this database okay 878 00:29:41,120 --> 00:29:46,240 um i'll try to order these with that um 879 00:29:44,320 --> 00:29:48,320 is there any reason why you didn't 880 00:29:46,240 --> 00:29:50,480 consider django once you realized you 881 00:29:48,320 --> 00:29:52,640 needed an admin portal and forms and all 882 00:29:50,480 --> 00:29:54,960 that sort of stuff 883 00:29:52,640 --> 00:29:57,120 yeah good point i had thought about 884 00:29:54,960 --> 00:29:58,960 django um 885 00:29:57,120 --> 00:30:00,880 i just like the freedom of working in 886 00:29:58,960 --> 00:30:01,919 flask i think it's just a personal 887 00:30:00,880 --> 00:30:04,559 preference 888 00:30:01,919 --> 00:30:06,559 um i i like to know what's happening 889 00:30:04,559 --> 00:30:09,600 behind the scenes um 890 00:30:06,559 --> 00:30:12,159 django is an awesome framework uh and i 891 00:30:09,600 --> 00:30:14,720 kind of i guess i didn't expect it to 892 00:30:12,159 --> 00:30:16,559 grow the way that it did right uh 893 00:30:14,720 --> 00:30:19,360 i didn't really expect i'd ever need an 894 00:30:16,559 --> 00:30:20,559 admin portal like to be honest and so i 895 00:30:19,360 --> 00:30:22,559 i could have redesigned things for 896 00:30:20,559 --> 00:30:23,919 django but i thought i'll start simply 897 00:30:22,559 --> 00:30:27,200 just by building something with fast 898 00:30:23,919 --> 00:30:29,520 because i can do that in the weekends 899 00:30:27,200 --> 00:30:32,080 right um and last question uh because 900 00:30:29,520 --> 00:30:33,840 we're running up against time um uh last 901 00:30:32,080 --> 00:30:35,279 question for here but there'll be more 902 00:30:33,840 --> 00:30:36,960 in the in the chat if people want to do 903 00:30:35,279 --> 00:30:38,880 that so do hang out there and and 904 00:30:36,960 --> 00:30:40,640 everyone else do ask more questions in 905 00:30:38,880 --> 00:30:43,279 the chat or in the hallway track 906 00:30:40,640 --> 00:30:46,320 um what's involved in deploying flask to 907 00:30:43,279 --> 00:30:50,399 a server environment 908 00:30:46,320 --> 00:30:51,279 ah yeah um so there's complexity in that 909 00:30:50,399 --> 00:30:53,279 uh 910 00:30:51,279 --> 00:30:54,880 to to kind of be exact i was using 911 00:30:53,279 --> 00:30:57,279 elastic bean stalk 912 00:30:54,880 --> 00:30:58,720 um i could have used like a product like 913 00:30:57,279 --> 00:31:00,080 light sale or something like that if i 914 00:30:58,720 --> 00:31:03,519 wanted to as well 915 00:31:00,080 --> 00:31:05,039 um so basically like the the advantage 916 00:31:03,519 --> 00:31:06,799 to using a solution like that is i can 917 00:31:05,039 --> 00:31:09,279 go this is my code repository that i've 918 00:31:06,799 --> 00:31:10,799 loaded in from github uh these are the 919 00:31:09,279 --> 00:31:13,760 scripts that i need to run on the server 920 00:31:10,799 --> 00:31:16,080 to do the deploy i'm using uh you know 921 00:31:13,760 --> 00:31:17,760 uh gunnacorn or g unicorn someone's 922 00:31:16,080 --> 00:31:21,600 gonna pull me up on that 923 00:31:17,760 --> 00:31:24,159 to do the deployment um so i i kind of 924 00:31:21,600 --> 00:31:27,440 i kind of go like github to one of these 925 00:31:24,159 --> 00:31:28,480 really easy to use frameworks 926 00:31:27,440 --> 00:31:31,360 right 927 00:31:28,480 --> 00:31:33,600 well with that um we're up against time 928 00:31:31,360 --> 00:31:35,120 so i will i will leave it there but i'm 929 00:31:33,600 --> 00:31:36,640 sure people will have other things that 930 00:31:35,120 --> 00:31:38,559 they they want to ask you about so do 931 00:31:36,640 --> 00:31:41,679 come and hang out in the chat uh for 932 00:31:38,559 --> 00:31:45,840 everyone else um we have a break now uh 933 00:31:41,679 --> 00:31:48,000 until let me check my notes until 4 934 00:31:45,840 --> 00:31:50,320 if i've got the check on that correctly 935 00:31:48,000 --> 00:31:52,720 yes that's right so until 4 15 pm so 936 00:31:50,320 --> 00:31:55,120 you've got about a 45 minute break uh 937 00:31:52,720 --> 00:31:56,880 good time to stretch your legs get away 938 00:31:55,120 --> 00:31:58,159 from the screen a bit drink some water 939 00:31:56,880 --> 00:31:59,440 you know practice a bit of that 940 00:31:58,159 --> 00:32:02,000 self-care 941 00:31:59,440 --> 00:32:04,720 and we'll see you back here uh same 942 00:32:02,000 --> 00:32:08,880 place same that time same bat channel at 943 00:32:04,720 --> 00:32:11,120 4 15 p.m for a talk by uh whoops hang on 944 00:32:08,880 --> 00:32:12,080 i pressed the wrong key molly 945 00:32:11,120 --> 00:32:14,240 rowe 946 00:32:12,080 --> 00:32:15,679 molly rowe called metrics for good and 947 00:32:14,240 --> 00:32:18,000 not for evil 948 00:32:15,679 --> 00:32:20,080 which i am particularly interested in i 949 00:32:18,000 --> 00:32:21,840 love love me some metrics and uh you 950 00:32:20,080 --> 00:32:23,600 preferably for good not for evil so 951 00:32:21,840 --> 00:32:25,360 we'll see you back here in about 45 952 00:32:23,600 --> 00:32:27,760 minutes uh otherwise hang out in the 953 00:32:25,360 --> 00:32:32,440 chat and we'll continue talking all 954 00:32:27,760 --> 00:32:32,440 things devops see you soon