Serving the Client

Take a moment and think about your favorite applications. The ones you use everyday for games, music, communication, task management, and everything else under the sun. Now think about where you access these applications from. Whether it be your laptop, iPhone, or android tablet, all your data is in sync. You can pick up on one device exactly where you left off on the other. It begs the question: How does this all work?

The main relationship to explain this is between the server and the client. The server exists as a gatekeeper to one very important asset, the data. It’s the only one who is allowed to read or modify the data. It will, however, give or modify its data to those who ask for it, but only if you speak its language. The language it speaks is called its API. On the other side of the relationship is the client, which speaks to the server though the API in the form of requests. These clients exist as remote workers and can be pretty much any device you can think of: iPhone, iPad, Nexus, Laptop, etc. Their job is to ask or give the server data. Let’s look at an example of this.

You’ve heard about the latest and greatest social network, TivixBook, and want to sign up. You download the iPhone app (the client) from your iPhone, enter your email/username/password on the signup screen, and hit enter. TivixBook app will take the data you’ve entered and send it to the server with a special request to store it. The server understands what the client wants, thus it takes the data received and saves it. After using TivixBook for awhile, your eyes hurt from staring at such a small screen, so you want to use your iPad. You break out your iPad, download the iPad app, and enter your details on the login screen. The iPad app (the client) will send the data to the server, but this time, the special request is to validate the data. The server receives the data, does a check to validate with its own data (the initial sign up data it stored), and communicates back to your iPad that all is good. You’ve now just accessed your data from two clients being served by the same server. 

We really just touched the surface of how this all works, but hopefully this helped shed some light on how all of your devices communicate.