In this newsletter, we will talk about the following:
What is SSO (Single Sign-On)?
What is the future of online payments?
Top 38 most commonly used programming languages
What is IaaS/PaaS/SaaS?
What is SSO (Single Sign-On)?
A friend recently went through the irksome experience of being signed out from a number of websites they use daily. This event will be familiar to millions of web users, and it is a tedious process to fix. It can involve trying to remember multiple long-forgotten passwords, or typing in the names of pets from childhood to answer security questions. SSO removes this inconvenience and makes life online better. But how does it work?
Basically, Single Sign-On (SSO) is an authentication scheme. It allows a user to log in to different systems using a single ID.
The diagram below illustrates how SSO works.
Step 1: A user visits Gmail, or any email service. Gmail finds the user is not logged in and so redirects them to the SSO authentication server, which also finds the user is not logged in. As a result, the user is redirected to the SSO login page, where they enter their login credentials.
Steps 2-3: The SSO authentication server validates the credentials, creates the global session for the user, and creates a token.
Steps 4-7: Gmail validates the token in the SSO authentication server. The authentication server registers the Gmail system, and returns “valid.” Gmail returns the protected resource to the user.
Step 8: From Gmail, the user navigates to another Google-owned website, for example, YouTube.
Steps 9-10: YouTube finds the user is not logged in, and then requests authentication. The SSO authentication server finds the user is already logged in and returns the token.
Step 11-14: YouTube validates the token in the SSO authentication server. The authentication server registers the YouTube system, and returns “valid.” YouTube returns the protected resource to the user.
The process is complete and the user gets back access to their account.
Over to you:
Question 1: have you implemented SSO in your projects? What is the most difficult part?
Question 2: what’s your favorite sign-in method and why?
What is the future of online payments?
What is the future of online payments? I don’t know the answer, but I do know one of the candidates is the blockchain.
As a fan of technology, I always seek new solutions to old challenges. A book that explains a lot about an emerging payment system is ‘Mastering Bitcoin’ by Andreas M. Antonopoulos. I want to share my discovery of this book with you because it explains very clearly bitcoin and its underlying blockchain. This book makes me rethink how to renovate payment systems.
Here are the takeaways:
1. The bitcoin wallet balance is calculated on the fly, while the traditional wallet balance is stored in the database. You can check chapter 12 of System Design Interview Volume 2, on how to implement a traditional wallet (https://amzn.to/34G2vmC).
2. The golden source of truth for bitcoin is the blockchain, which is also the journal. It’s the same if we use Event Sourcing architecture to build a traditional wallet, although there are other options.
3. There is a small virtual machine for bitcoin - and also Ethereum. The virtual machine defines a set of bytecodes to do basic tasks such as validation.
Over to you: if Elon Musk set up a base on planet Mars, what payment solution will you recommend?
Top 38 most commonly used programming languages
Programming languages come and go. Some stand the test of time. Some already are shooting stars and some are rising rapidly on the horizon.
I draw a diagram by putting the top 38 most commonly used programming languages in one place, sorted by year. Data source: StackOverflow survey.
Over to you: what’s the first programming language you learned? And what are the other languages you learned over the years?
What is IaaS/PaaS/SaaS?
The diagram below illustrates the differences between IaaS (Infrastructure-as-a-Service), PaaS (Platform-as-a-Service), and SaaS (Software-as-a-Service).
For a non-cloud application, we own and manage all the hardware and software. We say the application is on-premises.
With cloud computing, cloud service vendors provide three kinds of models for us to use: IaaS, PaaS, and SaaS.
IaaS provides us access to cloud vendors' infrastructure, like servers, storage, and networking. We pay for the infrastructure service and install and manage supporting software on it for our application.
PaaS goes further. It provides a platform with a variety of middleware, frameworks, and tools to build our application. We only focus on application development and data.
SaaS enables the application to run in the cloud. We pay a monthly or annual fee to use the SaaS product.
Over to you: which IaaS/PaaS/SaaS products have you used? How do you decide which architecture to use?
Our Books:
Our bestselling book “System Design Interview - An Insider’s Guide” is available in both paperback and digital format.
Paperback edition: https://geni.us/XxCd
Digital edition: https://bit.ly/3lg41jK
Isn't the OS also managed by "you" when implementing IaaS? For instance, installing a linux distro on an Azure VM. You are responsible for the maintenance and stability of the OS including patching and upgrading.
What is meant by "return resources" once authentication is completed?