Monday, June 23, 2008

Sendmail

Sendmail is a mail transfer agent (MTA) that is a well-known project of the open source, free software and Unix communities, which is distributed both as free software and proprietary software. Its also called the mail server daemon. Other mail server daemons include qmail, postfix, exim, mmdf, smail etc. server daemons looks after the receiving incoming mail and delivers outgoing mail.

Sendmail configuration files
All sendmail related configuration files have to be put in /etc/mail directory.

1)/etc/mail/access

It specifies what hosts or IP addresses have access to the local mail server and what kind of access(OK, REJECT,RELAY) they have.
OK - allowed to send mail to the host as long as mail's final destination is the local machine.
REJECT - reject for all mail connections
RELAY - allowed to send mail for any destination through this server.
e.g.
cyberterror.com     550 we dont expect mail from you
a.source.of.spam     REJECT
cyberspammer.com     OK
128.32          RELAY

2)etc/mail/aliases
This database contains a list of virtual mailboxes that are expanded to other user(s), files, programs or other aliases.
e.g
root: ajantha
webmaster:kamal,lal
customers: :include: /etc/mail/lists/customer-list

The last alias causes how to keep a list of users for an aliases in an external file.

3)/etc/mail/local-host-names
Consist list of host names that sendmail is to accept as the local mail host. if the mail server was to accept mail for the domains cmb.ac.lk and ucsc.cmb.ac.lk the above file will contain:
cmb.ac.lk
ucsc.cmb.ac.lk

4)/etc/mail/sendmail.cf
It controls the overall behavior of sendmail. The master sendmail configuration file can be built from m4 macros.

5)/etc/mail/virtusertable
This maps email addressse for virtual domains and mailboxes to real mail boxes. The mail boxes can be local, remote, aliases defined.
e.g
info@msc.cmb.ac.lk ajantha
info@bit.cmb.ac.lk saman







Tuesday, June 17, 2008

Containers and Servlets

A Servlet container is a specialized web server that supports Servlet execution. They map the request URLs to specific servlets..but how? Containers know the interface between the servlets and the web server. no specific API is needed for this.


The container receives a HTTP request.


The container creates request and response objects.


It initiates a new thread to handle the request. Then passes the two objects in to the thread.


Container calls the service() method of the servlet which would call the doGet() or doPost() methods, based on the request type.


The doGet() method returns the result, writes the HTML and stuffs it into the response object.


The HTML page is sent back to the client, the response, request objects are deleted and the thread is killed.

Hope this would have given a clear picture on what happens to the request for a servlet. but still there is more. Here the business logic and presentation are tied together which is not a very good OO practice. you can separate them using JSPs.. MVC improves on it even more...We'll come back to that later..



Wednesday, June 11, 2008

ERP Systems Overview


The above figure shows an ERP model.

When we say ERP Systems it’s basically the integration of several data sources and processes of an organization in to a unified system with a unified database to store various system modules. Modular software design is the core concept of ERP systems which allows individual components/modules to be added to the system. These modular software designs link into the common database, so that all of the information between is accessible in real time. ERP systems integrated separate systems of an organization which led to minimization of specialties in an organization.

When most people refer to the “core” ERP applications or “modules,” they mean the back-office capabilities to manage human resources, accounting and finance, manufacturing, and project-management functions. However, major ERP suites from Oracle, PeopleSoft, and SAP now provide much more—including modules for sales force automation, business intelligence, customer relationship management, and supply chain management. We had a practical assignment at university where we had to plan an ERP system for the Sri Lankan Railways. The document is available here. It includes study of the existing system, the proposed system features, the risks and rewards in implementing it etc. I’m sure it will provide a practical view.

http://www.keepandshare.com/doc/view.php?id=622579&da=y

Characteristics of ERP systems

• In ERP systems, information is often recorded in a form that cannot be read without the use of a computer.

• Financial and business information is often generated automatically by ERP systems based on data previously entered, without further human instructions.

• Errors that might be observed in non-ERP systems may go undetected because of the reduced human involvement in computerized processing. There is a danger that errors in processing may be applied to a large number of transactions without being noticed.

• With proper controls, ERP systems can be more reliable than non-ERP systems. This is because ERP systems subject all data to the same procedures and controls. Non-ERP systems are subject to random human error. Although computer processing will usually be consistent, errors may still occur; for example, if the computer is incorrectly programmed.

• But still it is difficult to make changes after an ERP system has been implemented. Therefore, we should be aware of the organization’s plans to introduce significant new systems or to make major modifications to existing systems. It is advisable to review new systems or modifications before implementation so that a preliminary assessment can be made of the adequacy of control procedures, in order to ensure an adequate audit trail, and to plan any necessary changes in the audit approach.

Monday, June 9, 2008

Using SSH

SSH is a program to log into another computer over a network, to execute commands in a remote machine, and to move files from one machine to another. It provides strong authentication and secure communications over insecure channels. SSH is most useful when logging into a UNIX machine from another machine where the traditional telnet and rlogin programs would not provide password and session encryption.

Now we'll take a look at some basic SSH commands in networking.
To login to a remote machine running sshd server you can use the any of the following formats.

# ssh -l remote_user host_name_or_ip
# ssh remote_user@host_name_or_ip
e.g.
# ssh -l root 192.248.16.100
# ssh bud@server.cmb.ac.lk

To execute a command on the remote machine without logging in explicitly you can use,
# ssh -l remote_user host_name_or_ip remote_command
e.g.
# ssh -l bud@192.248.16.100 /usr/bin/x11/xclock
It starts the xclock application in the remote machine.

To ftp securely you can use sftp.
e.g
# sftp bud@192.248.16.100

sftp> cd downloads - Used to change directory
sftp>mput *.rpm - Used to upload multiple files
sftp>mget httpd* - Used to download multiple files
sftp>help - See a list of commands

To copy files from one host to another try
# scp [-r] source user@remote_host:target
e.g.
# scp bud@192.248.16.100:/etc/lilo.conf /tmp

Still there is SSH server and client configuration and do you knw how to configure passwordless SSH login?
http://www.keepandshare.com/doc/view.php?id=624904&da=y


AdventNet QEngine 6 - Web Performance Test Tool

Lets have some practical experience on a testing tool. AdventNet QEngine Web Performance Test tool is a powerful, easy-to-use and affordable web load testing tool to quickly test the performance of your web sites and web-based applications. Its automatic analysis enables you to accurately simulate the traffic of thousands of users to identify and isolate performance bottlenecks and optimize user experience within minutes.

Main Features of AdventNet QEngine 6
  • Test Scheduling and Command Line Toolkit
  • Web Performance Testing (Load Testing)
  • Web Services Testing (Functional & Performance)
  • QEngine Issue Tracker
  • QEngine Toolbar for remote record/playback of user actions
  • Browser-based Web testing
  • Jython Test Scripts
  • Environment Independent Tests
  • Powerful Script Editor
The basic steps involved in QEngine Load Testing testing are as follows:


The detail picture of testing with QEngine is provided here.
http://www.keepandshare.com/doc/view.php?id=622522&da=y

Now we'll take a look at some of the outputs of the load testing with QEngine.

Transaction Status Summary




The above figure shows a transaction status summary graph provides a snapshot of Requests pending, Response pending & Response status such as, download started and download completed. If pending Request / Response is too high then check the test duration in Summary Report and the error distribution graph in Error Report to identify the problem.

Hits Per Second



This graph shows the number of HTTP/S requests made by Virtual users to the server during each second of the run.

URL wise Response Time Report



More details about QEngine testing is available in the link provided above. The report also speaks of another load and stress testing tool called WAPT 5.0 that provides with an easy-to-use, consistent and cost-effective way of testing web sites, web servers, and intranet applications with web interfaces.