Enhancing Web Technology through Wiki-shell
Architecture
1Robin Singh Bhadoria 2Manish Dixit
Dept of CSE Dept of CSE
IITM, Gwalior (MP)-INDIA MITS, Gwalior(MP)-INDIA 1
Email: [emailprotected] 2Email:[emailprotected]
3Varun Mishra
4Kuldeep Singh Jadon
M.Tech (Software System) M.Tech (Software System)
SATI,Vidisha(MP)-INDIA SATI,Vidisha(MP)-INDIA
3Email: [emailprotected]
4E-mail: [emailprotected]
Abstract: The usage of World Wide Web(WWW) and
Internet has increased tremendously in the past decade.
WWW has changed the way humans now communicate.
Initially when WWW was built, it was an application
running on the internet. But now web has itself become a
platform and numerous applications have been built making
use of web-technology stack which run over the WWW.
Online shopping portals and online automated systems, for
e.g. Amazon and online railway ticket booking, are two
hugely popular applications built using the same. Wiki is
another such application exemplified by Wikipedia which
has become one of the biggest knowledge repositories.
Wiki has proven to be an excellent collaboration tool and
lot of companies and organisations are using it for various
projects and team management.
Typically a web application is developed using an
application server and a database server like the LAMP
stack where Apache is used as web server, MySQL engine
is used as the database engine and PHP is used as server-
side programming language. In this work, we present a
design on how to integrate a Wiki into the current
architecture and demonstrate its feasibility. By making use
of Wiki engine as a component in the web technology
stack, people can build lot of web applications, depending
on their needs, in a very easy and convenient way. It can be
used in many different scenarios. We have also built a
command like application known as Wiki Shell using
which people can write queries to fetch information from
Wiki Engine.
I. INTRODUCTION
The World Wide Web was developed with an
intention to create a pool of human knowledge which
people across time and space could share. WWW used to
be a simple application running over the internet.
However, as time progressed lots of advancements took
place and Web has now become a platform. In the last
decade the percentage of people using internet has grown
drastically. Numerous applications have been built now
using web as a platform. Social Networking sites, Wikis,
Online shopping portals, e-governance sites etc. are
examples of web applications. Web has changed the way
humans now live and collaborate. Almost everything is
available on the web now.
Figure 1.1: Evolution of WWW.
The system architecture defines how the pieces of the
application interact with each other, and what functionality
each piece is responsible for performing. Architecture of
web applications can be best defined by client-server
model [3]. The runtime image of a web application can be
depicted in the way as shown in figure 1.2.
83978-1-4673-0126-8/11/$26.00 c©2011 IEEE
Figure 1.2: Segmentation of Component
Wiki is a web application that allows users to
create and edit interlinked web pages in an easy and
collaborative manner. Wikis are becoming increasingly
popular. This is quite evident from the number of clicks
Wikipedia has everyday. During the period from 2001 to
early 2007, about 1.6 million articles were written on
Wikipedia [7]. Wiki software and platforms have gained
attention as a technology that promises to change forms of
work, education and commerce [8]. Wikis have become a
popular format for sharing knowledge among people with
common interests in academia and professional domains
[9]. Wiki has also been proven as an excellent platform
for cross-cultural collaboration [10].
Figure 1.3: Wiki as platform.
In this paper, we have pushed a Wiki engine into
the web technology stack just like sometime back
database engine was pushed. So now Wiki will also
become a platform(as shown in figure 1.3) and developers
will be able to make use of it for building complex web
applications. Making use of Wiki one can make lots of
web applications in a very easy and convenient manner. We
have also built a command line application known as Wiki
Shell using which users can write queries and can get the
required information quickly. One does not need to learn
anything new to edit a Wiki. It is like editing normal text.
Thus editing a Wiki page is easier compared to editing a
table in RDBMS or editing some text in HTML pages.
Therefore, information providers can directly edit Wiki
pages themselves and the web-pages will also get updated
automatically. Wiki provides another layer of abstraction
over database engine and hence is easy to visualize. This
will eliminate the need for having a database administrator
for maintaining web applications.
II. WIKI ENGINE AS COMPONENT The power of Wiki lies in simple usage and less
technical hurdles. To use a Wiki, clients (end users)
require no additional training or software. They can view
and edit a Wiki page inside a web browser. They need not
learn Hypertext markup language. Editing of Wiki pages is
done using extremely simple rules which are very easy to
remember as well. Typically every Wiki engine has the
following features –
• Edit: Wiki allows its users to edit Wiki pages.
• Inter-links: Each Wiki page can be linked to other Wiki
pages.
• Recent Changes: Wiki keeps a log of recent changes
made to Wiki pages.
Figure 2.1: Visualization of Wiki
• Version: Wiki also keeps previous versions of a Wiki
page so that users can roll back to the previous version if
they want to.
• Search: Wiki allows users to search for a Wiki page. As
each Wiki page has a unique title, Wiki allows searching
for Wiki pages.
A. Architecture of Wiki Engines
The architecture of Wiki is similar to that of a
database driven website. Wiki software, also known as
Wiki engine, is a server side script whose purpose is to
render Wiki pages which can be viewed inside a web
browser. The content of a Wiki page is written in simple
text which is then stored in a database. The Wiki text also
has some rules which specify how the text should be
rendered inside the browser.
When a Wiki page is accessed, client's browser
sends request to the server. Server extracts data from
database engine which is simple text in Wiki format. Wiki
script then translates this text into HTML and the web
84 2011 World Congress on Information and Communication Technologies
server sends it back to the browser and this is how users
view Wiki pages.
Figure 2.2: Work Flow of Wiki Engine
Let us look at the case of mediawiki engine [11].
In mediawiki, PHP is used as a server-side scripting
language and MySQL as the database engine. PHP reads
simple text from the MySQL engine and then checks this
text line by line and replaces formatting rules of Wiki text
by HTML constructs.
The architecture for web applications running
over Wiki engine is still client-server model but with a
one change. Now a Wiki Engine also sits along with a
Database Engine. Wiki Engine communicates with
application server and transfers required data to it which
is then sent to the client's browser. Figure 2.3
demonstrates this architecture:
Figure 2.3: Architecture for web applications running over
Wiki
The workflow in the applications running over
Wiki is similar to the database-driven websites with only
one change. The change is that this time the data will be
fetched from the Wiki engine. Figure 2.4 represents the
workflow.
• Client sends a request for a web page to web server.
• Web server reads the request and runs the server side
script.
• The script then executes the code and when the query
comes, it
is sent to the Wiki Interpreter.
Figure 2.4: Workflow of web applications running over Wiki
engine
• Wiki Interpreter then returns the required data by
extracting
from Wiki and then converting the same into HTML, to
the
daemon executing the server-side script.
• Web server sends back the generated HTML content to
the client
which is displayed in his/her browser.
B. Algorithm to Query Wiki
We have built an interpreter which takes a query
string as an input and returns a list of Nodes containing the
required data. We have named it Wiki Interpreter. Before
discussing the algorithm let us look at a couple of
underlying assumptions that we have made while
implementing it. One of them is that the title of every Wiki
page is unique. No two Wiki pages can the have same title
and most of the popular Wiki engines do not allow users to
create two Wiki pages with same title. Another one is that a
Wiki engine has a search feature which allows users to
search for a Wiki page. User only specifies the title of the
Wiki page that he wants to see. The Wiki interpreter then
makes use of the Wiki search feature and fetches the
required page.
2011 World Congress on Information and Communication Technologies 85
Figure 2.5: Algorithm to query a Wiki engine
Using Wiki Query Language[16], developers can
construct queries by wrapping actions around one another.
The list will keep on changing and at the end the developer
will have the required information. Let us now look at how
all this works. Initially, Wiki interpreter receives query
string either from a server side scripting language(JSP or
WSL[16]).
After receiving it, the interpreter parses the string
to know what needs to be done. Every time an action is
performed a list of Nodes is created and the subsequent
actions are then performed on the entire list. Now, when
Wiki interpreter fetches the data from Wiki it is in Wiki
text format and therefore, the list will also have the data in
Wiki format only.
However, for web application we need to return
data in HTML format so that it can be displayed inside a
web browser. So for that we have written a parser which
converts Wiki text into HTML. When the final list is
generated after executing the entire query, it is passed to
this Wiki-to-HTML parser and the text contained in the list
gets converted into HTML. This list is then returned to the
daemon executing server-side script(JSP or WSL). Figure
2.5 explains this algorithm.
III. WIKI SHELL We have built a command-line application known
as Wiki Shell which provides an easy and a faster way to
evaluate WSL expressions and get data from the Wiki. It
enables users to do quick prototyping and testing with
minimal fuss. To write complete WSL code, one needs to
add HTML tags. However, if someone simply wants to
check and validate the queries, Wiki Shell comes really
handy as here one does not have to worry about adding
HTML tags. Figure 3.1 shows the welcome screen of Wiki
Shell.
Figure 3.1: Welcome Screen of Wiki Shell.
Wiki Shell has been made by making changes in the
Groovy Shell also known as groovysh. We added our
functions to the Groovy Shell code and had to modify few
things. Groovy Shell supports several command line
options and arguments to control verbosity, ANSI
colouring and other features. The Wiki Shell understands
WSL syntax and evaluates expressions which are in WSL
syntax only.
# Wiki Shell variables are all un-typed. This will set a shell
variable
wsl:000> x = "Hello"
Users can now use this shell variable in later expressions.
For e.g. -
wsl:000> echo x
Figure 3.2: Evaluation of above queries on wiki shell
A. How to get started?
• Download the groovyshell zip file that we have provided.
• Extract the same in a directory/folder of your choice. The
extracted folder will look like as follows –
The extracted folder will look like as follows
86 2011 World Congress on Information and Communication Technologies
Figure 3.3: Process of Downloading Groovyshell
• Copy the .groovy folder present in this folder into C:/
Users <User Id> in case of Windows.
• Open command prompt or the terminal.
• Change directory to the location where groovyshell
folder has been extracted.
• Go to the bin folder present in that folder.
• Run wikish and you are ready to go.
IV. CONCLUSION A Wiki engine as a component in the technology
stack enables developers to make complex web applications
in an easy and convenient way. Wiki will become a
platform and lots of web applications can be built using
Wiki engines. It will find its usage in many different
scenarios. It will definitely reduce the development time as
time spent on database designing and form creation is
saved. Moreover, it is easier to edit information in a Wiki
page and this ensures that the web applications will always
have the current data. Using Wiki to build web applications
will eliminate the need of having a database administrator
as Wiki itself is a web application which can be accessed
through a web browser and anyone can maintain it.
REFERENCES [1] David F. DelGreco, "The World-Wide Web: a quick tour", ACM
SIGLINK, vol. 2, issue -2, pp. 8-9, September 1993.
http://portal.acm.org/citation.cfm?id=164399.164405. [2] Tim Berners-Lee, Robert Cailliau, Ari Luotonen, Henrik Frystyk
Nielsen, Arthur Secret, "The World Wide Web", Communications of the
ACM, vol. 37, issue 8, pp. 76-82, August 1994. http://portal.acm.org/citation.cfm?id=179606.179671.
[3] Sven Ziemer, "An Architecture for Web Applications", Essay in DIF
8914 Distributed Information Systems, November 2002. [4] Weiquan Zhao and David Kearney, "Deriving Architectures of Web-
Based Applications", Proceedings of the 5th Asia-Pacific web conference
on Web technologies and applications, pp. 301-312, 2003 [5] http://news.netcraft.com/archives/2010/02/22/february 2010 web
server survey.html
[6] D. A. Keim, H.P. Kriegel, "Issues in Visualizing Large Databases", Proc. Int. Conf. on Visual Database Systems (VDB-3), March 1995.
[7] Anja Ebersbach, Markus Glaser, Richard Heigl, Alexander Warta, "Wiki Web Collaboration", Springer, 2005
[8] Tapscott. D. and Williams, A.D. 2007 Wikinomics. How Mass
Collaboration Changes Everything. Penguin. NewYork. [9] Leuf, B. and Cunningham, W. The Wiki Way, Addison Wesley,
Longman, 2001.
[10] Nicole Schadewitz and Norhayati Zakaria, "Cross-cultural Collaboration Wiki Evolving Knowledge about International Teamwork",
Proceeding of the 2009 international workshop on Intercultural
collaboration, pp. 301-304, 2009.
[11] http://www.mediawiki.org/wiki/How does MediaWiki work [12] Peter Buneman, "Semistructured data", Proceedings of the sixteenth
ACM SIGACT-SIGMOD-SIGART symposium on Principles of database
systems, pp. 117-121, 1997 [13] Serge Abiteboul, "Querying Semi-Structured Data", Proceedings of
the 6th International Conference on Database Theory, pp. 1-18, 1997
[14] http://www.w3.org/XML [15] http://www.w3.org/QA/2002/04/valid-dtd-list.html
[16] Kaipa Kartik, "Design and implementation of a Wiki Query Language
and a Wiki Scripting Language", Masters' Thesis, Indian Institute of Technology, Kanpur, July 2010.
[17] Eric T Freeman, Elisabeth Robson, Bert Bates and Kathy Sierra,
"Head First Design Patterns", O'Reilly Media, October 2004, first edition. [18] http://www.antlr.org/about.html
2011 World Congress on Information and Communication Technologies 87