This set of Java Spring Multiple Choice Questions & Answers (MCQs) focuses 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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.
Sanfoundry Global Education & Learning Series – Java Spring.
To practice all areas of Java Spring, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Apply for Programming Internship
- Check Information Technology Books
- Practice Programming MCQs
- Check Spring Books