Introduction of Matlab
Introduction of Matlab
Computer Architecture
Report Topic : MATLAB
Report by :
Ahmed Saeed
Omed Saeed
Sarmad Fwad
Supervisor : st. Alaa
Academic year : 2018/2019 Stage
: third year
Introduction.
MATLAB is a high-level technical computing language. Its user-friendly
syntax, rapid prototyping ability, well written documentation and all-in-
one platform features lead users to code applications on MATLAB.
Moreover, users use included compilers to generate stand-alone
applications. However, nowadays companies demand N-Tier
applications, which mean that users want to drive MATLAB as a
computation engine from other popular programming languages, i.e.,
Java, C#, C++. As a scenario, users have user interfaces via a web
browser or a stand-alone file to run processes. These interfaces send
retrieved user commands to the application server, where MATLAB
runs. If there is any database or any other routines, these interfaces
should call procedures on other servers like “Database Server” or
“Business Logic Server”. MATLAB has documentation based on
external interfaces [1] describing how to call MATLAB from C/C+
+/Fortran/Java & C#. Developer can easily access MATLAB through
Component Object Model (COM) [2] and Dynamic Data Exchange
(DDE) [3] support at Microsoft Windows based platforms. Also, there
are built-in C Routines to call MATLAB from other languages. These
routines are accessible for both Microsoft Windows and all POSIX
based (Linux, UNIX like) operating systems. C and C++ languages are
not well formed and not a rapid choice for developing N-Tier
applications (for example, Remote Method and Web Services) like C#
[4]. As long as it seems C# on .NET Framework is a suitable solution,
C# can only implement C or C++ routines in unsafe blocks, which
cause stack overflow [5]. It can be accepted as a satisfactory solution,
Java Native Interface (JNI) [6] technology can wrap C routines in Java.
In the other hand, MATLAB has a product called “MATLAB Compiler” to
generate runtime [7] based DLLs, C# Assemblies or Java classes to use
MATLAB code in C, C++, C# or Java. Main purpose is to reduce time in
development and easy code management. Besides, MATLAB Compiler
has limitations and restrictions [8]. The developer may face with
challenges in this solution. There are some approaches that use C
Routines of MATLAB to overcome this issue. One of them is a toolbox of
MATLAB called MATLAB Web Server [9]. MATLAB Web Server use
Common Gateway Interface (CGI) [10] to transfer data from web to
MATLAB. Because CGI is a legacy technology, there are several lacks in
this solution such as no database connectivity support, no web service
architecture, no interaction with other languages like JavaScript [11]
and hard coding. Towards, Ohio State University developed “A Java
Based Web Interface to MATLAB” [12] solution, which usesC Routines
in Java. Although it seems a good candidate with having Kerberos
Authentification [13], audio/video playback on HTML and dynamic
zoom for images, it has a hard syntax to code because of HTML
Embedded Servlets, only supports POSIX based systems, also, it has no
built in database support, has no interoperability and web service
functionalities. Without having an N-Tier architecture approach and
serving a rapid application development environment, it can not lever
the demands. To overcome the above mentioned limitations, we
present a solution using JNI [14] and supporting N-Tier architecture will
be suitable for developer’s demand. In this paper, MATLAB Server
Pages (MSP) is developed as a Java based, open source, platform
independent application to satisfy developers’ expectations. MSP offers
web based application development platform including database
connectivity, Remote Method Invocation, Distributed Computing, and
Web Services. Not only MATLAB users can use these products, web
developers and application engineers can now prefer MATLAB for N-
Tier architectures. In short, MATLAB Server Pages is technical web
programming language that uses MATLAB in background via JNI.
System Technical Architecture: MATLAB Server Pages (MSP) is an open
source technical web programming language using MATLAB in
background. MSP supports “3-Tier Architecture”; Web Tier, Business
Tier and Database Tier. Also, MSP consists of “distributed computing”
and “parallel processing” via remote procedure calls and web services.
MSP uses JavaServer Pages [16] technology to define Custom Tag
Libraries [17], called MATLAB Tag Library Definitions (TLDs) & MATLAB
Remote Method Invocation (RMI) TLDs, to handle a rapid application
development (RAD) environment for web developers. Underlying Java
RMI support acts as a gateway for distributed computing and parallel
processing. Thus, MSP can use a remote MATLAB just like on local
computer. Expression Language Mechanism [18] of JSP Standard Tag
Library [19] and MSP Custom Tag Libraries work together to realize
database connectivity. MSP implements JavaServer Faces [20] for
defining business logics and business rules including advanced UI
components. MSP includes Web Service Definition Language (WSDL)
[21] files provide an opportunity for using MATLAB as a Web Service.
MSP is Business Process Execution Language (BPEL) [22] and Web
Services Interoperability (WSI) [23] standards compatible.
Figure 1. Contribution of all tiers creates MSP Architecture .