Wednesday, February 18, 2009

LATEX in easiest way

Author: Inderpreet
LaTeX is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.
The biggest advantage I like about LATEX is that we don’t have to worry too much about the appearance of their documents but to concentrate on getting the right content. LATEX will automatically do the formatting for you wrt whatever style you specify while starting the document.
The worst thing I like about typing my research paper in MS World is that, I have to manually manage the References and their order. If we have to change some reference, we manually have to edit all other that are affected by this change. In LATEX, once we have created the references set, we have to just point them into the doc. We don’t have to think about the format and order of reference. Another thing we can do in LATEX is that we can contain the complete database of our references (in form of *.bib file) and include them in whatever paper or thesis we want. Apart from this, LATEX can provide you readymade styles for different kind of documents, auto section numbering, table of contents, page numbering, and support to generate the pdf and ps formats, different styles for referring references, and many more.
Just like we have tags in HTML, we have same tags like structure to construct the LATEX document. We have to start and end the document. And in between these, we write the material we want to display. Use those tags and you are free from all the tensions of formatting the document.
Easiest way to migrate to LATEX:
Step1: Download the LATEX package. Most of the linux distributions include this package by default. For windows we need to download LATEX package. Latest TeX distribution for windows is named the proTeXt and is based on MiKTeX. proTeXt guides the MiKTeX installation via a short PDF document.
Step2: Get the good editor for LATEX. For Linux users, you can go with VI editor. For Windows, we have many different editors like WinEdt, Notepad++, Edit Plus, etc. I always prefer using the WinEdt. It is paid, but I assure you it is worth spending few dollars on it. For installing WinEdt follow this link.
Step3: Start writing the document in any editor of your choice. Save the file with .tex extension. Compile to get the result.

Writing the LATEX document:
1.     Create a file with .tex extension.
2.     The file will consists of following format
\documentclass[a4paper,12pt]{article}
%including the graphic package for images
\usepackage{graphicx}
\title{My Sample \LaTeX{} Document}
\author{InderPreet Singh}
\begin{document}
\maketitle
%starting the new section
\section{Main Section}
This is my first sample Document using LATEX. For new line place doubleslash \\
To make the things \textbf{bold}.For emphasizing something
\emph{use}.
 Start of new paragraph, just give one blank line in-between.
 \subsection{Sub Section}
For bullets
\begin{itemize}
\item \emph{Item1:} Line one
\item \emph{Item2:} Line two
\end{itemize}

For Formulas
\begin{equation}
    y_{i+1} = x_{i}^{2n} - \sqrt{5}x_{i-1}^{n} + \sqrt{x_{i-2}^7} -1
\end{equation}
 To Place the reference, we create the bib file separately or use in
following manner by using bibliography. For calling the reference
place \cite{RefJ}
 Table Creation
\begin{table}
% table caption is above the table
\caption{Please write your table caption here}
\label{tab:1}       % Give a unique label
% For LaTeX tables use
\begin{tabular}{lll}
\hline\noalign{\smallskip}
first & second & third  \\
\noalign{\smallskip}\hline\noalign{\smallskip}
number & number & number \\
number & number & number \\
\noalign{\smallskip}\hline
\end{tabular}
\end{table}

Image Insert
\begin{figure}
  % Requires \usepackage{graphicx}
  \includegraphics[width=1.68in, height=1.00in]{google}\\
  \caption{My Test Figure}\label{google}
\end{figure}

\begin{thebibliography}{}
\bibitem{RefJ}
% comment is placed like this
Author, Article title, Journal, Volume, page numbers (year)
\end{thebibliography}
 \end {document}
This Sample.tex file is self explanatory. I try to cover most of the commonly used tags, with comments. For more detail, click here.
Compiling the LATEX document:
If you are a WinEdt user, it will be quite easy for you to compile and generate whatever format (pdf or ps) you want to generate. You just need to press the button in the toolbar. For the people that are writing TeX file using normal text editors, they need to compile the file manually. For that they have to follow the following steps:
1.     Goto command line and type following commands
2.     To generate the .dvi file,
C:\Inder> latex Sample.tex
The dvi stands for "device independent'' the file Sample.dvi is the same regardless of which computer is used to compile the document, or what kind of printer it is headed for. In fact, it is too universal to be printed in this form; it must still be translated to a form suitable for a specific kind of printer. You can't even view the DVI file unless you use a special ``DVI Viewer'', such as xdvi on ucsub.
3.     To generate the .ps (post script) file
C:\Inder>dvips sample.dvi
4.     To generate the .pdf file
C:\Inder>dvipdf sample.dvi
Or we can get direct PDF from tex file by typing
C:\Inder>pdflatex sample.tex
To view the output Sample.pdf file, click here.
Start working on LATEX without giving any second thought that it will be difficult than normal Word Processor. Once you start using this, I am sure that you will love using this.

Useful Links:

Saturday, February 14, 2009

Open Source Open Prospects

What is Open Source?
Open source is a development method for software that harnesses the power of distributed peer review and transparency of process. The promise of open source is better quality, higher reliability, more flexibility, lower cost, and an end to predatory vendor lock-in.
 Is Free means Open Source?
Most people out there that think "open source" is same as "freeware".
Not really.
Taken literally, open source is a set of principles on how to write software, with the full source code for said software openly available to you, the user.
Freeware (whether ad-supported or not) can be closed source. Just because an app is free doesn’t mean you can hack it. A good example of this is a from-service instant messenger program. Sure, you can freely download and use the Yahoo Messenger, but can you get the source code and hack your own version of it?
No.
If it were open source like you have the Jabber Client, you could. You can use its libraries to add as many client you want or you can modify it wrt your organization policies.
Reasons behind Open Source Development
  1. Most of the time open source package is released by companies, to check the robustness and efficiency of there software’s.
  2. Another reason to have open source packages in the market is to offer the package for the free and charge the customers for the services like support, consultancy and training.
  3. Open source is the best way to make the software update wrt the latest technologies present in the market. As open source is the freely distributed package, many great minds keep on working to add new features into that wrt there needs.
  4. Lot of times people are not able to design/develop the kind of software they would like to in their full time job and so they develop open source software to fulfill their dreams.
  5. Another reason is to become popular in lesser time. Open source package is easier to reach different people than the paid software’s.
  6. For some people, it becomes the showcase of their credentials to get a job.
  7. Few open source projects have been developed to support the needs of the organizations and later on open sourced.
  8. Companies encourage their employees to participate in open source projects so that they can influence those projects to suit their needs.
  9. Few people write the open source as they don’t want to start from the beginning.
Advantages and Drawbacks
Few advantages of using open source:
  1. Most of the times it is free or has small cost for getting their services
  2. Often open source packages are more flexible and have many new features available wrt the current technologies.
  3. Offers more independence for accomplishment of task with respect to our custom requirements.
  4. Less licensing headache
Some of the drawbacks for going with open source:
  1. Computability issues with other paid software’s.
  2. Enthusiastic and varied support was previously listed as one of the benefits of open source software
  3. Open source is not plug and play. Though many open source projects are more and more concerned with making their software easy to use, the fact is loading and installing the software can be a major hurdle for many users.
  4. Many times they are not easy to be modified.
  5. If some problem comes to you and you are not subscribing to their services, you will be in big trouble. And if we opt for their services, we can say it as completely open source.
 Useful Open Source Links


A brief introduction to Globus GT4 Toolkit

GT4 Introduction

In the past few years the numbers of PCs have been increasing incessantly and so has the need for ideal power. A growing appetite for computational power in scientific research and computational discovery has resulted in conditions that are favorable for the evolution of computational intermediaries. One of the most significant intermediaries is Grid computing that harnesses the ideal power of the PCs.  The term grid computing defined  as:

A type of parallel and distributed system that enables the sharing, selection, and aggregation of geographically distributed autonomous resources dynamically at runtime depending on their availability, capability, performance, cost, and users quality-of- service requirements.

To implement the Grid environment we need middleware that will help us to share, select and aggregate the distributed resources. There are many middleware’s like SUN N1GE6, Condor, Alchemi, Legion etc. are available for this purpose. Here we are discussing the Globus GT4 middleware. The open source Globus® Toolkit is a fundamental enabling technology for the "Grid," letting people share computing power, databases, and other tools securely online across corporate, institutional, and geographic boundaries without sacrificing local autonomy. The toolkit includes software services and libraries for resource monitoring, discovery, and management, plus security and file management.

 From version 1.0 in 1998 to the 2.0 release in 2002 and now the latest 4.0 version based on new open-standard Grid services, the Globus Toolkit has evolved rapidly into what The New York Times called "the de facto  standard" for Grid computing.  The GT4 architecture consists of following components:


Security

The GT4 Security components collectively referred to as Grid Security Infrastructure (GSI), facilitate secure communications and the application of uniform policies across distinct systems.

- Delegation: The toolkit includes a service that delegates credentials to a container.

- Community Authorization: Virtual organizations can use the Community Authorization Service (CAS) to manage authorization policies for VO resources.

- Credential Management: This component includes SimpleCA, a simple Certificate Authority for users without access to a full-blown CA, and MyProxy, an online credential repository.

•Data Management

The Data Management components provide for the discovery, transfer and access of large data.

- GridFTP: This component includes a fully functional GridFTP server, and several client-side utilities. The GridFTP protocol is specially optimized to transfer large amounts of data between hosts.

- RFT: The Reliable File Transfer service is a WSRF-enabled service that uses GridFTP internally to move large amounts of data. It provides several interesting features over GridFTP, such as the possibility of resuming interrupted transfers.

- Replica Location: The Replica Location Service (RLS) allows users to keep track of where different replicas of a dataset are located in a virtual organization.

- Data Replication: The Data Replication Service (DRS) uses RLS and RFT to guarantee that local copies of replicas are available to the hosts that need them.

- OGSA-DAI: OGSA Data Access and Integration provides a framework to access and integrate datasets on a Grid which might be available in different formats (plain text files, databases, XML files, etc.).

 Execution Management

Execution Management components deal with the deployment, scheduling and monitoring of executable programs, referred to as jobs.

- Grid Resource Allocation & Management (GRAM): GRAM is the heart of GT Execution Management, providing services to deploy and monitor jobs on a Grid.

- Community Scheduler Framework (CSF): This component provides a single interface to different resource schedulers such as PBS, Condor, LSF and SGE.

- Workspace Management: A new component in the toolkit that allows users to dynamically create and manage workspaces on remote hosts.

- Grid Telecontrol Protocol: This component provides a WSRF-enabled service interface for telecontrol (control of remote instruments)

  Information Services

Information Services, commonly referred to as the Monitoring and Discovery System (MDS), includes a set of components to monitor and discover resources in a virtual organization.

- Index Service: This component is used to aggregate resources of interest to a VO.

- Trigger Service: Like the Index service, the Trigger service also collects data from resources, but is configured to perform certain actions based on that data.

- WebMDS: Provides a web browser-based view of data collected by GT4 aggregator services.

   Common Runtime

The Common Runtime components provide a set of fundamental libraries and tools for hosting existing services as well as developing new services.

- C Runtime: Includes tools, libraries and a WS hosting environment for C developers.

- Python Runtime: Includes tools, client libraries and a WS hosting environment for Python developers.

- Java Runtime: Includes tools, libraries and a service hosting environment for Java developers.

 Sources:

Ian Foster, Carl Kesselman, and Steven Tuecke, The anatomy of the Grid, John Wiley and Sons(2003)

Borja Sotomayor and Lisa Childers, Globus Toolkit 4: Programming Java Services, Elsevier

 Useful Links:

Globus Toolkit Home Page

Good Globus tutorial

Globus for Programmers