Network Socket Programming using TCP in C

1.0 Client-server model

Client - Server System

Client server model is a software architecture paradigm prevalent in distributed applications. A server has information resources and processes that provide answers to queries and other services to remote clients over the network. Some of the examples of these services are booking an airline ticket and/or a room in a hotel, sending a file to a client, sending a mail message to another person (client), etc.… Read more

Analyzing the NGINX web server log file

1.0 Introduction

Given an nginx web server log file, we might like to know who are the visitors to our website. One can go line by line through the log file, but that is tedious. It would be nice if we can get one line per client visiting the website, giving the IP address of the visitor and how many times that client has visited.… Read more

Syslog

1.0 Syslog

Syslog is a protocol for conveying event notification messages.

Syslog was first developed by Eric Allman for logging as a part of the Sendmail project in the 1980s. It soon became a de-facto standard for logging on Unix-like systems.… Read more

Interprocess communication using System V message queues in Linux

1.0 Message queues

Message queues are one of the interprocess communication mechanisms available under Linux. Message queues, shared memory and semaphores are normally listed as the three interprocess communication mechanisms under Linux. Semaphores, though, are really for process synchronization. In practice, shared memory, aided by semaphores, makes an interprocess communication mechanism.… Read more

Interprocess communication using FIFOs in Linux

Interprocess communication using fifo

1.0 FIFO

FIFOs are pipes with a name and are also commonly referred to as named pipes. Pipes are common on Linux command lines but do not have a system-wide name. So, any two processes that wish to communicate using a pipe need to be related, either parent and child or, sharing a common parent, who sets up the pipe and passes its file descriptors to individual processes.… Read more

Using Git

1.0 Introduction

Git commands for common source code management use cases are listed.

2.0 Install Git

On a Ubuntu Linux system, Git can be installed with the command,

$ sudo apt-get install git

3.0 Set Identity

Before using Git, the user's identity (name, email) has to be set

$ git config --global user.email "user1@example.com"
$ git config --global user.name "Joe Bloggs"

4.0 Initialize git repository

The first job for putting a project under source code management is to create a repository.… Read more

Getting WordPress to work with Varnish 4.0

With Varnish 4.0, the VCL has changed. So an update from Varnish 3 .0 to Varnish 4.0 requires a change in the VCL file, /etc/varnish/default.vcl. As a part of Varnish cache server configuration for a WordPress based site, using nginx web server, the following VCL is required in /etc/varnish/default.vcl for dropping cookies sent to WordPress and also for dropping any cookies that WordPress tries to send back to the client.… Read more