Skip to content

Instantly share code, notes, and snippets.

  • System architecture
    • Clear distinction between the frontend at the top half and the backend at the bottom half
    • Keep It Sweet and Simple
      • When working on a big project, it's easy to overengineer solutions. But that only makes our jobs needlessly complicated.
      • For this, we just needed a working proof of concept.
    • Scalability is not necessary
      • The final product is a proof of concept. We just need to support a handful of concurrent users at a time - the developers and testers.
      • There's no need for a load balancer and we only need a single EC2 instance.
    • Use familiar technologies
  • We had to decide between MySQL or MongoDB. We choose MySQL because we are most familar with that.
@MakotoE
MakotoE / winter presentation notes.md
Last active March 10, 2022 21:17
Architectural design and photo gallery implementation notes

Architectural design (2 min)

  • Architecture diagram
  • All services are up and running
  • Google services were added: Google Maps Embed API and Google Identity Services
    • Embeded Google Map on vendor page
    • Sign-in with Google feature

Photo gallery implementation (4 min)

Creating a review and photo

I'm will be demonstrating in code, some of the things you can do with slices and maps in Go.

To run this program, I will use the command go run, and then dot, which represents the current directory. Running a Go program is that simple. What if I want to compile it? go build dot.

And what I like about this, compare to other compiled languages like C and Java, is that it's much easier to compile. No need to configure your includes, or your dynamic libraries. It almost feels like an interpreted language like Python.

In the code, this is the main function where I first call sliceExample1. In the first example, I allocate a slice of length 3. It prints it using the print line function. As you can see, the numbers1 slice has three items, all zero-initialized. I can get the length of the slice like this.

You can append an item to a slice by calling append with the slice in the first argument and the item in the second argument, then reassigning it to the slice. After this, you can see that 1 has been added to th

[Screenshot from demo + "technical details" text]

To explain how it all works, let's go back to that demo. But this time, I will take you behind the scenes and show you step-by-step how it all works.

[3-tier diagram]

We structured our service based on the three-tier architecture. You might remember the layers being called the presentation and business logic layers; here I refer to them as the frontend and backend. Inside those layers, we further subdivide them at the source code level.

Let's start from the top. [Arrow pointing to view] The user goes to a vendor page, [URL bar] at the URL "vendors slash vendorID". [Vendor page] The React framework renders all the components on the vendor page and initiates an action.

1001111000
0111000110
1001100100
1000111000
1101111000
1011011110
0000110000
1011111000
0101101010
1101011000
10101
11010
01101
10101
10111
10011
01110
10001
10001
11011

Answers at the bottom

  1. By having the cache act as a bridge between main memory and the CPU, the time it takes to retrieve a block of data from main memory is longer than it would be if the cache did not exist.
  • True
  • False
  1. Typically, a split cache divides both the L1 and L2 caches into an instruction-only cache and a data-only cache.
  • True
  • False