Database Reference
In-Depth Information
Although there are a number of non-Java JVM languages, the two most
popular ones used in real-time application development are Scala and
Clojure. In this topic, Scala was used to implement the Kafka package used
for data motion and the Samza framework used in conjunction with Kafka
to process data. Scala has spent most of its life as an academic language,
and it is still largely developed at universities, but it has a rich standard
library that has made it appealing to developers of high-performance server
applications. Like Java, Scala is a strongly typed object-oriented language,
but it also includes many features from functional programming languages
that are not included in the standard Java language. Interestingly, Java 8
seems to incorporate several of the more useful features of Scala and other
functional languages.
Whereas Scala does not have a direct analog in the world of programming
languages, Clojure is a JVM language based on the venerable Lisp language.
There have been a number of Lisp interpreters written for Java over the
years, but Clojure is compiled and can make direct use of Java libraries
within the language itself. Clojure was used to implement the Storm
streaming data processing framework discussed in this topic. Lisp-style
languages are ideally suited to the implementation of domain-specific
languages, which are small languages used to implement specific tasks.
This appears to have influenced the development of Storm's Trident
Domain-Specific Language, which is used to define the flow of data through
various steps of processing in Storm.
JavaScript
JavaScript, of course, is the lingua franca of the web. It is built into every
web browser and, thanks to an arms race between browser developers,
is now even fast enough to serve as a language for implementing web
applications themselves.
The only relationship between JavaScript and Java, aside from the
name—which was essentially a marketing gimmick—is a superficial
similarity in their syntaxes. Both languages inherit much of their syntaxes
from the C/C++ language, but JavaScript is much more closely related to
Clojure and Scala.
Like Scala and Clojure, JavaScript is a functional language. In Java, an
object is an entity that contains some data and some functions, called
methods . These two entities are separate and treated quite differently by
Search WWH ::




Custom Search