download the following exe file to preview the assignment made in VB
NOTE: this is 2 just give an idea on how 2 make the project
As HOD sir said u have 2 make ur unique assignment.
THIS IS MY PROJECT
http://rapidshare.com/files/203927200/Project1.exe
NEW VERSION
http://rapidshare.com/files/204396130/Project1.exe
THIS IS ANVITH'S PROJECT :
http://rapidshare.com/files/204426655/OSI.exe.html
THIS IS MAHESH'S PROJECT
http://rapidshare.com/files/205297569/Mahesh_Osi_Layer_Project.exe.html
Monday, March 2, 2009
NETWORKING
Remote Procedures
In the previous example, the client communicated to the server over a socket connection using a protocol known to both parties
But both the client and server had to be aware of the socket level details
Wouldn't it be nice if even these details were abstracted away and the request to the server looked like a local procedure call from the viewpoint of the client?
That's the idea behind a Remote Procedure Call (RPC), a technology introduced in the late 1970's
• Two RPC specifications:
c) SUN's Open Network Computing (ONC) RPC
c) OSF's Distributed Computing Environment (DCE) RPC
Design Patterns In Java
Distributed Object Technology
But RPC is not object-oriented. In the 00 world, we'd like to have distributed objects and remote method calls.
While there are many Distributed Object Technologies available
today, three are widely available: ¢ RMI
¢ CORBA ¢ SOAP
• Remote Method Invocation (RMI) ¢ Developed by SUN
¢ Available as part of the core Java API ¢ Java-centric
¢ Object interfaces defined as Java interfaces ¢ Uses object serialization
Design Patterns In Java
Remote Method Invocation 12
Bob Tarr
Distributed Object Technology
• Common Object Request Broker Architecture (CORBA) c) Developed by the Object Management Group (OMG)
c) Language and platform independent
c) Object interfaces defined in an Interface Definition Language (IDL)
An Object Request Broker (ORB) facilitates the client-server request/response action
ORBs communicate via a binary protocol called the Internet Inter-ORB Protocol (IIOP)
• SOAP
c) Simple Object Access Protocol c) XML-Based
c) Developed from an earlier spec called XML-RPC c) Standardized by the W3C
c) Many implementations availablt
Design Patterns In Java
Remote M d hod Invocation 13
Bob Tarr
RMI
Provides a distributed object capability for Java applications
Allows a Java method to obtain a reference to a remote object and invoke methods of the remote object nearly as easily as if the remote object existed locally
The remote object can be in another JVM on the same host or on different hosts across the network
Uses object serialization to marshal and unmarshal method arguments
Supports the dynamic downloading of required class files across the network
Design Patterns In Java
Remote Method Invocation 14
Bob Tarr
RMI
Provides a distributed object capability for Java applications
Allows a Java method to obtain a reference to a remote object and invoke methods of the remote object nearly as easily as if the remote object existed locally
The remote object can be in another JVM on the same host or on different hosts across the network
Uses object serialization to marshal and unmarshal method arguments
Supports the dynamic downloading of required class files across the network
Design Patterns In Java
Remote Method Invocation 14
Bob Tarr
RMI Application
• RMI Application
client
\Neb server
Design Patterns In Java
---
- . -
-- -
. --
. --
---
. - - . - - -- - ---"'-.-.'
. ~~ \/f'}~:.()\.
__ It Server
I I
URL prcd:oc:ol
I I
I
u~~ ~~;:._--------_ ~r---h--' r
1(. d.JCot -- - ...••. , W F! SF! t\l'F!
Remote M(\flwd Invocation 1
Bob Tarr
RMI Stubs And Skeletons
RMI uses stub and skeleton objects to provide the connection between the client and the remote object
A stub is a proxy for a remote object which is responsible for forwarding method invocations from the client to the server . where the actual remote object implementation resides
A client's reference to a remote object, therefore, is actually a reference to a local stub. The client has a local copy of the stub object.
A skeleton is a server-side object which contains a method that dispatches calls to the actual relTIote object implementation
A remote object has an associated local skeleton object to dispatch remote calls to it
Design Patterns In Java
Remote Md hod Invocation 16
Bob Tarr
RMI Stubs And Skeletons
Note: Java 2 (JDKl.2) does not require an explicit skeleton class.
The skeleton object is automatically provided on the server side .
• A method can get a reference to a remote object
¢ by looking up the remote object 111 some directory service. RMI provides a simple directory service called the RMI registry for this purpose.
¢ by receiving the remote object reference as a method argument or return value
Design Patterns In Java
Remote Mdlwcllnvocation II
Bob Tarr
Developing An RMI Application
An object becomes remote-enabled by implementing a remote interface, which has these characteristics:
c:) A remote interface extends the interface java.rmi.Remote
c:) Each method of the interface declares java.rmi.RemoteException in its throws clause, in addition to any application-specific exceptions
• Steps To Develop An RMI Application
c:) 1. Design and implement the COIIl ponents of your distributed application .• Define the remote interface( s )
.• Implement the remote object(s)
.• Implement the client( s)
c:) 2. Compile sources and generate stubs (and skeletons) c:) 3. Make required classes network :Iccessible
c:) 4. Run the application
Design Patterns In Java
Remote Mt1. hCHI Invocation In
Bob Tarr
RMI Example 1
The classic "Hello, World" Example using RMI!
First, define the desired remote interface:
import jaya.rmi.*;
/**
* Hello Interface.
*/
public interface IHello extends Remote {
public String sayHello() throws RemoteException;
}
A class that implements this rUlnote interface can be used as a remote object. Clients can rClllotely invoke the sayHello() method which will return thc string "Hello, World" to the client.
Design Patterns In Java
Remote M d lwei Invocation In
Bob Tarr
RMI Example 1 (Continued)
Next, provide an implementation of the remote object
We'll implement the remote object as a server
• The remote object server implementation should: c) Declare the remote interfaces being implemented
c) Define the constructor for the relTIote object
c) Provide an implementation for each remote method in the remote interfaces c) Create and install a security manager
c) Create one or more instances or a remote object
Register at least one of the relTIotc objects with the RMI remote object registry (or some other naming service), for bootstrapping purposes
To make things simple, our rClllote object implementation will extend java.rmi.server.Unicast l{cmoteObject. This class provides for the "exporting" of a remote object by listening for incoming
calls to the remote object on an anonymous port.
Remote Mdhucllnvocation
o
Bob Tarr
Design Patterns In Java
RMI Example 1 (Continued)
• Here's the server for our remote object:
import java.rmi.*;
import java.rmi.server.*;
II Hello Server.
public class HelloServer extends UnicastRemoteObject implements IHello {
private String name;
public HelloServer(String namo) throws RemoteException { super() ;
this.name = name;
}
public String sayHello() {
n "Hello, World!";}
Design Patterns In Java
Remote Mdhu-Ilnvocation I
Bob Tarr
}
catch(Exception e) {
System. out .println ("HelloServer error: " + e. getMessage () ) ; e.printStackTrace() ;
Design Patterns In Java
}
RMI Example 1 (Continued)
public static void main (String[] args) {
II Install a security manager! System.setSecurityManager(new RMISecurityManager(»;
try {.
II Create the remote object.
HelloServer obj = new HelloServer("HelloServer") ;
II Register the remote object as "HelloServer". Naming.rebind("rmi:llserverhost/HelloServer", obj); System.out.println("HelloServer bound in registry!");
}
}
Remote Mt,Owd Invocation
Bob Tarr
RMI Example 1 (Continued)
• Next, we need to write our client application:
import java.rmi.*;
II Hello Client.
public class HelloClient {
public static void main (String[] args) {
II Install a security manager! System.setSecurityManager(new RMISecurityManager(»;
try {
II Get a reference to tho remote object.
IHello server = (IHello)Naming.lookup("rmi:llserverhost/HelloServer") ; System.out.println("Bound to: " + server);
'~
Design ]>~lttcrIlN III .1""11
Remote Md hntllnvocation
Bob Tarr
}
RMI Example 1 (Continued)
//Invoke the remote method. System.out.println(server.sayHello(» ;
}
catch(Exception e) { e.printStackTrace() ;
}
}
Design Patterns In Java
Remote Mdhod Invocation 4
Bob Tarr
RMI Example 1 (Continued)
• Now we can compile the client and server code:
Javac IHello.java javac HelloServer.java Javac HelloClient.java
We next use the rmic utility to generate the required stub and skeleton classes:
rmic HelloServer
• This generates the stub and skeleton classes:
HelloServer Stub. class
HelloServer Skel.class (Not needed in Java 2)
1
Design Patterns In Java
Remote Method Invocation 25
Bob Tarr
RMI Example 1 (Continued)
Our next step would be to make the class files network accessible.
For the moment, let's assume that all these class files are available locally to both the client and the server via their CLASSPATH. That way we do not have to worry about dynamic class downloading over the network. We'll see in the next example how to properly handle that situation.
The files that the client must have in its CLASSP ATH are:
IHello.class HelloClient.class HelloServer Stub. class
• The files that the server must h,ave in its CLASSP A TH are:
IHello.class HelloServer.class HelloServer Stub. class
HelloServer Skel.class (Not needed in Java 2)
Design Patterns In Java
Remote Method Invocation 26
Bob Tarr
RMI Example 1 (Continued)
If you run this example in Java 2, you need a security policy file that allows the downloading of class files
Here is an example policy file tl1at allows anything!
grant {
permission java.security.AIIPermission;
} ;
Here's a policy file that allows the program to connect to or accept connections from any IH)~t on ports greater than 1024 and to connect to any host on port XO (the default HTTP port):
grant {
permission java.net.Sock "connect,accept";
permission java.net.Socketl'qnni.ssion "*:80", "connect";
mission "*:1024-65535",
} ;
Design Patterns In Java
Remote M('~llC)lllnvocation 7
Bob Tarr
/"1
r
J RMI Example 1 (Continued)
Now, we/are ready to run the application: • On the server:
c) Start the rmiregistry:
rmiregistry &
c) Start the server:
java -Djava.security.policy=policy HelloServer
• On the client:
c) Start the client:
java -Djava. securi ty. policy=policy HelloClient
• Get this wonderful output on the client:
Hello, World!
Design Patterns In Java
Remote Method Invocation 28
Bob Tarr
HelloServer.java
import java.rmi.*;
import java.rmi.server.*; II Hello Server.
public class Helloserver extends unicastRemoteobject implements IHello {
private String name;
public Helloserver(string name) throws RemoteException { super();
this.name = name;
}
public string sayHello() {return "Hello, world!";} public static void main(string[] args) {
II Install a security manager! system.setsecurityManager(new RMIsecurityManager())" try {
II Create the remote object.
HelloServer obj = new Helloserver("Helloserver");
II Register the remote object as "HelloServer". Naming.rebind("rmi:lllocalhost/Helloserver", obj); System.out.println("Helloserver bound in registry!"); }
catch(Exception e) {
system.out.println("HelloServer error: II + e.getMessage()); e.printStackTrace();
}
}
}
page 1
Helloserver.iava
import java.rmi.~·
import java.rmi .server.%a
II Hello Server.
public class Helloserver extenas implements IHello {
private String name;
public Helloserver(String name) throws RemoteException { super();
this. name = name;
}
public String sayHello() {return "Hello, world!";} public static void main(String[] args) {
II Install a security manager! System.setsecurityManager(new RMISecurityManager()); try {
II Create the remote object.
Helloserver obj = new Helloserver("Helloserver");
II Register the remote object as "Helloserver". Naming.rebind("rmi:lllocalhost/Helloserver", obj); System.out.println("Helloserver bound in registry!"); }
catch(Exception e) {
system.out.println("Helloserver error: II + e.getMessage()); e.pri~tstackTrace();
}
}
}
page 1
HelloServer.java
import java.rmi.*; import java.rmi.server.*;
II Hello Server.
public class HelloServer extends unicastRemoteobject implements IHello {
private string name;
public Helloserver(string name) throws RemoteException { super();
this.name = name;
}
public String sayHello() {return "Hello, world!";} public static void main(string[] args) {
II Install a security manager! system.setsecurityManager(new RMIsecurityManager()); try {
II Create the remote object.
HelloServer obj = new Helloserver(IHelloserver");
II Register the remote object as "Helloserver". Naming.rebind(lrmi:lllocalhost/Helloserver", obj); system.out.println("Helloserver bound in registry!"); }
catch(Exception e) {
System.out.println("HelloServer error: II + e.getMessage()); e.printStackTrace();
}
}
}
page 1
HelloClient.java
import java.rmi.*; II Hello client.
public class Helloclient {
public static void main(string[] args) {
II Install a security manager! system.setsecurityManager(new RMIsecurityManager()); try {
II Get a reference to the remote object.
IHello server = (IHello)Naming.lookup(lrmi:lllocalhost/Helloserver"); system.out.println("Bound to: II + server);
IIInvoke the remote method. system.out.println(server.sayHello());
}
catch(Exception e) { e.printstackTrace(); }
}
}
page 1
HelloClient.java
import java.rmi.*; II Hello client.
public class Helloclient {
public static void main(String[] args) {
II Install a security manager! system.setsecurityManager(new RMIsecurityManager()); try {
II Get a reference to the remote object.
IHello server = (IHello)Naming.lookup("rmi:lllocalhost/Helloserver"); system.out.println("Bound to: II + server);
IIInvoke the remote method. system.out.println(server.sayHello());
}
catch(Exception e) { e.printstackTrace(); }
}
}
page 1
In the previous example, the client communicated to the server over a socket connection using a protocol known to both parties
But both the client and server had to be aware of the socket level details
Wouldn't it be nice if even these details were abstracted away and the request to the server looked like a local procedure call from the viewpoint of the client?
That's the idea behind a Remote Procedure Call (RPC), a technology introduced in the late 1970's
• Two RPC specifications:
c) SUN's Open Network Computing (ONC) RPC
c) OSF's Distributed Computing Environment (DCE) RPC
Design Patterns In Java
Distributed Object Technology
But RPC is not object-oriented. In the 00 world, we'd like to have distributed objects and remote method calls.
While there are many Distributed Object Technologies available
today, three are widely available: ¢ RMI
¢ CORBA ¢ SOAP
• Remote Method Invocation (RMI) ¢ Developed by SUN
¢ Available as part of the core Java API ¢ Java-centric
¢ Object interfaces defined as Java interfaces ¢ Uses object serialization
Design Patterns In Java
Remote Method Invocation 12
Bob Tarr
Distributed Object Technology
• Common Object Request Broker Architecture (CORBA) c) Developed by the Object Management Group (OMG)
c) Language and platform independent
c) Object interfaces defined in an Interface Definition Language (IDL)
An Object Request Broker (ORB) facilitates the client-server request/response action
ORBs communicate via a binary protocol called the Internet Inter-ORB Protocol (IIOP)
• SOAP
c) Simple Object Access Protocol c) XML-Based
c) Developed from an earlier spec called XML-RPC c) Standardized by the W3C
c) Many implementations availablt
Design Patterns In Java
Remote M d hod Invocation 13
Bob Tarr
RMI
Provides a distributed object capability for Java applications
Allows a Java method to obtain a reference to a remote object and invoke methods of the remote object nearly as easily as if the remote object existed locally
The remote object can be in another JVM on the same host or on different hosts across the network
Uses object serialization to marshal and unmarshal method arguments
Supports the dynamic downloading of required class files across the network
Design Patterns In Java
Remote Method Invocation 14
Bob Tarr
RMI
Provides a distributed object capability for Java applications
Allows a Java method to obtain a reference to a remote object and invoke methods of the remote object nearly as easily as if the remote object existed locally
The remote object can be in another JVM on the same host or on different hosts across the network
Uses object serialization to marshal and unmarshal method arguments
Supports the dynamic downloading of required class files across the network
Design Patterns In Java
Remote Method Invocation 14
Bob Tarr
RMI Application
• RMI Application
client
\Neb server
Design Patterns In Java
---
- . -
-- -
. --
. --
---
. - - . - - -- - ---"'-.-.'
. ~~ \/f'}~:.()\.
__ It Server
I I
URL prcd:oc:ol
I I
I
u~~ ~~;:._--------_ ~r---h--' r
1(. d.JCot -- - ...••. , W F! SF! t\l'F!
Remote M(\flwd Invocation 1
Bob Tarr
RMI Stubs And Skeletons
RMI uses stub and skeleton objects to provide the connection between the client and the remote object
A stub is a proxy for a remote object which is responsible for forwarding method invocations from the client to the server . where the actual remote object implementation resides
A client's reference to a remote object, therefore, is actually a reference to a local stub. The client has a local copy of the stub object.
A skeleton is a server-side object which contains a method that dispatches calls to the actual relTIote object implementation
A remote object has an associated local skeleton object to dispatch remote calls to it
Design Patterns In Java
Remote Md hod Invocation 16
Bob Tarr
RMI Stubs And Skeletons
Note: Java 2 (JDKl.2) does not require an explicit skeleton class.
The skeleton object is automatically provided on the server side .
• A method can get a reference to a remote object
¢ by looking up the remote object 111 some directory service. RMI provides a simple directory service called the RMI registry for this purpose.
¢ by receiving the remote object reference as a method argument or return value
Design Patterns In Java
Remote Mdlwcllnvocation II
Bob Tarr
Developing An RMI Application
An object becomes remote-enabled by implementing a remote interface, which has these characteristics:
c:) A remote interface extends the interface java.rmi.Remote
c:) Each method of the interface declares java.rmi.RemoteException in its throws clause, in addition to any application-specific exceptions
• Steps To Develop An RMI Application
c:) 1. Design and implement the COIIl ponents of your distributed application .• Define the remote interface( s )
.• Implement the remote object(s)
.• Implement the client( s)
c:) 2. Compile sources and generate stubs (and skeletons) c:) 3. Make required classes network :Iccessible
c:) 4. Run the application
Design Patterns In Java
Remote Mt1. hCHI Invocation In
Bob Tarr
RMI Example 1
The classic "Hello, World" Example using RMI!
First, define the desired remote interface:
import jaya.rmi.*;
/**
* Hello Interface.
*/
public interface IHello extends Remote {
public String sayHello() throws RemoteException;
}
A class that implements this rUlnote interface can be used as a remote object. Clients can rClllotely invoke the sayHello() method which will return thc string "Hello, World" to the client.
Design Patterns In Java
Remote M d lwei Invocation In
Bob Tarr
RMI Example 1 (Continued)
Next, provide an implementation of the remote object
We'll implement the remote object as a server
• The remote object server implementation should: c) Declare the remote interfaces being implemented
c) Define the constructor for the relTIote object
c) Provide an implementation for each remote method in the remote interfaces c) Create and install a security manager
c) Create one or more instances or a remote object
Register at least one of the relTIotc objects with the RMI remote object registry (or some other naming service), for bootstrapping purposes
To make things simple, our rClllote object implementation will extend java.rmi.server.Unicast l{cmoteObject. This class provides for the "exporting" of a remote object by listening for incoming
calls to the remote object on an anonymous port.
Remote Mdhucllnvocation
o
Bob Tarr
Design Patterns In Java
RMI Example 1 (Continued)
• Here's the server for our remote object:
import java.rmi.*;
import java.rmi.server.*;
II Hello Server.
public class HelloServer extends UnicastRemoteObject implements IHello {
private String name;
public HelloServer(String namo) throws RemoteException { super() ;
this.name = name;
}
public String sayHello() {
n "Hello, World!";}
Design Patterns In Java
Remote Mdhu-Ilnvocation I
Bob Tarr
}
catch(Exception e) {
System. out .println ("HelloServer error: " + e. getMessage () ) ; e.printStackTrace() ;
Design Patterns In Java
}
RMI Example 1 (Continued)
public static void main (String[] args) {
II Install a security manager! System.setSecurityManager(new RMISecurityManager(»;
try {.
II Create the remote object.
HelloServer obj = new HelloServer("HelloServer") ;
II Register the remote object as "HelloServer". Naming.rebind("rmi:llserverhost/HelloServer", obj); System.out.println("HelloServer bound in registry!");
}
}
Remote Mt,Owd Invocation
Bob Tarr
RMI Example 1 (Continued)
• Next, we need to write our client application:
import java.rmi.*;
II Hello Client.
public class HelloClient {
public static void main (String[] args) {
II Install a security manager! System.setSecurityManager(new RMISecurityManager(»;
try {
II Get a reference to tho remote object.
IHello server = (IHello)Naming.lookup("rmi:llserverhost/HelloServer") ; System.out.println("Bound to: " + server);
'~
Design ]>~lttcrIlN III .1""11
Remote Md hntllnvocation
Bob Tarr
}
RMI Example 1 (Continued)
//Invoke the remote method. System.out.println(server.sayHello(» ;
}
catch(Exception e) { e.printStackTrace() ;
}
}
Design Patterns In Java
Remote Mdhod Invocation 4
Bob Tarr
RMI Example 1 (Continued)
• Now we can compile the client and server code:
Javac IHello.java javac HelloServer.java Javac HelloClient.java
We next use the rmic utility to generate the required stub and skeleton classes:
rmic HelloServer
• This generates the stub and skeleton classes:
HelloServer Stub. class
HelloServer Skel.class (Not needed in Java 2)
1
Design Patterns In Java
Remote Method Invocation 25
Bob Tarr
RMI Example 1 (Continued)
Our next step would be to make the class files network accessible.
For the moment, let's assume that all these class files are available locally to both the client and the server via their CLASSPATH. That way we do not have to worry about dynamic class downloading over the network. We'll see in the next example how to properly handle that situation.
The files that the client must have in its CLASSP ATH are:
IHello.class HelloClient.class HelloServer Stub. class
• The files that the server must h,ave in its CLASSP A TH are:
IHello.class HelloServer.class HelloServer Stub. class
HelloServer Skel.class (Not needed in Java 2)
Design Patterns In Java
Remote Method Invocation 26
Bob Tarr
RMI Example 1 (Continued)
If you run this example in Java 2, you need a security policy file that allows the downloading of class files
Here is an example policy file tl1at allows anything!
grant {
permission java.security.AIIPermission;
} ;
Here's a policy file that allows the program to connect to or accept connections from any IH)~t on ports greater than 1024 and to connect to any host on port XO (the default HTTP port):
grant {
permission java.net.Sock "connect,accept";
permission java.net.Socketl'qnni.ssion "*:80", "connect";
mission "*:1024-65535",
} ;
Design Patterns In Java
Remote M('~llC)lllnvocation 7
Bob Tarr
/"1
r
J RMI Example 1 (Continued)
Now, we/are ready to run the application: • On the server:
c) Start the rmiregistry:
rmiregistry &
c) Start the server:
java -Djava.security.policy=policy HelloServer
• On the client:
c) Start the client:
java -Djava. securi ty. policy=policy HelloClient
• Get this wonderful output on the client:
Hello, World!
Design Patterns In Java
Remote Method Invocation 28
Bob Tarr
HelloServer.java
import java.rmi.*;
import java.rmi.server.*; II Hello Server.
public class Helloserver extends unicastRemoteobject implements IHello {
private String name;
public Helloserver(string name) throws RemoteException { super();
this.name = name;
}
public string sayHello() {return "Hello, world!";} public static void main(string[] args) {
II Install a security manager! system.setsecurityManager(new RMIsecurityManager())" try {
II Create the remote object.
HelloServer obj = new Helloserver("Helloserver");
II Register the remote object as "HelloServer". Naming.rebind("rmi:lllocalhost/Helloserver", obj); System.out.println("Helloserver bound in registry!"); }
catch(Exception e) {
system.out.println("HelloServer error: II + e.getMessage()); e.printStackTrace();
}
}
}
page 1
Helloserver.iava
import java.rmi.~·
import java.rmi .server.%a
II Hello Server.
public class Helloserver extenas implements IHello {
private String name;
public Helloserver(String name) throws RemoteException { super();
this. name = name;
}
public String sayHello() {return "Hello, world!";} public static void main(String[] args) {
II Install a security manager! System.setsecurityManager(new RMISecurityManager()); try {
II Create the remote object.
Helloserver obj = new Helloserver("Helloserver");
II Register the remote object as "Helloserver". Naming.rebind("rmi:lllocalhost/Helloserver", obj); System.out.println("Helloserver bound in registry!"); }
catch(Exception e) {
system.out.println("Helloserver error: II + e.getMessage()); e.pri~tstackTrace();
}
}
}
page 1
HelloServer.java
import java.rmi.*; import java.rmi.server.*;
II Hello Server.
public class HelloServer extends unicastRemoteobject implements IHello {
private string name;
public Helloserver(string name) throws RemoteException { super();
this.name = name;
}
public String sayHello() {return "Hello, world!";} public static void main(string[] args) {
II Install a security manager! system.setsecurityManager(new RMIsecurityManager()); try {
II Create the remote object.
HelloServer obj = new Helloserver(IHelloserver");
II Register the remote object as "Helloserver". Naming.rebind(lrmi:lllocalhost/Helloserver", obj); system.out.println("Helloserver bound in registry!"); }
catch(Exception e) {
System.out.println("HelloServer error: II + e.getMessage()); e.printStackTrace();
}
}
}
page 1
HelloClient.java
import java.rmi.*; II Hello client.
public class Helloclient {
public static void main(string[] args) {
II Install a security manager! system.setsecurityManager(new RMIsecurityManager()); try {
II Get a reference to the remote object.
IHello server = (IHello)Naming.lookup(lrmi:lllocalhost/Helloserver"); system.out.println("Bound to: II + server);
IIInvoke the remote method. system.out.println(server.sayHello());
}
catch(Exception e) { e.printstackTrace(); }
}
}
page 1
HelloClient.java
import java.rmi.*; II Hello client.
public class Helloclient {
public static void main(String[] args) {
II Install a security manager! system.setsecurityManager(new RMIsecurityManager()); try {
II Get a reference to the remote object.
IHello server = (IHello)Naming.lookup("rmi:lllocalhost/Helloserver"); system.out.println("Bound to: II + server);
IIInvoke the remote method. system.out.println(server.sayHello());
}
catch(Exception e) { e.printstackTrace(); }
}
}
page 1
Saturday, February 7, 2009
WELCOME
THIS IS THE BLOG FOR ENGINEERING STUDENTS of INFORMATION TECHNOLOGY BRANCH UNDER MUMBAI UNIVERSITY
HOWEVER IT IS MY BEST TRY TO MAKE IT USEFUL AND RESOURCEFUL FOR ALL INFORMATION TECHNOLOGY ASPIRANTS
HOWEVER IT IS MY BEST TRY TO MAKE IT USEFUL AND RESOURCEFUL FOR ALL INFORMATION TECHNOLOGY ASPIRANTS
Friday, January 30, 2009
Intel Core 2 Duo

The Core 2 brand refers to a range of Intel's consumer 64-bit single- and dual-core and 2x2 MCM (Multi-Chip Module) quad-core CPUs with the x86-64 instruction set, based on the Intel Core microarchitecture, derived from the 32-bit dual-core Yonah laptop processor.
The 2x2 MCM dual-die quad-core CPU had two separate dual-core dies (CPUs)—next to each other—in one quad-core MCM package. The Core 2 relegated the Pentium brand to a mid-end market, and reunified laptop and desktop CPU lines, which previously had been divided into the Pentium 4, D, and M brands.
The Core microarchitecture returned to lower clock rate and improved processors' usage of both available clock cycles and power compared with preceding NetBurst of the Pentium 4/D-branded CPUs. Core microarchitecture provides more efficient decoding stages, execution units, caches, and buses, reducing the power consumption of Core 2-branded CPUs, while increasing their processing capacity. Intel's CPUs have varied very wildly in power consumption according to clock rate, architecture and semiconductor process, shown in the CPU power dissipation tables.
The Core 2 brand was introduced on July 27, 2006, comprising the Solo (single-core), Duo (dual-core), Quad (quad-core), and Extreme (dual- or quad-core CPUs for enthusiasts) branches, during 2007. Intel Core 2 processors with vPro technology (designed for businesses) include the dual-core and quad-core branches.
The brand became immediately successful. The processors were introduced into Apple's popular MacBook series of notebooks
The Core 2 branded processors featured the Virtualization Technology , Execute Disable Bit, and SSE3. Their Core microarchitecture introduced also SSSE3, Trusted Execution Technology, Enhanced SpeedStep, and Active Management Technology (iAMT2). With a Thermal Design Power (TDP) of up to only 65 W, the Core 2 dual-core Conroe consumed only half the power of less capable, but also dual-core Pentium D-branded desktop chips[9] with a TDP of up to 130 W (a high TDP requires additional cooling that can be noisy or expensive).
On jobs requiring large amounts of memory access, the quad-core Core 2 processors can benefit significantly[56] from using a PC2-8500 memory, which runs exactly twice the performance as the FSB; this is not an officially supported configuration, but a number of motherboards offer it.
When using DDR memory, performance may be reduced because of the lower available memory bandwidth.
Pentium 4

The Pentium 4 brand refers to Intel's line of single-core mainstream desktop and laptop central processing units (CPUs) introduced on November 20, 2000. They had the 7th-generation microarchitecture, called NetBurst, which was the company's first all-new design since 1995
It features a very deep instruction pipeline to achieve very high clock speeds (up to 4 GHz) limited only by maximum power consumption (TDP) reaching up to 115 W in 3.6–3.8 GHz
In 2004, the initial 32-bit x86 instruction set of the Pentium 4 microprocessors was
extended by the 64-bit x86-64 set
The original Pentium 4, codenamed "Willamette", ran at 1.4 and 1.5 GHz and was released in November 2000 on the Socket 423 platform. Notable with the introduction of the Pentium 4 was the 400 MT/s FSB. It was actually based on a 100 MHz clock wave, but the bus was quad-pumped, meaning that the maximum transfer rate was four times that of a normal bus, so it was considered to run at 400 MT/s.
Pentium 4 CPUs introduced the SSE2 and SSE3 instruction sets to accelerate calculations, transactions, media processing, 3D graphics, and games. They also integrated Hyper-threading (HT), a feature to make one physical CPU work as two logical and virtual CPUs.
The Pentium 4 has an IHS (Integrated Heat Spreader) that prevents the die from accidentally getting damaged when mounting and unmounting cooling solutions.
Subscribe to:
Posts (Atom)