You are on page 1of 6

Client Server Architecture BT0052

SET-1
1. Distinguish CISC and RISC.

Ans: CISC
Pronounced sisk, and stands for Complex Instruction Set Computer. Most PC's use
CPU based on this architecture. For instance Intel and AMD CPU's are based on
CISC architectures.
Typically CISC chips have a large amount of different and complex instructions. The
philosophy behind it is that hardware is always faster than software, therefore one
should make a powerful instruction set, which provides programmers with assembly
instructions to do a lot with short programs.
In common CISC chips are relatively slow (compared to RISC chips) per instruction,
but use little (less than RISC) instructions.

RISC
Pronounced risk, and stands for Reduced Instruction Set Computer. RISC chips
evolved around the mid-1980 as a reaction at CISC chips. The philosophy behind it
is that almost no one uses complex assembly language instructions as used by
CISC, and people mostly use compilers which never use complex instructions. Apple
for instance uses RISC chips.
Therefore fewer, simpler and faster instructions would be better, than the large,
complex and slower CISC instructions. However, more instructions are needed to
accomplish a task.
An other advantage of RISC is that - in theory - because of the more simple
instructions, RISC chips require fewer transistors, which makes them easier to
design and cheaper to produce.
CISC RISC
stands for Complex Instruction Set stands for Reduced Instruction Set
Compute Computer
In CISC, software developers no need to RISC puts a greater burden on the
write more lines for the same tasks software. Software developers need to
write more lines for the same tasks
CISC processors cannot have a large Large number of registers, most of which
number of registers. can be used as general purpose
registers
CISC processor executes microcode RISC processor has a number of
instructions hardwired instructions.

2. Write a short note on Asynchronous Transfer Mode of transmission..

Cybotech Campus Page 1


Client Server Architecture BT0052
Ans: ATM is cell and multiplexing technology that combines the

benefits of dedicated circuits (invariant transmission delay and


guaranteed capacity) with those of packet switching (flexibility and
efficiency for intermittent traffic). The fixed length of ATM’s cells(53
bytes—48 bytes for the “payload” and 5 bytes for headers)facilitates
high speed implementation that can support isochronous (time critical)
application such as video and telephony with constant flow rates, in
addition to more conventional data communications between
computers where fluctuation in packet arrival rates typically not
problematic (7). ATM standards define a board range of bandwidths –
from 1.5 mbps (via t1 or DS1) to 622 mbps (OC -12) and above – but
most commercially available ATM products currently provide 155.52
mbps (OC—3 ) or 100 mbps (TAXI). ATM is currently implemented over
fiber connections to and various twisted pair wiring alternatives.
All devices in an ATM network attach directly to an
ATM switch. Multiple ATM switches can be combined in a fabric
sometimes called an “ATM cloud” and virtual circuits can be
dynamically created between any two nodes on one or more ATM
switches so long as the switch can handle the aggregate cell transfer
rate, additional connections to the switch can be made.

3. Explain various client/server applications using Java.

Ans:

4. How will you develop a simple web client in Java using Sockets?

Ans: import java.io.*;


Import java.net.*;
Public class webc
{
try
{
Socket cSock1=new Socket (“cecasum.utc.edu”, 80);
System.out.println(“Client1: “ + csock1);
getPage(csock1);
}
Catch (UnknownHostException e)
{
System.out.println(“UnknownHostException : “ + e);
}
Catch (IOException e)
{
System.err.println(“IOException: “ + e);
}
}
Public static void getPage(Socket csock)
{

Cybotech Campus Page 2


Client Server Architecture BT0052
try
{
DataOutputStream outbound=new
DataOutputStream(cSock.getOutputStream());
DataInputStream inbound=new DataInputStream(cSock.getInputStream());
Outbound.writeBytes(“Get /~cslab/cpsc591/test.htmHTTP/1.0\r\n\r\n”);
String responseLine;
while((responseLine=inbound.readLine()) !=null)
{
System.out.println(responseLine);
If(responseLine.indexOf(“</HTML>”) !=-1)
Break;
}
outbound.close();
inbound.close();
cSock.close();
}
Catch(IOException ioe)
{
System.out.println(“IOException: “ + ioe);
}
}
}

5. Explain TCP/IP Protocol in detail.


Ans: TCP, an acronym for Transmission Control Protocol, corresponds to the fourth
layer of OSI reference model. IP corresponds to the third layer of the same model.
Each of these protocols has the following features:

TCP: It provides a connection type services. That is a logical connection must be


established prior to communication. Because of this, continuous transmission of
large amount of data is possible. It ensures a highly reliable data transmission for
upper layer using IP protocol. This is possible because TCP uses positive
acknowledgement to confirm the sender about the proper reception of data.

Data Segment 1

Time

Acknowledgment 1

Data Segment 2

Acknowledgement 2

Cybotech Campus Page 3


Client Server Architecture BT0052
A B

TCP establishes virtual circuits

A negative acknowledgement implies that the failed data segment needs to be


retransmitted.

The TCP header includes both source and destination port fields for identifying the
applications for which the connection is established. The sequence and
acknowledgement Number fields underlie the positive acknowledgement and
retransmission techniques. Integrity checks are accommodated using the checksum
field.

Source Port Destination

Port

Sequence Number

Acknowledgement Number

Header
Length Preserved Code Bits
Window

Checksum Urgent
Pointer

Option (if any)


Padding

The data segment format of the TCP protocol

IP: It is connectionless type service and operates at third layer of OSI reference
model. That is, prior to transmission of data. No logical connection is needed. This
type of protocol is suitable for the sporadic transmission of data to a number of
destinations. This has no functions like sequence control, error recovery and control,
flow control but this identifies, the connection with the port number.

6. Explain Remote Procedure Call in detail.

Ans: Remote Procedure Call (RPC) is a client/server infrastructure that increases the
interoperability, portability, and flexibility of an application by allowing the application
to be distributed over multiple heterogeneous platforms. It reduces the complexity of

Cybotech Campus Page 4


Client Server Architecture BT0052
developing application that span multiple operating systems and network protocols
by insulating the application developer from the details of the various operating
system and network interfaces-function calls are the programmer’s interface when
using RPC.

To access the remote server portion of an application, special function calls, RPCs,
are embedded, within the client portion of the client/server application program.
Because they are embedded, RPC do not stand alone as a discreet middleware
layer.

RPC increases the flexibility of an architecture by allowing a client component of an


application to employ a function call to access a server on remote system. RPC
allows the remote component to be accessed without knowledge of the network
address or any other lower-level information. Most RPCs use a synchronous,
request-reply (sometimes referred to as “call/wait”) protocol which involves blocking
of the client until the server fulfils its request. Asynchronous (“call/wait”)
implementations are available but are currently the exception.

In two ways RPC can be implemented:

1. Within a broader, more encompassing propriety product


2. By a programmer using a proprietary tool to create client/server RPC stubs.

RPC is appropriate for client/server applications in which the client can issue a
request and wait for the server’s response before continuing its own processing.
Because most RPC implementations do not support peer-to-peer, or asynchronous,
client/server interaction, RPC is not well-suited for applications involving distributed
objects or object-oriented programming.

Asynchronous and synchronous mechanisms each have strength and weaknesses


that should be considered when designing any specific application. In contrast to
asynchronous mechanisms employed by Message-Oriented Middleware, the use of
a synchronous request-reply mechanism in RPC requires that the client and server
are always available and functioning. In order to allow a client/server application to
recover from a blocked condition, an implementation of a RPC is required to provide
mechanisms such as error, messages, request timer, retransmission, or redirection
to an alternate server. The complexity of the application using a RPC is dependent
on the sophistication of the specific RPC implementation. RPCs that implement
asynchronous mechanisms are very few and are difficult to implement.

Cybotech Campus Page 5


Client Server Architecture BT0052

Cybotech Campus Page 6

You might also like