250+ TOP MCQs on Clustering Object State Using Terracotta and Execution to a Grid and Answers

Java Spring Questions & Answers for campus interviews on “Clustering Object State Using Terracotta and Execution to a Grid”.

1. You want to share object state across multiple virtual machines.
a) Terracotta
b) Hibernate Transaction
c) All of the mentioned
d) None of the mentioned
Answer: a
Clarification: You can use Terracotta to build such a solution. Terracotta (http://www.terracotta.org) is a free open source clustering solution.

2. The company, Terracotta, has also recently become the corporate sponsor of:-
a) Ehcache
b) Quartz
c) All of the mentioned
d) None of the mentioned
Answer: c
Clarification: The company, Terracotta, has also recently become the corporate sponsor of the Ehcache and Quartz projects.

3. Terracotta works like many other clustered caches, except that, in addition to being a good Hibernate clustered cache.
a) True
b) False
Answer: a
Clarification: It also works as a mostly unnoticeable engine to enable API-free shared state across a cluster.

4. Terracotta doesn’t use serialization of objects.
a) True
b) False
Answer: a
Clarification: Terracotta doesn’t use serialization of objects (not even highly compact serialization like Swift, Google’s Protocol Buffers, Coherence Pofs, or Hazelcast DataSerializables), and instead ferries around deltas of VM memory across the cluster.

5. Terracotta works as a JVM agent that monitors the object graph of a given JVM instance.
a) True
b) False
Answer: a
Clarification: It ensures replication of object state across a cluster.

6. Terracotta is different than most clustered caches today because it has no visible API
a) True
b) False

Answer: a
Clarification: Terracotta is different than most clustered caches today because it has no visible API, and because it’s far more efficient in conveying the changed state to nodes across the cluster.

7. Terracotta has a client/server architecture.
a) True
b) False
Answer: a
Clarification: The server, in this case, is the one that contains the original working memory.

8. To deploy a Terracotta application, you first download the distribution. The distribution provides :-
a) utility scripts
b) JAR files
c) All of the mentioned
d) None of the mentioned
Answer: c
Clarification: The distribution provides utility scripts, as well as JARs. You may download Terracotta from http://www.terracotta.org.

9. On Unix-like operating systems, you start Terracotta as :-
a) $TERRACOTTA HOME/bin/start-tc-server.sh –f $PATH TO TERRACOTTA CONFIGURATION
b) $TERRACOTTA HOME/bin/start-tc-server.sh –f $PATH TO TERRACOTTA
c) $TERRACOTTA HOME/bin/start-tc-server.sh –f $PATH TO TERRACOTTA bin
d) None of the mentioned
Answer: a
Clarification: On Unix-like operating systems, you start Terracotta as follows:
$TERRACOTTA HOME/bin/start-tc-server.sh –f $PATH TO TERRACOTTA CONFIGURATION

10. For each virtual machine client that you want to “see” and share that state, start it with a customized bootclasspath parameter when starting Java.
a) True
b) False
Answer: a
Clarification: The arguments for this vary per operating system, so Terracotta provides a handy script for determining the correct arguments, dso-env.sh.

11. To use the script on Unix-like operating systems:
a) $TERRACOTTA HOME/bin/dso-env.sh $HOST:3312
b) $TERRACOTTA HOME/bin/dso-env.sh $HOST:$PORT
c) All of the mentioned
d) None of the mentioned

Answer: b
Clarification: To use the script on Unix-like operating systems:
$TERRACOTTA HOME/bin/dso-env.sh $HOST:$PORT

12. To distribute processing over many nodes, perhaps to increase result speed through the use of concurrences, perhaps merely to provide load balance and fault tolerance.
a) Grid
b) GridGain
c) All of the mentioned
d) None of the mentioned
Answer: b
Clarification: You can use something like GridGain, which was designed to transparently offload processing to a grid.

13. GridGain is an implementation of a processing grid.
a) True
b) False
Answer: a
Clarification: GridGain differs from data grids like Terracotta or Coherence, although data grids and processing grids are often used together.

14. There are many data grids, such as :-
a) Coherence
b) Terracotta
c) Hadoop’s HFS
d) All of the mentioned
Answer: d
Clarification: These are designed to be fault-tolerant, memory-based RAM disks, essentially.

15. Map/reduce is a pattern that was popularized by Google, and it comes from functional programming languages, which often have:-
a) map
b) reduce
c) none of the mentioned
d) all of the mentioned
Answer: d
Clarification: The idea is that you somehow partition a job and send those pieces to be processed. Finally, you take the results and join them, and those results are then sent back. Often, you won’t have results per se; instead, you’ll have sought only to distribute the processing asynchronously.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top