Spring Questions and Answers – Clustering Object State Using Terracotta and Execution to a Grid

This set of Java Spring Questions & Answers for campus interviews 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

Answer: a
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

Answer: c
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

Answer: a
Explanation: It also works as a mostly unnoticeable engine to enable API-free shared state across a cluster.
advertisement
advertisement

4. Terracotta doesn’t use serialization of objects.
a) True
b) False
View Answer

Answer: a
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

Answer: a
Explanation: It ensures replication of object state across a cluster.
Note: Join free Sanfoundry classes at Telegram or Youtube

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

Answer: a
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

Answer: a
Explanation: The server, in this case, is the one that contains the original working memory.
advertisement

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

Answer: c
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

Answer: a
Explanation: On Unix-like operating systems, you start Terracotta as follows:
$TERRACOTTA HOME/bin/start-tc-server.sh –f $PATH TO TERRACOTTA CONFIGURATION
advertisement

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

Answer: a
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

Answer: b
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

Answer: b
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

Answer: a
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

Answer: d
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

Answer: d
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 for campus interviews, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.