4.3 out of 5
4.3
13 reviews on Udemy

Build Linux Remote Procedure Calls (RPC) – from scratch in C

Linux System Programming - Server Client RPC Model over a Network Sockets, Data Serialization - No Third party Libraries
Instructor:
Abhishek Sagar
221 students enrolled
English [Auto-generated]
Shall be able to build Remote procedure Calls starting from #include
Will understand the concept of Data Serialization and DeSerialization
Understand the concept of Application state Synchronization
Understand the concept of Application State Checkpointing
Will understand how to manipulate data objects as stream of bytes
Will be able to understand how to manipulate the objects Recursively
Will be able to extend and apply the concepts learned in other programming languages
Will understand the pre-requistes required for data transmission between heterogeneous machines

About This course is about Developing your own Remote procedure calls. The essence and real strength of this course is No use of any third party libraries. I follow this principle in all my other courses. Whatever you learn through my courses, you learn from absolute ground level. This course does not violate the principle and teaches you how to build Remote Procedure Calls step by step from absolute scratch – No framework, tools, supporting libraries or anything – just pure C.

This course actually lays the foundation of many future System Software Projects. Few of which are below and is a part of this course curriculum.

Remote Procedure Calls (RPC) is a technique to invoke the function/procedure which actually resides on different physical machine running somewhere else in the network – hence the name remote procedures. In this course, you will learn the concepts working behind the scenes. The same concepts can be extended to implement other system programming concepts, besides RPC, such as – Data Synchronization and Check-pointing the application state.  This course promise to deliver the complete content on developing RPCs in its initial release.

Data Synchronization – It is a process to synchronize the complete application Heap state to remote machine. The remote machine will build the mirror heap state. In the event, the first machine fails, the remote machine can take over as it has all the state required to resume the operation of failed machine.

Check pointing – It is a process of saving the application Memory state to disk/file persistently, so that, the application can be restarted/resumed any time building the exact same Memory state from Memory snapshot stored earlier to secondary storage.

Check pointing shall be delivered in subsequent releases of this course.

Who should do this course ?

Beginners Please take this course at your discretion. You should be good with C pointers and how C objects are laid out in memory. I expect you to be at-least above beginner level in C programming. This means, that only very enthusiastic students who wants to get an edge over the smartest student in their college should enroll. Average students Pls excuse. Job seekers and professional developers Must enroll. The concepts you learn from this course is language agnostic and having learned them will enable you to implement the RPC/Data-Synch/Checkpointing in any programming language of your choice. If tomorrow you happen to work in Java, you shall be knowing how RPCs work at the lowest level of implementation.

Pre-requisite

C and being good at pointers is a pre-requiste of this course. A minimal socket programming back-ground is desirable but not mandatory. We designed this course starting from absolute basics and building the foundation of learners first before actually pulling the course at full throttle. If you are not good with pointers and memory manipulation in C, Pls enroll only after meeting the pre-requisite criteria.

Also, Please just do not sit and watch my codes. Write your own codes, even if it is same as mine !

Programming Language used In this course :

We have a strong reasons to choose C as a language for this course:

RPC is a technique which if knowing the concepts can be implemented in any programming language of your choice. Learning RPC using C helps you understand what is going on behind the scenes. C language really exposes the low level details about how system actually works. In System programming, C is the only language to be used and there is not even a remote substitute of this language when it comes to System programming.

No Third Party libraries

Whatever logic you implement, you need to implement it from scratch, beginning from #include <stdio.h>. This course do not suggest taking help of any third party library to get the jobs done. Use of external libraries completely defeats the purpose of the course. However, it is recommended to use third party libraries for commonly used data structures such as linked lists/Trees/Queues etc which saves a lot of time implementing these data structures.

Related Courses

RPC is one way of carrying out Inter Process Communication between two processes running on separate machines in the network. You may also want to check my another course in which Linux IPC techniques has been discussed.

Warning : This course has auto system-generated subtitles which may not be perfect. Please disable subtitles as per your convenience.

Curriculum

This Course is divided into two major parts –

1. Understanding the Concept of Serialization and DeSerialization in great detail

2. Using the Serialization and DeSerialization to actually solve/build system. This includes :

  1. Building Remote Procedure Calls

  2. State Synchronization

  3. Check pointing the application state

Section 2, 3, 4, 5, 6 are dedicated to build up the base on thoroughly mastering the concept of Serialization and DeSerialization.

Section 7, 8, 9 are dedicated to build and develop above stated systems

  • Section 1 – Get Started

    • Table Of Contents of the Entire Course

    • Linux Installation for Beginners

  • Section 2 – What is Serialization and Why we need it ?

  • Section 3 – Concept of Data Serialization and DeSerialization

    • Serializing and DeSerializing Simple C Structures

    • Serializing and DeSerializing Nested C Structures

    • Serializing and DeSerializing Pointer C Structures

  • Section 4 – STREAMS – A Data Structure

    • Design and Implementation

  • Section 5 – Data Serialization and DeSerialization Implementation in C

    • Serializing and DeSerializing Simple C Structures

    • Serializing and DeSerializing Nested C Structures

    • Serializing and DeSerializing Pointer C Structures

    • An Example

  • Section 6 – Serializing Generic Data structures

    • Use Function Pointers to Serialize void *

  • Section 7 – Implementing Remote procedure calls from Scratch

    • Understanding RPC Concept and Design

    • Developing Client Stubs – Marshalling of RPC Arguments

    • Developing Server Stubs – UnMarshalling of RPC Arguments

    • Developing Server Stubs – Marshalling of RPC Return Type

    • Developing Client Stubs – UnMarshalling of RPC Return Type

    • Concept of RPC Identity

    • RPC Use Cases

  • Section 8 – State Synchronization

  • Section 9 – Checkpointing (Coming Soon)

**Audit Trial **

30 Sept 2018 – Added Section 8 on State Synchronization

29 Sept 2018 – Added Section 6 on Serializing Generic Data structures

Get Started

1
Table of Contents
2
Setting up Linux Develop Environment

This Lecture is for those who are absolute beginners with Linux and have no prior knowledge with Linux Installation. This course do not demands user to use Linux OS. All Assignments can be done on Windows platform also, however, it is recommended to use Linux for Development work. Please switch if you are still stuck with windows.

Pls go through this tutorial which will tour you through the Linux installation steps and supporting softwares. Those who are already using Linux can safely skip this Section. Pls excuse, sound quality of this youtube VDO isnt that great.

Introduction

1
Agenda
2
Introduction
3
Why We need Serialization ?
4
Problems Without DeSerialization
5
Application of Serialization
6
Summary

Concept of Data Serialization and DeSerialization

1
Serialization Basics

Let us Learn the Basics of Serialization and DeSerialization in this Section. After this Section you will understand What is meant by Data (De)Serialization

2
Serializing Simple Structures
3
Serializing Nested Structures
4
Serializing Pointer Structures
5
DeSerializing Simple Structures
6
DeSerializing Nested Structures
7
DeSerializing Pointer Structures
8
DeSerialization Example
9
A Big Picture
10
Complete Sequence of Steps - FlowChart
11
Serialization API Prototypes
12
Summary

Data Structure - STREAMS

1
Streams Part 1
2
Streams Part 2
3
Streams Part 3

Serialization and DeSerialization Implementation in C

1
What are our Goals ?
2
C Quick Revision
3
Serializing Simple Structures
4
Serializing Nested Structures
5
Serializing Pointer Structures
6
DeSerializing Simple Structures
7
DeSerialization Conventions
8
DeSerializing Nested Structures
9
DeSerializing Pointer Structures
10
Serializing a Linked List
11
PitFall of a Serialization-DeSerialization
12
Limitations Of (De)Serialization
13
Demo - Code Walk
14
Code Walk C Structures - Part1
15
Code Walk C Structures - Part2
16
Code Walk C Structures - Part3
17
Code Walk C Structures - Part4
18
Exercises

Serializing The Generic Data Structures

1
Serializing a Generic Linked List - part1
2
Serializing a Generic Linked List - part2

Implementation of Remote Procedure Calls Infrastructure

1
Agenda
2
Understanding RPCs
3
9 Steps Of RPC
4
RPC Steps - 1 to 3
5
RPC Steps - 1 to 3 - Code Walk
6
RPC Steps - 4 to 6
7
RPC Steps - 4 to 6 - Code Walk
8
RPC Steps - 7 to 8
9
RPC Steps - 7 to 8 - Code Walk
10
RPC Steps - 9 - Final Step
11
RPC Steps - 9 - Final Step - Code Walk
12
RPC Demo
13
RPC - Four Special Routines
14
RPC Identity
15
Attaching RPC Header On RPC Client
16
Decoding RPC Header On RPC Server
17
RPC Use Cases and What Next in the Course
18
RPC Coding Assignment

Follow the example, multiply.c to complete this assignment. Shoot any Questions in QnA section, I will help you out.

hint : Write down serialie/Deserialize routines for all the structures involved in the question - Linked List, Linked List node, person_t.

For a Given RPC, write down 4 RPC routines.

Implement the same 9 steps we discussed. Remember to free any memory that you malloc after use.

Application State Synchronization

1
Application State Synchronization - Introduction
2
Application State Synchronization - Implementation
3
State Synchronization - Demonstration
4
Bonus Lecture - Time to get some Candies !!
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.3
4.3 out of 5
13 Ratings

Detailed Rating

Stars 5
8
Stars 4
3
Stars 3
1
Stars 2
1
Stars 1
0
b251002a1f0193ace461de480c8e3eae
30-Day Money-Back Guarantee

Includes

6 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion