System design and assumptions

There are basically two parts of the email system:

  • Email sender
  • Email tracker

I am going to show you, in a small block of code, how to send an email using Node.js with the tracking code inside the email. However, it won't be production grade (this is our assumption).

The email tracker, however, will be a production-grade design; this tracker will receive the event from the email and update the database accordingly. We will discuss which database API to use and everything else in the upcoming section.

Now, for the sake of design, here is a diagram:

As you can see in the preceding diagram, the email sender will pick up the record from some source which will contain an email list and send out emails to lots of people.

When people open, click on, and read those emails, the email tracker will track those events and record them in the database.

Now, system design is not just the diagram design; it has lot of things within it, such as capacity estimation, database diagrams, and so on.

We are not going to estimate email capacity, as we did in the last chapter, because I want to keep this chapter short and concise.

So, let's look over the assumptions:

  • The email sender code will contain static email addresses
  • The mail sender code will have no data source connection
  • The email sender will send a simple email with a tracking code
  • The email tracker will receive events
  • The email tracker will try to fetch as much information as it can from that event
  • The email tracker will add those events to the database

Ok, I hope the assumptions are clear. Let's go ahead and choose the database API.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.101.72