or Jetty, are trivially easy to install on personal plat-
forms, and they offer directly the possibility to exploit
the servlets in order to include some dynamics : simu-
lations, animations, database access, etc., to pedagog-
ical pages, with presentations and/or exercices.
For teaching, this was not our first choice, be-
cause Java is not an interactive language, but the Java
Virtual Machine is nowadays installed everywhere on
standard computers, and its variants (Dalvik) are in-
stalled on Android devices. Since by default the JVM
includes the Javascript processor, users who prefer to
program in a dynamically typed language, can do it.
The document structure may ressemble our Tornado
experience: the HTML page addresses the server,
which switches the control to your Java program (or
to a JSP page, which contains executable fragments
inside HTML), this one calls your specific pedagog-
ical library, e.g., a zoological or linguistic database,
and returns the information to the browser, perhaps in
graphical form.
3.1 Node.js
Node.js, ((Joyent, 2015)), is a world-wide known
Javascript programming framework “on the server
side” (independently of any browser, or other client;
it may be installed locally, of course). Its kernel is
based on the Google V8 engine, and it is just a simple
terminal-command based application, which executes
a sequence of scripts. We used it to process some ped-
agogical statistical physics simulations (such as the
animation of the Ising model or the percolation), and
the speed was sufficient. We could discuss the prob-
lem, while the visualization was generated dynami-
cally on-line, without disturbing the presentation.
There exist already hundreds of different, special-
ized servers based on Node. Several modules are in-
cluded in the standard distribution, or may be installed
in a few seconds. A minimalistic script needs only
to load some libraries, to execute, say, var server
= http.createServer(proc req resp);
server.listen(8080);, and to declare (before)
a function proc req resp(request,response),
a procedure which gets automatically the request
string from the user, if the browser addresses
localhost:8080. This procedure constructs the
server’s answer, which is switched back to the user.
It may also launch another server, or stop itself,
according to the request. The server may act as a
go-between the browser (the HTML pages), and all
the resources of the platform.
The reader of this paper may have the impression
that we speak about the development of Web appli-
cations, whose relations to teaching are distant and
indirect. This is almost true, only that the dynami-
cal, communicating systems, which begin to domi-
nate the professional world, should change our way
of teaching as well, and the progress here is not as fast
as it should.
4 WEBSOCKETS
This is an advanced subject, which can be barely
scratched here, but it really changed the face of dis-
tributed computing, enabling it for non-professionals,
even for children. Most users are acquainted with
the classical, HTTP interaction between servers and
clients (classical synchronous, or AJAX). The client
issues a HTTP request, the server wakes-up, answers,
and passivates. This model may be not sufficient, if
we want to organize a full duplex, persistent connec-
tion, such as chat, which may be quite useful in a
computing room, to ask questions by the students, and
broadcast the teacher’s answers. Also, a fast, persis-
tent communication channel will be useful when our
server is supposed to “push” periodically some (un-
solicited explicitly)data to the client, for some kind of
animation, or teacher forced messages, warnings, and
hints to a group of students working on some assign-
ment.
The administration of client/server channels de-
mand some special work on several computers, which
in a pedagogical or not, multi-user environment might
be heavy. But then, if the communication channels are
already open, it is possible to link together a student’s
computer and some didactic equipment (data acqui-
sition devices, robots, drones, Arduino assembly, or
another computer), and to work as if both software
layers were parts of the same application. We speak
about linking computing sites through stable, persis-
tent, full-duplex communication channels, as if they
were parts of the same system.
The professional (industry, scientific, military,
etc.) world uses it frequently, and it is the time that
the educational community profit from it more in-
tensely. The Websocket constructs are integrated into
the HTML5 specification. All serious browsers and
server frameworks are compatible with them, and use
a specific protocol: ws://xxxx.zzz. Moreover, for
several programming languages, there are dozens of
different Websocket libraries, with slightly different
functionalities ((Kaazing, 2015; ?; ?)), etc., to cite
the most relevant.
Everything is coded in very few lines of code.
When a server begins to listen to port 8080, if a
script on some remote client executes, say, sock =
new WebSocket("ws://localhost:8080");,
CSEDU2015-7thInternationalConferenceonComputerSupportedEducation
320