BullJS

May 30th, 2020
node

Taking Advantage of the Weekend

It's only 2 o'clock, and I've already put in a full day. I started out early with some breakfast at home. My fiancé actually got up before me and made a breakfast scramble with some muffins; that got me started off right. From there, I decided I wanted to get the little girl over to the pool before it got too busy. On the weekends, the pool is usually packed, but if you get there before 10, there's like barely anyone there. I discovered this last weekend, and we were able to get over to the pool on Saturday and Sunday last week, even on Memorial Day weekend. I typically wouldn't mind if it was crowded, but given the current day and age of Coronavirus, we try to avoid crowds at all costs. Our daughter typically goes to daycare about 3 times a week, but since this all started, she's been stuck at home. We have made it a point to take her for a walk every evening, but I think this time at the pool is really good for her. She loves the pool, but at first she was a little hesitant. When I took her last week, she was excited, but nervous. This week, she was only excited and skipped the nerves altogether. We had a great time splashing around, but I do feel bad for the few other patrons at the pool. She's in a phase right now where she likes to yell at the top of her lungs. We remind her every to not yell, but she's not in a listening mood lately.

node

After we got out of the pool, I realized we were almost completely out of milk. If we didn't have our daughter, we could go a week or two without milk. We really only use it for coffee and cooking, but the little girl drinks it by the gallon. I must look like a hoarder when I go to the grocery store and buy 4 gallons, but that might only last a week and a half, two weeks tops. She only drinks it now before naps and bedtime, but she needs it for growth, so it's not an option to run out. We try to limit our exposure to the grocery store, so we don't go more than once a week. I spent a couple hundred today, which is light in comparison to what we have been spending. We are all stocked up on canned goods, snacks, fruits, veggies, and now finally meat. Meat has been pretty sparse lately at the stores, so we haven't always been able to find what we need. I was able to grab quite a bit today, though. I grabbed a 5 pound bag of chicken and a bunch of beef stew meat, which works really well in the instant pot for something quick. I almost exclusively cook with the instant pot, since I'm not a very talented cook. I find with the instant pot, I can create some dishes that are typically way out of my league. I would say we are pretty stocked up now, but my guess is we will still have to make another trip next weekend.

node

After getting back from the store, the little girl had already gone down for her nap, so I got to work on my microservices course. I now only have 7 hours left, and can smell the finish line. We pretty much finished up the orders service yesterday, which means we now have an orders service, tickets service, auth service, a frontend client, and we're down to just a couple more for the StubHub clone. We started working on the expiration service today, where if someone starts to purchase a ticket, they have 15 minutes to do so, and then it expires and is opened back up to everyone else. That means that, if someone has interest in buying a ticket, nobody else would be able to buy it at the same time. After 15 minutes, their order would expire and they would have to start all over. Also, someone else could try to purchase the ticket and lock them out of being able to do so. This is a pretty pivotal part of an application like this; if you don't have something like this in place, you could have multiple orders for the same ticket, and possibly double-sell something. Some event buses have an expiration system built right into the event bus, but NATS does not. If we were using a different event bus, this service wouldn't even be necessary, but it's turned out to be one of the easiest to implement. Most of the listeners and publishers are very similar from one service to the next, and it almost seems like you're going through a lot of boilerplate to get it set up. However, overall, this course has been one of the most difficult courses I've ever taken, and I think it might be a little over my head.

Until tomorrow!

Created by Sam Thoyre, © 2019