Place these events in chronological order from earliest to most recent.
-
- Work on Unix Begins.
- CORBA 1.1 is released.
- Java RMI ships.
- .NET initiative is announced.
-
- Work on Unix Begins.
- CORBA 1.1 is released.
- Java RMI ships.
- .NET initiative is announced.
-
- CORBA 1.1 is released.
- Work on Unix Begins.
- .NET initiative is announced.
- Java RMI ships.
-
- Work on Unix Begins.
- Java RMI ships.
- .NET initiative is announced.
- CORBA 1.1 is released.
-
- Work on Unix Begins.
- .NET initiative is announced.
- CORBA 1.1 is released.
- Java RMI ships.
The host-to-network layer, usually populated by the Ethernet, is
responsible for
- Placing and retrieving electronic signals on the transmission medium.
- Propagating IP packets between networks.
- Establishing reliable connections between two hosts.
- Determining how IP packets are to be routed.
- Moving IP packets between a host and the network at large.
Which one of the following choices is not part of the basic IP datagram.
- Destination port number
- Datagram length
- Destination IP address
- IP version number
- Header checksum
If you want every HTTP connection from the computers in your LAN
to first be served by a local cache (if possible) then you want
to set up a (pick best):
- Proxy
- Network Address Translator
- Router
- Gateway
- Firewall
The Domain Name System scales well because
- It is hierarchical.
- It is centralized.
- It has 8 root nodes.
- It uses TCP/IP
- It employs high-end machines.
Ports are
- An abstraction used by TCP to facilitate many connections to the same machine.
- All reserved by an IETF standard.
- A networking abstraction used only by UNIX machines.
- A technique for routing IP packets.
- A feature of UDP packets.
A Network Address Translator (NAT) is
- A service that changes the source IPs of datagrams coming out of a LAN.
- A service that changes machine names into IP numbers.
- A router with WAN capabilities.
- A device that works at the physical layer for serial IP protocols.
- A distributed address database.
A Request For Comments (RFC) is
- Documents that describe the IETF standards.
- A formal request for critiques of a hypothetical (i.e., not yet implemented) standard.
- A document that describes the workings of the Internet.
- An election protocol for DNS authorities.
- The first stage in the IETF standards process.
An Universal Resource Name (URN) is of the form
- urn:namespace:resource-name
- protocol:resource-name
- scheme:scheme-specific part
- protocol://hostname:resource-name
- protocol:namespace/resource-name
Place these three languages in chronological order from earliest to most recently developed.
- SGML, HTML, XML
- HTML, SGML, XML
- XML, SGML, HTML
- SGML, XML, HTML
- HTML, XML, SGML
Cookies enable an HTTP server to maintain state because
- They allow it to group together all the requests coming from each client.
- They allow it to identify the user of the browser.
- They allow the connection to stay open for multiple requests.
- They are opaque.
- They allow it to communicate with other servers.
The difference between Java byte streams and character streams is that
- Byte streams read in 8-bit bytes while character streams read in 16-bit characters.
- Byte streams are capable of reading in data in binary format while character streams read in only plain text.
- Byte streams are optimized for writing to disk while character streams are used for socket connections.
- There is no difference.
- Byte streams use little-endian notation while character streams use bid-endian.
The member function used to read bytes from a Java InputStream is called:
- read
- write
- input
- get
- getBytes
If you wanted two threads to pass data between them but wanted
to avoid all the complexities associated with locking a shared
variable, you could:
- Use a
PipedReader
and PipedWriter
- Use
ThreadGroups
- Use multiple JVMs
- Use
Socket
s
- It cannot be avoided. We must use
synchronize
and wait
.
Buffering a stream is useful
- When writing small pieces to a file.
- For checking the parity of the data.
- For speeding up the rate at which we can send data on a socket.
- When we want some added security.
- When running the debugger seems like a good idea.
If you wanted to send a large data file over a socket using the
CheckedOutputStream
you need to:
- Apply the checksums at fixed intervals.
- Create a new
CheckedOutputStream
surrounding the existing socket stream and just send all data on it.
- One can only send small files with
CheckedOutputStream
- Use a binary socket stream.
- Make sure that the
CheckedOutputStream
is using the appropriate encryption cyphers.
If you want to send a String from a Java program in a platform-independent fashion you could
- use
writeUTF
- use
toString
- use
DataOutputStream
- write a function to convert the String to ISO characters.
- use
writeCanonicalForm
If you serialize an object (using Java serialization) and send
it to someone else over a socket, which one of the following
statements is false.
- The receiver can call methods on that object.
- The receiver will be able to forward it to someone else.
- The receiver can write the object to a file.
- The receiver can check the class of the object.
- The receiver can try to typecast the object.
You start a Java Thread running by
- Calling its
start
method.
- Calling its
run
method.
- Calling its
main
method.
- Creating it with a
new
.
- Calling
notify
.
What are the state in a Java thread's life-cycle?
- new, runnable, not runnable, dead.
- running, stopped
- running, waiting
- new, runnable, waiting, blocked, yielding
- runnable, blocked, starting, sleeping
You implement two Java threads in your Unix machine. The first
one runs a compute-intensive loop, the second one reads from the
hard drive, none of them yield. Both of them have the same
priority. What will happen if you start them both?
- The first one will, on average, execute more often.
- The first one will consume all (or, at least most) of the CPU power.
- The second one will consume all (or, at least most) of the CPU power.
- The second one will, on average, execute more often.
- They will both, on average, execute just as often.
Why would you need to implement a thread using the Runnable
interface?
- When the class already inherits from another class.
- Because it looks more professional.
- When the
run
method has already been declared for some other use.
- Because Java's multiple-inheritance implementation can often make a program very slow.
- Because there is no other way to implement a thread.
If a Java object joe
of class Human
(which is not a Java thread) calls the wait
method,
what happens?
- The method blocks until someone calls
joe.notifyAll
.
- The method blocks until someone calls
Human.notifyAll
.
- The method blocks until someone calls
Human.wait
.
- The method returns immediately since
Human
is not a thread.
- The method returns until someone calls
notifyAll
.
The Java URL
class is used for
- Opening a connection to the given URL. The
connection understands the underlying protocol.
- Opening a socket to the given URL.
- Opening an HTTP connection to the specified URL.
- Parsing URL strings into their specified parts.
- Passing objects to sockets via the
Serializable
interface.
Sockets are
- An abstraction that transcends programming languages.
- An abstraction dictated by the OSI model.
- An abstraction developed by Java.
- One of the seven OSI layers.
- Only used when a TCP/IP connection is not available.
In any communication using sockets it is always true that:
- One end has to listen on a port until the other
someone connects.
- One end sends information while the other one receives it.
- One end sends data, then the other end, then the
connection is closed.
- Both ends must be listening for incoming connections.
- All information is encoded using the best available
encryption cyphers.
When using sockets, the method setSoLinger
is used to
- Set the number of seconds to wait, after the
socket has been closed, before giving up trying to send unsent packets.
- If set to true then send all packet immediately without
waiting for an ACK.
- Set the amount of time the socket will block waiting for
someone to connect.
- If set to true then send packets every so often in order
to keep the connection alive.
- Set the amount of time to wait for an ACK.
In order to establish a UDP connection to another host using
Java you need to
- First create a datagram, then a datagram
socket, then send the datagram on the socket.
- Open a UDP datagram socket to the other side and send data
on it.
- First open a socket to the other side and then use this
TCP socket to send datagrams.
- Simply create a UDP datagram and have it send itself.
- Determine the UDP protocol used by the other side and then
send the appropriate datagrams.
Which one of the following is not a reason for the
development of distributed object systems (DOS).
- Sockets are not capable of transmitting the
kinds of data required when building a DOS.
- With a DOS there is no need to define a new protocol each
time new functionality is desired.
- With DOS the user of does not have to worry about data conversion.
- If one uses a DOS then it is easier to later change the
location of the object.
- DOS make it easier to implement fine-grained security
mechanisms.
In Distributed Object Systems a skeleton
- Runs on the object server.
- Runs on the client.
- Is an object that pretends to be the real object but
actually passes all commands to another machine.
- Must be implemented, in its entirety, by the programmer.
- Is the process the user must go thru when invoking a
remote object.
The reason that when building a distributed object system the
client ends up having to also be a server (and viz.) is
- The value of a parameter could be a local object.
- The client could send the server a reference to an object
running on a third machine.
- It does not. The object server need not be an object
client (and viz.).
- Because DOS are really P2P systems.
- The
object registry cannot handle objects without skeletons.
In general, the first step when building your class for a
distributed objects system, is
- To describe the object's interface using an IDL.
- To implement the
run
method on the object.
- To decide which part of your object is the client and
which is the server.
- To determine if the methods in your class are synchronous
or asynchronous.
- To define a protocol for interacting with the object.
Which one of the following is not the responsibility of
the object manager in a distributed object system?
- To compile the object interface into stub and
skeleton code.
- To create new remote objects.
- To handle the routing of messages to remote objects.
- To handle the deletion of remote objects.
- To send back references to remote objects.
The function of a naming service in a distributed object system
is to:
- Maintain the mapping between interfaces and servers.
- Provide a name to every new object.
- Map between object names and IP addresses.
- Map between class names and IP addresses.
- Map between machine name and object name pairs into server
addresses.
The flow of control in a typical invocation of a distributed
object's method goes like
- client, stub, skeleton, object
- client, object manager, skeleton, object
- client, skeleton, stub, object
- client, skeleton, object
- client, naming service, object manager, stub, skeleton, object
Say you have a reference to a remote object and you send this
reference to another machine. What conditions must exist in
order for the other machine to be able to invoke methods on this
object.
- The reference must point to the the object
server and the other machine must have the class of the
stub for that reference.
- The reference must be a serialized version of the object.
- The remote machine must have a serialized version of the
skeleton for the object and the reference must point to this skeleton.
- The reference must contain the stub of the object and the
other machine must have the class of the skeleton for that reference.
- It cannot be done.
JXTA was designed
- To enable the implementation of sophisticated P2P application.
- As the next step in distributed object computing.
- As a response to .NET.
- As an extension to the Java Swing library.
- By a large but finite number of monkeys.
An feature of JXTA pipes that sets them apart from sockets is that
- Pipe endpoints can be moved among peers.
- Pipes can send encrypted data.
- Pipes are optimized for peer-to-peer communication.
- Pipes are longer than sockets.
- Pipes have higher throughput.
Why is it hard in a P2P application (like JXTA) to find a peer
that fits a particular description.
- Because there is not central repository of information.
- Because peers can only talk to a few other peers.
- Because pipes are not designed for that type of query.
- Because P2P applications tend to send too many messages.
- Because the registry service must be constantly updated.
In JXTA a peer group is
- A virtual entity that speaks the set of peer group protocols.
- A group of peers with the same set of goals.
- A group of peers that run on the same machine.
- A group of peers that run on the same LAN.
- A metaphor for cooperation.