Though most Java developers think of the Java Native Interface (JNI) as a
framework for developing native libraries that can be called from Java,
relatively few know that JNI also supports communication in the reverse
direction: it provides native programs written in C with the ability to call
Java objects. However, the coding is thorny; logic that can be coded readily
in a few lines of Java requires several times more lines of C, thanks to
JNI's granular programming model and peculiar approaches to exception
handling and garbage collection. This article explores the nature and typical
use of the C-to-Java JNI interface and presents the design of a framework
that eases the programming effort.
The JNI Architecture
As Figure 1 illustrates, JNI is actually a pair of APIs: "... (more)
In most software topics, the boundary between theory and practice in software
is clearly demarcated: theory is for academics who seldom descend from the
ivory tower, practice is for industry professionals who have long forgotten
the concepts and application of theory. In concurrency, for example, most
developers either know or have programmed semaphores, but few remember the
conceptual u... (more)
Over the years business processes have become automated to the point that the
BPM community now considers the SOA language BPEL, designed for the
orchestration of Web Services, as the best platform for building contemporary
processes. But many processes retain some level of human activity, and BPEL's
support for human interaction is problematic. Most attempts to integrate
human workflow ... (more)
The state machine is one of the most successful ideas in the history of
computing. Alan Turing built a model of computability around the concept, and
in doing so became the father of computer science. Mealy, Moore, Harel, and
other theorists expanded the idea, influencing engineers of digital logic,
real-time, and embedded systems whose designs are peppered with state
machines and diagra... (more)
Choreography is the dark continent of Web services: few onlookers have
traveled there, and many question whether there are any riches to be brought
home from the trip. In the first place, choreographies bear such a striking
resemblance to business processes that the novice might think that the two
types of artifacts are indistinguishable.
After all, isn't choreography just a way to descri... (more)