Tuesday, September 27, 2016

Tutorial 2: Express Module – A middleware or something more

Tutorial 2: Express Module – 
A middleware or Something more

Tutorial 1: NodeJS: An Asynchronous World
Tutorial 2: Express: Middleware or more...
Tutorial 3: Understanding Routing in Express
Tutorial 4: Develop a Static File Server
Tutorial 5: Using HTTPS with Express
Tutorial 6: Develop a JSON API server
Tutorial 7: Use Templates and Views with Express
Tutorial 8: Integrating MongoDB
Tutorial 9: Testing Express Applications
Tutorial 10: Securing Express

Express node module is one of the popular application frameworks.  It is a flexible framework and allows you use it in many ways. It wraps around 'http' core module thus making it use easier. Practically developers use other frameworks or develop their own framework that works over express. Broadly speaking, Express module helps in following ways:

1. Provides a better routing mechanism
2. Middleware
3. Helps in dividing your application into sub-applications or different modules.

Installing Express in your project
Before we learn about router and middle-ware concept, let us learn about what's the most practical approach installing Express and managing your project. It is recommended to create a package.json file which lists the local dependencies of your project. Somewhat it is analogous to your C++ or java makefile. To create a default package.json file, type the following command in your bash/command shell.

$ npm init –yes

It creates a default package.json file in the directory somewhat similar to shown below. It lists the dependencies e.g. We installed colors node module of version 1.1.2 In addition, there are other fields like description, keywords, authors related to your project.

Tutorial 2: Express Module – A middleware or something more


To install Express we shall use the following command:

Tuesday, September 13, 2016

Are Traditional Data Leakage Software Money Leakage Software?

Are Traditional Data Leakage Software Money Leakage Software?

Are Traditional Data Leakage Software Money Leakage Software?

For enterprises, Data Leakage has been a major challenge for decades. It is estimated that cyber crimes (data leakage has the major share) cost nearly 450 Billion USD in a year. Over the last few years, the costs to combat data leakage have increased multi folds.

Companies like Digital Guardian (earlier Verdasys), McAfe (now Intel), Symantec, Websense have been providing DLP software for past 20+ years. Fortunately or Unfortunately these software applications have achieved maturity in terms of their products life cycles but are still failing miserably at many fronts.

In short, these traditional DLP softwares install system driver like application (called monitoring agent) which hooks Operating System File management, Network modules and starts monitoring various activities. These agents are controlled by a central policy server which allows/disallows various activities. e.g. A user can open a Sales Document or not. Or Whether he is allowed to copy that file to USB drive or not. So far so good...

Sunday, September 11, 2016

Measuring Chaos in Social Cyber World

Measuring Chaos in Social Cyber World

Measuring Chaos in Social Cyber World
image credits: pixabay.com

Rapid and diverse technology changes and implementations transforming cyber worlds continuously. The real challenge is lying how to model this chaotic cyber world which is a complex adaptive system. When we say it is a system (though complex), there must be patterns identifiable especially in a socially connected world. There have been efforts to identify the patterns and apply to various domains like business or political.

In the cyber world, social services are very well interconnected and fairly automated. Online e-commerce, social media providers, and political parties have been exploiting these services strategically to fulfil their objectives.

For example:

Tuesday, May 10, 2016

Tutorials: NodeJS and Express (Tutorial 1)

Tutorials: NodeJS and Express

While learning about Express  and how to use, here is my small effort to document my learning in tutorial form. Express  has become an integral part in web applications developed in NodeJS.


Tutorial 1: NodeJS: An Asynchronous World
Tutorial 2: Express: Middleware or more...
Tutorial 3: Understanding Routing in Express
Tutorial 4: Develop a Static File Server
Tutorial 5: Using HTTPS with Express
Tutorial 6: Develop a JSON API server
Tutorial 7: Use Templates and Views with Express
Tutorial 8: Integrating MongoDB
Tutorial 9: Testing Express Applications
Tutorial 10: Securing Express

Tutorial 1: NodeJS: An Asynchronous World

For so many years, Javascript has been a defacto standard to do front end scripting in browsers. In 2009, another incarnation of JS (V8 JS engine from Chrome) as node.js came out which made it server side scripting language also. NodeJS came up with a bouqet of many features like:
  • Its execution is fast (V8 JS engine being compined in C++)
  • Promotes asynchronous coding style
  • Same coding paradigm for front and back end.
Its event-driven, non-blocking I/O model make it popular among developers community. NodeJS has assemblage of libraries and frameworks helping developer community. Express JS or Express is also one of the framework available for NodeJS helps in developing web based applications.

Installing NodeJS

The simplest way is go to NodeJS website and click on the installer link. The site also provides other download options (binary download or installers for Mac and Linux flavours). For Windows make sure your machine has latest OS updates otherwise windows installer may have trouble in installing.

Tutorials: NodeJS and Express (Tutorial 1)

For Linux, nodeJS package manager (eg apt-get) is also available. The installer also installs node package manager (npm). Once installed you can check node version and npm version by typing node -v and npm -v respectively at the command prompt or shell.

First NodeJS Program

You can try your first the most famous "Hello World" program in nodeJS. Type the following script in notepad or any text editor and save the file as helloworld.js

Program 1: helloworld.js

console.log("Hello World");

To run this code type node helloworld.js at the shell prompt. If everything works well, you would see the output of the program similar to what is shown in the figure.
Tutorials: NodeJS and Express (Tutorial 1) - Hello World

console.log() api is part of console built-in module in nodeJS. There are many inbuilt modules (or libraries) and globals defined in nodeJS. Apart from using builtin modules, you can use external modules.

Node Package Manager or npm helps you installing or managing node modules. The site www.npmjs.com lists the most starred packages used among NodeJS community.

Let us try to install and use colors module. The colors module gives color style to your console output. Type npm install colors will download colors module from npm repository and installs it. You can see a directory named 'node_modules' gets created where npm installs any package.

Tutorials: NodeJS and Express (Tutorial 1) - install color module
npm install color


See the following snippet showing how to use 'colors' node module:

Program 2: ex2.js

var colors = require("colors");
console.log('This is red'.red);
console.log('This looks green'.green);
console.log('this rainbow text'.rainbow);

The statement require("colors")in the above snippet will load the "colors" exported JavaScript API and returns the JS object. Once colors Javascript Object is loaded, you can call its exported functions and members in your program code. The output of the above snippet will look like the Figure

Tutorials: NodeJS and Express (Tutorial 1) - using color

Asynchronous Programming Approach


Friday, April 8, 2016

Six Sites Provide You Legal Free Images

Six Sites Provide You Legal Free Images

No doubt to enhance your presentation or blog post, images play a crucial role. Following are few sources that provide legally free good quality images.

Pixabay

Pixabay.com - Cat

Pixabay has collection of more than 6 million images which are available under creative commons CC0. If you wish you can modify, distribute and use them royalty free even for commercial purposes.

Morguefile

Six Sites Provide You Legal Free Images - MorgueFile.com

Morguefile has a stock of high resoulution photos which are available completely free. Do read about "Why this site is called MorgueFile?". The site provides categories to serach images for your needs.

Tuesday, February 16, 2016

How to control caching of your web server to avoid file suits?

How to control caching of your web server 

to avoid file suits?

How to control caching of your web server to avoid file suits?

While working for a world’s top most product company, one day a Product Manager working there approached to me. He had a legal letter served by one of our client. The legal notice says that our company has to bear a cost of  25,000 Australian dollars as bandwidth cost incurred to our client. Interestingly the legal notice did have technical explanation for excessive bandwidth consumption. The client used 100+ licenses of my employer’s products. Each installed product has an updater client to download updates. The client uses squid like cache server to optimise bandwidth.  Unfortunately update server switched off caching flag for a 1 GB sized update, due to which the cache server starts downloading for every time it gets a proxy request from the updater client on different machines. Anyway the matter get sorted by enabling the flags and offering extensions to the license products. But it was a great learning and caching procedures were added in product manager’s and testing team check list for future updates releases.    

Caching control helps in many ways such as

Monday, December 28, 2015

Start Your Online Book Keeping Services

Start Your Online Book Keeping Services

Start Your Online Book Keeping Services

Book Keeping and accountant services are something required by every business operation. A good book keeper can earn between 25,000 to 2 Lacs per month. The objective is to show your potential customer how you can help them in financial matters. Better managed accounting books help your customer in managing their financial matters. Most of the book keepers work through networking. Generally they work co-ordinate with Chartered Accountants who refer potential customers to book keepers. Unfortunately there is cut throat competition and you need to show that your book keeping services are much better. Making business online can help you offer better services and bring more customers.

How Can I become Certified Book keeper?

There are institutions like IIFCA , polytechnices like Delhi Government Polytechnic  offer Computer Accounting Certificate courses. They teach you computer basics, accounting basics, taxation, VAT and accounting software. For domestic clients learn TALLY or BUSY accounting software. For international clients, learn about Quicken or Quick books.

What do I need to start basic book keeping services?


  1. A computer or a laptop and licensed copy of TALLY or BUSY Accounting Software, 
  2. A flat bed scanner and small laser printer. 
  3. Office area, furniture, calculator etc. 
  4. Telephone and internet connection (email account).

What services can I offer from my Website?