Documente Academic
Documente Profesional
Documente Cultură
Submitted by:
CERTIFICATE
Submitted by:
A partial fulfillment for BACHELOR OF COMPUTER ENGINEERING degree course of Mumbai University for year 2009-2010.
HOD (Prof. )
INTERNAL EXAMINER
PRINCIPAL
EXTERNAL EXAMINER
ACKNOWLEDGEMENT
No project is ever complete without the guidance of those expert how have already traded this past before and hence become master of it and as a result, our leader. So we would like to take this opportunity to take all those individuals how have helped us in visualizing this project. We express out deep gratitude to our project guide Mrs. for providing timely assistant to our query and guidance that she gave owing to her experience in this field for past many year. She had indeed been a lighthouse for us in this journey. We would also take this opportunity to thank our project co-ordinate Mr. for his guidance in selecting this project and also for providing us all this details on proper presentation of this project. We extend our sincerity appreciation to all our Professor form COLLEGE OF ENGINEERING for their valuable inside and tip during the designing of the project. Their contributions have been valuable in so many ways that we find it difficult to acknowledge of them individual. We also great full to our HOD Mrs. for extending her help directly and indirectly through various channel in our project work. .
ABSTRACT
In this project we describe an operating system based on the web or what is known as INTERFACE TO CLOUDE COMPUTING. This specific name has started as a computing research project at an American universities then developed to be an operating system that provides basic operating systems services needed to build applications that are geographically distributed, highly available, incrementally scalable, and dynamically reconfiguring. Interface to Cloude Computing is a computing environment running within a web browser. User can run applications (i.e. IM, word processor) from within the "desktop". It's quite similar to many Ajax based web applications on the net right now (i.e. Writely), except that this web application/service is a desktop that allow more functions to be performed inside it. In addition, it is accessible from anywhere with net connection. This makes Interface to Cloude Computing very mobile as people can use it everywhere. The main parts of the system are: web browser, web application, and web server. INTERFACE TO CLOUDE COMPUTING in three categories: Remotely Hosted Interface to Cloude Computing, SelfHosted Interface to Cloude Computing, and Remote Desktops.
INDEX
SR.NO 1) 2) 3) 4) 5) 6) 7) 8) 9) 10) 11) 12) 13) INTRODUCTION LITERATURE SURVEY PROBLEM DEFINITION REQUIREMENT ANALYSIS PLANNING AND ESTIMATION 15 ALGORITHM 22 IMPLEMENTATION ADVANTAGES & DISADVANTAGES FUTURE MODIFICATIONS APPLICATION BIBLIOGRAPHY SCREENSHOTS SOURCE CODE
TITLE
PG.NO 1 5 8 11
13
27
29
31 33 48
Chapter 1 INTRODUCTION
INTRODUCTION
This document is an introduction to the application development for the Interface to Cloude Computing web Operating System. Some PHP knowledge is required to read this document, and it is not necessary to have experience programming with CSS, JavaScript or XHTML, although knowing these technologies will help you understand better Interface to Cloude Computing and its internal functioning. 1.1 What is Interface to Cloude Computing Interface to Cloude Computing is a computing environment running within a web browser. User can run applications (i.e. IM, word processor) from within the "desktop". It's quite similar to many Ajax based web applications on the net right now (i.e. Writely), except that this web application/service is a desktop that allow more functions to be performed inside it. One note characteristic of the Interface to Cloude Computing is the capability to connect and access to storage like local disk. in addition, it is accessible from anywhere with net connection. This makes Interface to Cloude Computing very mobile as people can use it everywhere. But that's not all - a Interface to Cloude Computing should be an expandable platform (just like Windows) that gives developers the right tools (IDE, APIs) to develop new applications and add new utilities. And that's the advantage of a Web-based "OS" - it gives you the new ability to use it remotely and not be restricted to one PC. This is a huge need in today's world, because increasingly we use more than one computer from various different locations. So each time we sit down to a computer, a different scene awaits us - different applications and different documents. Interface to Cloude Computing can solve this inefficiency, by taking your productivity with you everywhere you go. Everywhere Any Place 2 User DATA files
Any Device
USE R
applications, created with the idea to make easy the application development. There are currently a lot of web-related technologies, such as PHP, XHTML, CSS and JavaScript, so it is required to master a lot of languages and understanding numerous concepts to be able to create web applications. In addition, every web browser has a different interpretation of the code and every PHP version and configuration works slightly different from the others. Interface to Cloude Computing intends to cover those and other problems derived from the web development, offering the programmers a homogeneous platform to develop their web applications, using only PHP code and leaving to the system the resource management, the communication with the browser, the security, etc
A new Interface to Cloude Computing: this is not a comprehensive list - many operating systems do far more than this, often blurring the distinction between OS and application .It's fair to say though, that most operating systems do everything on this list and do it well. The common user, we would venture, hardly notices the seamless integration between application, OS, and hardware.
Before studying the Interface to Cloude Computing components, we must know its basic structure. The platform is created over a client-server architecture, in which Interface to Cloude Computing is the server, and the client is usually a web browser. Note: Unless specifying the contrary, this manual will assume the client is a web browser.
1.3 The Kernel
The first step we must take to know Interface to Cloude Computing is the study of its kernel. Since Interface to Cloude Computing is a microkernel-based platform, the kernel is only thought to unify the system services. In other words, Interface to Cloude Computing has many services for specific tasks, and the kernel is responsible for its communication and location. With this architecture, applications don't need to specify how to invoke a service, they just need to know its name, and the kernel does the rest of the job.
1.4 System Services
The Services in Interface to Cloude Computing perform low-level tasks. For example, the applications do not manipulate files directly: instead of that, they use a service designed for that purpose. Thus, security is guaranteed since the services apply restrictions to the applications' requests. The only form to communicate with a service is the kernel, as stated above in section 1.2. To do that, the service() function (defined in system/kernel/kernel.php) must be used. service() takes 3 arguments: service( string $servicename , string $functionName [, array $params] ); The first argument specifies the name of the service to call. In Interface to Cloude Computing there are eight services, and they will be studied later. The second argument corresponds to the function to call, given that a service is a collection of functions and we must specify what function we want to 4
use. For example, if we are using the filesystem manager service, we need to specify if we want to copy, delete or create a file. The third and last argument is an array containing the parameters passed to the function. For example, if we are using the filesystem manager service, we need to tell it which file we want to delete. An example of a call would be: service('vfs','delete',array('file.txt')); This code would call the vfs service (the filesystem manager) to delete a file named file.txt.
1.5 Libraries
The libraries in Interface to Cloude Computing are similar to the services. They too are called using the kernel, but unlike the services, they do not handle low level tasks (such as files, users or processes), instead they make the development of applications easier, making available sets of functions the applications might need. PHP: Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. As a general-purpose programming language, PHP code is processed by an interpreter application in command-line mode performing desired operating system operations and producing program output on its standard output channel. It may also function as a graphical application. PHP is available as a processor for most modern web servers and as standalone interpreter on most operating systems and computing platforms. PHP was originally created by Rasmus Lerdorf in 1995 and has been in continuous development ever since. The main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification. PHP is free software released under the PHP License.
XML
XML (Extensible Markup Language) is a set of rules for encoding documents in machinereadable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards. XML's design goals emphasize simplicity, generality, and usability over the Internet. It is a textual data format, with strong support via Unicode for the languages of the world. Although XML's design focuses on documents, it is widely used for the representation of arbitrary data structures, for example in web services. There are many programming interfaces that software developers may use to access XML data, and several schema systems designed to aid in the definition of XML-based languages.
Basic services
There are 8 services in Interface to Cloude Computing, which are: extern eyeX log mmap proc sec um vfs They are located in the Interface to Cloude Computing/system/services/ directory. 2.1 VFS, Virtual File System One of the most important services in Interface to Cloude Computing is VFS, which is the responsible of providing functions to work with files and directories. Absolutely no operation with files must be performed directly using PHP functions such as fopen() and unlink(). The VFS service must always be used in these operations. VFS guarantees that a user is unable to read or edit another user's files. If an application executed by a user requests VFS to read a file over which the user does not have enough permissions, VFS will return false and will activate the error code VFS_INSUFFICIENT_PERMISSIONS (read chapter 3.1). Thus, it's VFS that ensures the security and not the applications. The applications do not need to 8
worry whether the user has enough permissions on a file. The VFS internal work is done in a modular way. This means that the VFS functioning can be modified using new modules. The default module is the virtual module, although it can be specified which module to use changing the value of the VFS_MODULE parameter on the settings.php file. The virtual module uses two files for every file the user creates. One file is used to store the content of the file and other file is used to store information about it using the XML format. In addition, the virtual module concatenates a 32 character length random string to every file name, making it impossible to guess from the outside the name of a file. For example, if we call VFS with the virtual module to create a file: service('vfs','create',array('file.txt')); The system will actually create two files, being one called: file.txt_[RANDOM_STRING].webFile, which will store the content of the new file. And another called: file.txt_[RANDOM_STRING].webInfo, which will contain information about the new file, such as its author, its real name (file.txt) and the creation date. VFS always manages these lowlevel tasks. For example, if we want to delete the file called file.txt we just need to call VFS once and both files will be deleted: service('vfs','delete',array('file.txt')); If we want to open the file to read it: $fp = service('vfs','open',array('file.txt','r')); and from here we can use the file resource $fp using fread(), fwrite() and fclose() from PHP. The opening modes of VFS open are the same as the fopen() function used in PHP. Apart from this method using pairs of files, the virtual module has methods to deal with normal files which do not use the webInfo and webFile pairs. These methods are called real methods. The real methods work exactly like the virtual ones, but their name is preceded with the prefix real_. Let's see an example: service('vfs','real_create',array('file.txt')); This code would generate a file called file.txt in the system. It would not create an webFile and webInfo file. The reason there exist real methods (real_open, real_create, real_delete, etc) and virtual methods 9
(open, create, delete) is that a user's files are stored as virtual files to control their creation date, their author and other parameters, while the system files, such as a user's configurations, are real files. As stated in chapter 2.2, every user has a home directory to work in. Inside every home directory there are: conf/ - the configuration files are stored here as real files with XML format. files/ - the virtual files (using webInfo and webFile) are stored here, and are visible to the user from the File Manager. The form to decide whether to use a virtual or a real method is as simple as thinking: Do I need to work with a user's file or with a configuration file? One detail to bear in mind is that the real functions do not have the same restrictions as the virtual ones. The virtual functions have permissions to read and write the files in the files/ directory of a user's home, and to create files in the groups' directories where the user belongs (see chapter 6). Inside a group's directory, the virtual functions can only edit and delete files that belong to the user. The real functions have permissions to create and edit files everywhere in a user's home (including files/, conf/, etc), but they have no read nor write permissions on the groups's folders. These restrictions exist for security reasons. It would be dangerous that real files of groups could be altered, so they can only be accessed with virtual functions. 2.2 UM, User Manager The UM service manages the users in the system and provides the methods necessary for registering, logging in, obtaining the path to a user's home, etc. One important characteristic is that UM provides a global variable accessible at any place, called $currentUser, which contains the username of the current user. For example: global $currentUser; This way, applications can know which user executes them. Furthermore, UM provides indispensable methods to build applications, like getCurrentUserDir(), which returns the path to the current user's home directory. For example: $path = service('um','getCurrentUserDir'); Knowing the path to the home of the user that executed the application is useful to save files. Let's imagine, for example, we are creating a text editor and we want to save what the user wrote (using methods explained later) to a file called 'myFile.txt' inside of the Documents folder of the user's home: 10
$path = service('um','getCurrentUserDir'); //We get the user's home dir $path .= 'files/'; //We add files/ since user's files are in this folder $path .= 'Documentors/myFile.txt'; //We add the rest of the path to the file service('vfs','create',array($path)); With this code, we have created the empty file. For that process, we needed to obtain the path to the user's home directory to create the file.
2.3 MMAP Message Mapping Before introducing MMAP, we must first get to know the communication between the client and the server. The Interface to Cloude Computing applications reside in the server, storing and processing the data in it, being for the client the medium to visualize and interact with the application. For example, the client is responsible of displaying a window, or sending a message to the server indicating a button has been clicked. The communication between the client and the server is done via messages. A message is a petition made by the client to the server, sending or asking certain information. Now that we know what a message is, we can move on and explain how MMAP takes part in this process. MMAP is responsible for routing every received message in the server to the applications. A good comparison could be made with a postal system. When a mail arrives to the post central, it is classified according to its addressee, and finally it is delivered by the postman. MMAP would do the parts of organizing and delivery, since it classifies and transmits the message to the applications. As a final note, you must know that MMAP is an automated service: it does not require any interaction with the developer at all. Nevertheless, it is important to know how to receive its messages.
2.4 PROC
PROC is responsible for the process managing, and provides methods to launch, end, list processes, etc. When an application is launched with PROC, two very important variables for the application development are defined: myPid and checknum. myPid is a unique 4 characters length numerical value that identifies every process and checknum, just like myPid, is a unique number, although it is 8 characters length and identifies every process in the client-server 11
communication. In this application, application app1 executes the application app2 and then it terminates itself. global $myPid; //Pid of application app1 $pid = $myPid; //We store the pid in another variable service('proc','launch',array('app2'); //We call launch, indicating the name of the application to open service('proc','close',array($pid); //We call close indicating the pid of app1 PROC provides a wide variety of process managing methods, not limited to launching or closing applications. For example, the findPidByName() function, locates a given process with specified pid and returns the name of its application name.
2.5 eyeX
As said in chapter 2.3, the mmap service manages the messages coming from the client. All messages have a response in XML format, which is interpreted by the browser. The response XML contains basic orders to modify the interface of the client. For example, we create a button that creates a new window when it is clicked: In the first case, the message goes from the browser to the server. In the second case, the response to the message includes the orders for the browser to create a new window. The eyeX service is the responsible for managing the response XML sent by the server. The applications request eyeX basic operations, such as creating windows or showing an image, and it is eyeX that transforms those orders in an XML message. For example, we can use eyeX to create a message box in the browser, just calling eyeX with service(): service('eyeX','messageBox',array('content'=>'This is a message')); 2.6 Extern, external file manage The extern service allows the client to download files from the server. Those files must be located inside the extern/ directory. Extern allows to create URLs accessible from the outside, allowing to host images, CSS files, JavaScript files, etc. Its working is very simple: if we want to get a file called style.css inside of a directory called 'test' located in Interface to Cloude Computing/extern/ we just should use the URL: index.php?extern=test/style.css This service exists to allow the developers to use images, stylesheets and other files in their 12
applications, without worrying about the Interface to Cloude Computing/ directory is not visible from the outside. 2.7 Log Log does not require any interaction with the developer. It works autonomously registering the system's activity to log files, annotating the time and user of every action. Its presence does not reverberate at all at the time of building applications. 2.8 Sec Sec is another autonomous system service, although it reverberates on the developers, unlike the log service. Sec is responsible of making Interface to Cloude Computing run in a secure environment. To do that, it disables PHP's magic_quotes and register_globals when initiating. Thus it's not necessary to worry whether these options are enabled or not: you will always see them disabled.
13
Cloud computing has matured from buzzword to a dynamic infrastructure used today by several organizations, yet many technology experts have differing views about what it means to the IT landscape and what cloud computing can do for business. However, leading analystsincluding thought leaders from Gartner, Forrester, and IDCagree that this new model offers significant advantages for fast-paced startups, SMBs and enterprises alike. In the following sections, you'll learn about cloud computing defined, cloud characteristics, drivers for adoption, public clouds vs. private clouds, how enterprises are using the cloud, and the future of cloud computing. Today, forward-thinking business leaders are using the cloud within their enterprise data centers to take advantage of the best practices that cloud computing has established, namely scalability, agility, automation, and resource sharing. By using a cloud-enabled application platform, companies can choose a hybrid approach to cloud computing that employs an organization's existing infrastructure to launch new cloud-enabled applications. This hybrid approach allows IT departments to focus on innovation for the business, reducing both capital and operational costs and automating the management of complex technologies.
15
16
Hardware and Software requirements Hardware: 1. Processor: Pentium 4 2. RAM: 512 MB or more 3. Hard disk: 16 GB or more Software
1.
WAMP Server OR
1.
17
18
Software development Life Cycle The entire project spanned for duration of 6 months. In order to effectively design and develop a cost-effective model the Waterfall model was practiced.
Requirement gathering and Analysis phase: This phase started at the beginning of our project, we had formed groups and modularized the project. Important points of consideration were
19
1 Define and visualize all the objectives clearly. 2 Gather requirements and evaluate them. 3 Consider the technical requirements needed and then collect technical specifications of various peripheral components (Hardware) required. 4 Analyze the coding languages needed for the project. 5 Define coding strategies. 6 Analyze future risks / problems. 7 Define strategies to avoid this risks else define alternate solutions to this risks. 8 Check financial feasibility. 9 Define Gantt charts and assign time span for each phase. By studying the project extensively we developed a Gantt chart to track and schedule the project. Below is the Gantt chart of our project.
TimeLine
20
Task Name
ID
Start
Finish
Duration
Requirement gathering
7/29/09
8/19/09
3 Weeks
Problem definition
8/12/09
8/19/09
1 Week
Literature survey
8/19/09
9/16/09
4 Weeks
Analysis
9/2/09
9/16/09
2 Weeks
Flowchart
9/16/09
9/23/09
1 Week
Block diagram
9/30/09
10/14/09
2 Weeks
Cost Estimation
H/W specification
10/7/09
10/14/09
1 Week
S/W specification
10/7/09
10/14/09
1 Week
21
cost Drivers Product attributes Required software reliability Size of application database Complexity of the product Hardware attributes Run-time performance constraints Memory constraints Volatility of the virtual machine envir onment Required turnabout time Personnel attributes Analyst capability Applications experience Software engineer capability Virtual machine experience Programming language experience Project attributes Use of software tools Application of software engineering methods Required development schedule
Very Extra High High 1.40 1.16 1.30 1.30 1.21 1.30 1.15 0.71 0.82 0.70
23
Chapter 5
ALGORITHM
Structure of an application One important thing you should know to manage in Interface to Cloude Computing is the structure of an application. The directory and files tree of an application is as follows: Interface to Cloude Computing/apps/ -Directory that contains the PHP code of each application Interface to Cloude Computing/apps/Application/ -Application's main directory
24
Interface to Cloude Computing/apps/Application/apps.php -Initializing and ending code of an application Interface to Cloude Computing/apps/Application/events.php -Event reception code Interface to Cloude Computing/extern/apps/Application -Main directory for the external resources of an application The files and directorios marked in bold are required for an application to work properly. We will focus to explain the use of every file and directory in the next sections. 4.4 Initializing an ending of an application The initialization and ending of an application is contained in the apps.php file. This file contains two functions: ApplicationName_run: function called by PROC when launching an application. ApplicationName_end: function called by PROC when terminating an application in case it exists. The only required function in this file is the _run function. Its use varies enormously depending of the kind and size of the application. A graphical application normally uses it to initialize the User Interface, but non-graphical and small applications concentrate all their code in this function. 4.5 Events An event is described as an interaction by the user with the interface of our application. For example, when a user clicks a button an event is produced. The generated information of every event is sent to the server in the form of a message. As we explained above, the responsible part of treating those messages is the MMAP service. MMAP is able to deliver every message thanks to the fact that each message contains the checknum of the addressee application and the name of the event. To deliver the message, MMAP finds a file named events.php in the directory of the 25
addressee application and tries to call a function named ApplicationName_on_EventName, passing as an argument the body of the message. 4.6 Extern Using extern in our application is very easy. We only have to place the file we want to access in extern/apps/ApplicationName/ and then use a URL to the file as stated. The use of extern in an application is quite useful since it allows to load icons, CSS files, images,etc. 4.7 Explained Example Now that we know how the files and functions affect an application's working, it is time to see an example: apps.php: //Initializing function that created the interface function webBasic_run($params=null) { //Window widget $myWindow1 = new Window(array( 'name' => 'webBasic_WND', 'father' => 'webApps', 'cent' => 1, 'width' => 250, 'height' => 150, 'title' => 'Example webApp' )); //We draw the window now that it is defined $myWindow1>show(); //Button widget $myButton1 = new Button(array( 'name'=>'webBasic_BTN', 'father'=>'webBasic_WND_Content', 'caption'=>'I'm a basic webApp. Click me!', 26
'x'=>40, 'y'=>80, 'signal'=>'buttonPress' )); //We draw the button $myButton1>show(); } //Ending function: it removes the interface function webBasic_end($params=null) { webWidgets('unserialize'); } As we can see, the initializing function of the application only creates the interface. It is not time to explain how the Interface to Cloude Computing Toolkit works right now, however it is important to notice in the parameter called 'signal' in the button widget. events.php: //Function that receives the event generated when the button is clicked function webBasic_on_buttonPress($params="") { //We show a message indicating that the button has been pressed service('webx','messageBox',array('content'=>'The Button has been pressed!')); } //Function that receives the event generated when the window is closed function webBasic_on_Close(){ //We make the application terminate itself service('proc','end'); } The event receiver functions have a characteristic syntax as explained earlier, and are always called by MMAP. As we can see, the name of the event 'buttonPressed' matches the content of the signal parameter of the button.
27
28
Chapter 6
IMPLEMENTATION
29
DFD
Login
Authenticated
Verification
Services
Process managemen t 30
Interface
Index.php
Index.php
Include Kernel.php
Loading Services
31
Application :
App.php
On Button Click
Call app.Js es
32
Chapter 8 ADVANTAGES
33
ADVANTAGES: Worldwide availability: As its available through internet Requires only browser: A browser with java support is more than enough Dynamic content and design: Interface can be customized according your needs, windows are floating so that they can be repositioned Extensive list applications: Office applications, multimedia applications, network applications etc. are available. Remote storage facility: Through the file browser you can store files over the internet and edit them as you want. Browser and Platform independent: All browsers and all operating systems are supported. Rich text editing facility
1. Software as a Subscription
In a cloud, software resides on a service providers servers external to a users computer. In a sense users would not have to buy software for their computers because the software is loaded per use while the user is online (via a browser or some kind of connector application). The only models that would support this type of software use would be a subscription based or pay as you go model. Instead of shelling $149 for Office Home & Student, a user may pay a set fee/month; say $5.95/month and the user can tailor their subscription to meet their needs. This will keep users from buying software that is bundled with applications the user may not care for. A perfect example of this is the Office Suite.
issues, and/or introduce new functionality. When upgrades are made to software on the cloud it does not affect the user's computer, it would not require for the user to restart their computers, it would simply mean that unless the change affects functionality or visual elements, the user will be oblivious to those updates and their computers will never be affected by those updates. A reasonable reduction in systems maintenance would be expected as a result of this.
3. Increased Reliability
Increased reliability stems from the fact that the cloud runs on systems that are extremely reliable and provide some form of redundancy. Unless a user takes the time to setup a backup system for their files or sets up some kind of redundancy with offsite backups, etc. Users run the risk of losing valuable and sometime unrecoverable data on their computers. In the case of grid computing if a storage server on the cloud fails due to hardware or software issues, the service provider needs only to shift the load over to other servers or bring up a backup server in its place. If it occurred at a users premises with installed software a simple issue can turn to hours of technical support over the phone, costly downtime, and unhappy users and customers.
4. Increased Scalability
Running out of hard drive space at home? Looks like an additional hard drive along with a visit to a computer technician for installation will solve the problem. However in a cloud computing environment, storage is not an issue, as long as you can pay for it. Service providers need only to add servers or shift load from one server to another to accommodate for the additional use of space. The same goes for application use, instead of a small business adding additional servers to handle business transactions all they have to do is contact the service provider to let them know that they will need additional resources.
5. Cost Reduction
Costs are reduced in a number of ways. Capital expenditures are reduced because a lot of the load and storage will be shifted over to the service provider who can provide that service at a lower cost. Aside from decreased capital expenditures associated with hardware purchases, users would see the cost of software decrease due to the reduced cost of subscription software. IT staff 35
at businesses would be reduced because the majority of the maintenance is performed at the service provider.
6. Environmentally Friendly
One of the greatest advantages of cloud computing is the increased longevity and use of older hardware used by datacenters. This in turn lessens the amount of electronic waste dumped because equipment is older and increased use of those resources. When businesses use current assets instead of purchasing additional hardware they reduce the size of their carbon footprint because it is one less server that is put into service, it is one less server that is consuming electricity .
8. Portability/Accessibility
One the greatest advantages to grid computing is the availability of files and software anywhere that there is an active internet connection. This brings forth added accessibility and productivity for those that are on the road and require access to files and software. With a large number of companies looking for alternatives to employees working at the office and the increasing number of employees making up a mobile workforce. The reduction in application costs and technical support would easily continue to support this trend towards a mobile workforce that would utilize the computer grid.
36
37
Chapter 9 APPLICATION
38
39
40
FUTURE MODIFICATION
1. Make system capable to run higher processes. 2. Add new higher applications
41
Chapter 11 BIBILIOGRAPHY
42
BIBLOGRAPHY
[1] World intellectual http://www.wipo.int/. property organization WIPO. Located on the Internet at
[2] Mashable Located on the Internet at http://mashable.com/2007/08/22/Interface to Cloude Computing. [3] Wikipedia. Located on the Internet at http://en.wikipedia.org/wiki/Web_operating_system. [4] kotte.org . Located on the Internet at http:// kottke.org/ 05 /0 8/ go o gl e o s- we bo s. [6] ZD net Located on the Internet at http://blogs.zdnet.com/web2explorer/?p=166. [5]YouOS net Located on the Internet at http://www.youos.com/html/static/manifesto/what.html. . [6] Read Write web . Located on the Internet at http://w ww.readw riteweb.co m/ar chives/gravity zoo_rev iew.php. [7] Wikipedia. Located on the Internet at http://en.w ikipedia.org/wiki/Webtop
43
Chapter 12 SCREENSHOTS
44
1. Login:
45
2.Desktop:
3.HOME:
46
4.Browser:
5.Chess Game
47
6.Process Manger
48
7.Control Panel
49
50
Calculator: App.php
<?php 51
function Calc_run($params=null) { global $myPid; global $checknum; $myWindow = new Window(array( 'name' => 'CalcWND', 'father' => 'eyeApps', 'title' => 'Calculator', 'cent' => 1, 'width' => 147, 'height' => 240, 'type'=>NORESIZE_WINDOW, 'savePosition' => 1 )); $myWindow->show(); $tboxInput = new Textbox(array( 'name' => 'display', 'father' => 'CalcWND_Content', 'width' => 130, 'x' => 5, 'y' => 5, 'text' => '0' )); $tboxInput->show(); $tboxInput->setAlign('right'); $tboxInput->setCss(array('height'=>'25px')); $tboxInput->setCss(array('font-size'=>'22px')); $x = 5; $y = 145; $counter = 1; for($i=1;$i<4;$i++) { for($d=1;$d<4;$d++) { $name = 'bttn'.$counter; $$name = new Button(array( 'name' => 'bttn'.$counter, 'father' => 'CalcWND_Content', 'width' => 30, 'height' => 30, 'x' => $x, 'y' => $y, 'caption' => $counter, 'disablemsg' => 1 )); 52
$$name->show(); $x = $x+35; $counter++; } $y = $y-35; $x = 5; } $bttn0 = new Button(array( 'name' => 'bttn0', 'father' => 'CalcWND_Content', 'width' => 30, 'height' => 30, 'x' => 5, 'y' => 180, 'caption' => '0', 'disablemsg' => 1 )); $bttn0->show(); $bttnchangesign = new Button(array( 'name' => 'bttnsign', 'father' => 'CalcWND_Content', 'width' => 30, 'height' => 30, 'x' => 40, 'y' => 180, 'caption' => '-/+', 'disablemsg' => 1 )); $bttnchangesign->show(); $bttnAdd = new Button(array( 'name' => 'bttnAdd', 'father' => 'CalcWND_Content', 'width' => 30, 'height' => 65, 'x' => 110, 'y' => 75, 'caption' => '+', 'disablemsg' => 1 )); $bttnAdd->show(); $bttnSubstract = new Button(array( 'name' => 'bttnSubstract', 53
'father' => 'CalcWND_Content', 'width' => 30, 'height' => 30, 'x' => 110, 'y' => 40, 'caption' => '-', 'disablemsg' => 1 )); $bttnSubstract->show(); $bttnMultiply = new Button(array( 'name' => 'bttnMultiply', 'father' => 'CalcWND_Content', 'width' => 30, 'height' => 30, 'x' => 75, 'y' => 40, 'caption' => '*', 'disablemsg' => 1 )); $bttnMultiply->show(); $bttnDivide = new Button(array( 'name' => 'bttnDivide', 'father' => 'CalcWND_Content', 'width' => 30, 'height' => 30, 'x' => 40, 'y' => 40, 'caption' => '/', 'disablemsg' => 1 )); $bttnDivide->show(); $bttnDot = new Button(array( 'name' => 'bttnDot', 'father' => 'CalcWND_Content', 'width' => 30, 'height' => 30, 'x' => 75, 'y' => 180, 'caption' => '.', 'disablemsg' => 1 )); $bttnDot->show();
54
$bttnEqual = new Button(array( 'name' => 'bttnEqual', 'father' => 'CalcWND_Content', 'width' => 30, 'height' => 65, 'x' => 110, 'y' => 145, 'caption' => '=', 'disablemsg' => 1 )); $bttnEqual->show(); $bttnClear = new Button(array( 'name' => 'bttnClear', 'father' => 'CalcWND_Content', 'width' => 30, 'height' => 30, 'x' => 5, 'y' => 40, 'caption' => 'CE', 'disablemsg' => 1 )); $bttnClear->show(); service('eyex','loadScript',array('url'=>'index.php? version='.EXTERN_CACHE_VERSION.'&extern=apps/Calc/Calc'.WEB_CODE_EXTEN SION.'&type=dynamic¶ms[]='.$myPid.'¶ms[]='.$checknum)); } function Calc_end($params=null) { reqLib('Widgets','unserialize'); } ?>
Sessions: <?php 55
define('COOKIE_ID','PHPSESSID'); define('COOKIE_EXPIRE','2147483647'); define('IPC_TYPE','File'); define('FLASH_UPLOAD_FIX','flash_fix'); function lib_Sessions_startSession($params=null){ global $sessionId; //Register the save session function to call it at the final of this script register_shutdown_function('reqLib','Sessions','saveSession'); //If already has a id (and posible session) $sessionId = Sessions('getSessionId'); if($sessionId != false){ //If session exists if(reqLib('IPC','isSet',array($sessionId,IPC_TYPE))){ $_SESSION = reqLib('IPC','getVar',array($sessionId,IPC_TYPE)); if(!is_array($_SESSION)){ $_SESSION = array(); } return true; } } //Creating the new session $sessionId = md5(uniqid(rand())); setcookie(COOKIE_ID,$sessionId,COOKIE_EXPIRE); $_SESSION = array(); return true; } function lib_Sessions_checkAndSstartSession(){ //Getting the possible session ID $sessionId = Sessions('getSessionId'); //Checking the there are an ID and if it exists as session if($sessionId != false && reqLib('IPC','isSet',array($sessionId,IPC_TYPE))){ Sessions('startSession'); } } function lib_Sessions_getSessionId(){ global $sessionId; //If the petition already have a sessionId, just return it. if(!empty($sessionId)){ 56
return $sessionId; } //If the request doesn't have a sessionId, we have to check if the user have sent it via $_REQUEST //Flash fix, //TODO: Documment the flash trick if(isset($_GET[FLASH_UPLOAD_FIX]) && isset($_GET[COOKIE_ID])){ return $_GET[COOKIE_ID]; } if(isset($_REQUEST[COOKIE_ID])){ return $_REQUEST[COOKIE_ID]; } return false; } //single var operations function lib_Sessions_setVar($params) { if(!isset($params[0]) || !isset($params[1])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $varName = $params[0]; $varValue = $params[1]; if(!isset($_SESSION[$varName])){ $_SESSION[$varName]; } $_SESSION[$varName] = $varValue; } function lib_Sessions_getVar($params){ if(!isset($params[0])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $varName = $params[0]; return $_SESSION[$varName]; } function lib_Sessions_delVar($params){ if(!isset($params[0])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $varName = $params[0]; unset($_SESSION[$varName]); } 57
function lib_Sessions_checkVar($params){ if(!isset($params[0])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $varName = $params[0]; if(isset($_SESSION[$varName])){ return true; } else { return false; } } //array operations function lib_Sessions_makeArrayVar($params) { if(!isset($params[0])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $varName = $params[0]; $_SESSION[$varName] = array(); } function lib_Sessions_addArrayValue($params) { if(!isset($params[0]) || !isset($params[1])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $varName = $params[0]; $varValue = $params[1]; if(!isset($_SESSION[$varName]) || !is_array($_SESSION[$varName])){ $_SESSION[$varName] = array(); } array_push($_SESSION[$varName],$varValue); } //array with keys function lib_Sessions_addArrayValueByKey($params) { if(!isset($params[0]) || !isset($params[1]) || !isset($params[2])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $varName = $params[0]; 58
$varValue = $params[1]; $key = $params[2]; if(!isset($_SESSION[$varName]) || !is_array($_SESSION[$varName])){ $_SESSION[$varName] = array(); } $_SESSION[$varName][$key] = $varValue; } function lib_Sessions_delArrayValueByKey($params) { if(!isset($params[0]) || !isset($params[1])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $varName = $params[0]; $varKey = $params[1]; unset($_SESSION[$varName][$varKey]); } function lib_Sessions_getArrayValueByKey($params) { if(!isset($params[0]) || !isset($params[1])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $arrayName = $params[0]; $position = $params[1]; return $_SESSION[$arrayName][$position]; } function lib_Sessions_checkArrayValueByKey($params) { if(!isset($params[0]) || !isset($params[1])){ errorCodes('setErrorCode',array(INCORRECT_PARAMS)); return false; } $varName = $params[0]; $varKey = $params[1]; if(isset($_SESSION[$varName][$varKey])) { return true; } else { return false; } } function lib_Sessions_saveSession(){ global $sessionId,$externRequest; //If the petition is a extern request, the session is not saved (read only mode). if(!empty($externRequest) && $externRequest == true){ 59
return true; } //If sessionId is not pressent, don't save any session. if($sessionId == ''){ return true; } //Use __FILE__ is better than use some "custom environment vars you get when is used under some httpd $dir = dirname(__FILE__) . '/../../../'; chdir($dir); //save the session reqLib('IPC','setVar',array($sessionId,$_SESSION,IPC_TYPE)); return true; } function lib_Sessions_endSession(){ global $sessionId; reqLib('IPC','rmVar',array($sessionId,IPC_TYPE)); //Deleting $_SESSION content $_SESSION = array(); //Deleting session ID $sessionId = ''; return true; } ?>
60