There are two type models of the client-server architecture.
Thin-client model
In a thin-client model, all of the application processing and data management is carried out on the server. The client is simply responsible for running the presentation software.
Fat-client model
In this model, the server is only responsible for data management. The software on the client implements the application logic and the interactions with the system user.
Thin CLient Model:
-Used when legacy systems are migrated to client server architectures.
-The legacy system acts as a server in its own right with a graphical interface implemented on a client.
-A major disadvantage is that it places a heavy processing load on both the server and the network.
Fat Client Model:
-More processing is delegated to the client as the application processing is locally executed.
-Most suitable for new C/S systems where the capabilities of the client system are known in advance.
-More complex than a thin client model especially for management. New versions of the application have to be installed on all clients.
Monday, March 31, 2008
Thin and Fat Client Model
Thursday, March 27, 2008
Adding a Large and Small Number Error
The initial terms in such series are often relatively too large in comperison with the following ones. So after a few terms, we have been adding very small number to too large numbers.The error here is caused by the chopping of the computer while calculating the series.
By the definiton above we examine the problems below:
Problem 3:
F(N)= Σ 1/(n*n) where n=1 to n=N
Compute the series by adding with the variable n=1 to 10,000 and by adding the varieble n=10,000 to n=1.Compare the results.
This is the code solution program of the problem in Java:
import javax.swing.JOptionPane;
public class series{
public static void main(String args[]){
double x =0.0;
double y=0.0;
for(double i=1.0; i<10001.0; i++){
x += 1.0/(i*i);
}
for(double i=10000.0; i>0.0; i--){
y +=1/(i*i);
}
JOptionPane.showMessageDialog(null,"The sum begined from n=1 :"+x+'\n'+"The sum begined from n=10,000 :"+y);
}
}
And these are the outputs:
Wednesday, March 26, 2008
Machine Epsilon
Machine epsilon is the smallest number when it is added to 1 your computer assumes it 1 briefely. It depends the physical features of your computer. After this definition let us create the pseudocode of a program that computes your machines' epsilons.
epsilon=1
DO
IF(1+epsilon<=1) EXIT
epsilon=epsilon/2
END DO
epsilon=epsilon*2
The code above is the pseudocode of a machine epsilon algorythm. I guess you know about pseudocode :) If you do not know do not be sorry since it is nothing :P It is a description of an algorythm that is language independent.YOu just write on what you think to do. That is it!
Now let me give you the Java code of that algorythm and the output of it.
import javax.swing.JOptionPane;
public class epsilon{
public static void main(String args[]){
double epsilon = 1.0;
for(int i=1; i<100000; i++){
if(epsilon+1.0<=1.0){
break;
}
else{
epsilon=epsilon/2.0;
}
}
epsilon=2*epsilon;
JOptionPane.showMessageDialog(null,"The epsilon of the machine is:"+epsilon);
}
}
Since i have explained each line of a java code example i think you can understand the steps and pseudocode helps you in this issue as well.
So my output is in the figure below. But do not be confused if you have not got the same output since it depends the physical features of your PC!
I will keep giving some java examples as well. Using Java in mathematic will suprise you or mathematics will suprise you ;)
Friday, March 7, 2008
Introduction to PHP 2
Firstly PHP is a SSS(Server Side Script). This means if a user enter the site that is prepared by using PHP can only see the HTML output. For instance we have written a program and create an executable code. Then the executable code generates an output to the screen and you can not see the real codes of the program. This is the process of SSS. It generates an output to the screen.
So at last this is our first PHP code example :))
< html >
< body >
< ?php
echo "Hello Web!!!";
? >
< /body >
< /html >
< ?php is the code piece that the PHP codes start. PHP when realizes the sign < ? it interprets the codes until ?> sign. It does not executes the rest of the code. Since that the output of the code i have written above is that:
< html >
< body >
Hello Web!!!
< /body >
< /html >
So this is the process... As you see echo is a function like the print functions in C/C++ or Java.
See you at next article...