Wednesday, May 19, 2010

Execrise 16

Business Process Analysis

An operation is composed of processes designed to add value by transforming inputs into useful outputs. Inputs may be materials, labour, energy, and capital equipment. Outputs may be a physical product (possibly used as an input to another process) or a service. Processes can have a significant impact on the performance of a business, and process improvement can improve a firm's competitiveness.
The first step to improving a process is to analyse it in order to understand the activities, their relationships, and the values of relevant metrics. Process analysis generally involves the following tasks:
·         Define the process boundaries that mark the entry points of the process inputs and the exit points of the process outputs.
·         Construct a process flow diagram that illustrates the various process activities and their interrelationships.
·         Determine the capacity of each step in the process. Calculate other measures of interest.
·         Identify the bottleneck, that is, the step having the lowest capacity.
·         Evaluate further limitations in order to quantify the impact of the bottleneck.
·         Use the analysis to make operating decisions and to improve the process
Enterprise resource planning (ERP) is an integrated computer-based system used to manage internal and external resources including tangible assets, financial resources, materials, and human resources. It is a software architecture whose purpose is to facilitate the flow of information between all business functions inside the boundaries of the organization and manage the connections to outside stakeholders. Built on a centralized database and normally utilizing a common computing platform, ERP systems consolidate all business operations into a uniform and enterprise wide system environment.
Customer relationship management is a broadly recognized, widely-implemented strategy for managing and nurturing a company’s interactions with clients and sales prospects. It involves using technology to organize, automate, and synchronize business processes—principally sales activities, but also those for marketing, customer service, and technical support. The overall goals are to find, attract, and win new clients, nurture and retain those the company already has, entice former clients back into the fold, and reduce the costs of marketing and client service.
Workflow management is a system of overseeing the process of passing information, documents, and tasks from one employee or machine within a business to another. Through proper workflow management, each of these employees or machines will pass the work on according to a predetermined procedure. As technology advances, much workflow management has become automated and takes advantage of special software to make the process much smoother
Reference:-
http://en.wikipedia.org/wiki/Customer_relationship_management

Execrise 13

1. Develop the class diagram for the following shopping cart specifications:
    A shoppingCart object is associated with only one creditCard and customer and to items in itemToBuy object. Persistent customer information such as name, billing address, delivery address, e-mail address and credit rating is stored in the customer object. The credit card object is associated with a frequentShopper discount object, if the credit rating for the customer is good. The customer can make or cancel orders as well as add and delete items to the shopping cart product. The credit card object contains the secure method for checking that the charge is authentic.
     
     

Exercise 12

Examine the Use Case in the above Figure,  and explain the MVC architecture of the online bookstore (the model the view and controllers) needed to Lookup Books and Add to Shopping Cart
MVC or Model View Controller, has been developed to match the input-process-output model in the GUI realm.  This model enable modifications to be made easy by isolating data logic and user interface.
MVC consist of 3 elements.
The Model, act as the data element mapping , which is often some objects that will connect to the database or data source make the query and send the data to the view through the controller.
The View is responsible for the output and will automatically redraw the output when there is a change in the query data.
The Controller is the methods or functions or processes that will take place as the result of the data input through the View element.
Context is the concept by which the 3 elements communicate to each other.
When the client send a request to the server,usually controller which is by which means the input will be done, eg form filling or a simple search text, will take control of the information and will process  the request, in this case, looking for books details.
The controller will then communcate with the model, which encapsulate the business logic. The model will query the database or the data source for the given input.
Finally the control is forwarded to the view through the controller as the model do not cummunucate straight to the view element.

Friday, May 14, 2010

Exercise 15


1.What is meant by a location based service?Explain using the web application found on a late model mobile device?
    A location-based service is an information and entertainment service, accessible with mobile devices through the mobile network and utilizing the ability to make use of the geographical position of the mobile device .
LBS services can be used in a variety of contexts, such as health, work, personal life, etc. And it include services to identify a location of a person or object, such as discovering the nearest banking cash machine or the whereabouts of a friend or employee. LBS services include parcel tracking and vehicle tracking services. LBS can include mobile commerce when taking the form of coupons or advertising directed at customers based on their current location. They include personalized weather services and even location-based games. They are an example of telecommunication convergence.

2. Describe the purpose of the open Mobile Alliance Initiative?
The mission of the Open Mobile Alliance is to grow the market for the entire mobile industry by removing the barriers to global user adoption and by ensuring seamless application interoperability while allowing businesses to compete through innovation and differentiation.
The Open Mobile Alliance encourages competition through innovation and differentiation, while ensuring the interoperability of mobile service through the entire value chain. The supporters of the Open Mobile Alliance recognize the significant industry benefits of creating a standards organization that will included all elements of the wireless value chain, and contribute to timely and efficient introduction of services and applications to the market.
3. What are the Main Components of a Mobile web services framework?
Mobile Server
The Mobile Server is a mobile remote computer, linked to the Internet via an Inmarsat Regional Broadband Global Area Network (RBGAN) User Terminal (UT).
Gatekeeper
The Gatekeeper is placed on the terrestrial Internet, and acts as the sole gateway to the Mobile Server.
RBGAN UT / Thruway Satellite / RBGAN SAS
The physical connection between the remote web server and the Gatekeeper is established using a Satellite Access Station, a Telecommunications Satellite and a satellite modem.
GPS / Data Acquisition system / Web cam
The Mobile Server is connected to a set of peripherals, such as a GPS device, a web cam and/or a Data Acquisition system.
Application server / Client PC
The Gatekeeper handles requests from clients over the Internet.


4. Visit an airline web site and search for information on WAP or SMS or 3G mobile application to access to booking airline services. The same services exit in banking. How do both industries compare?
I went to aircanada.com website
How do Mobile check-in works
Step 1: Open your Web browser on your Internet-enabled mobile device and navigate to mobile.aircanada.com. Once there, select the "Check-in" option.
Step 2: Enter your first name, last name, identification number (Aeroplan number, credit card number or booking reference) and departure city.
Step 3: Select the passengers you wish to check in or make changes for.
Step 4: Follow the on-screen instructions to select your seat, enter your number of checked bags and complete your check-in.
 Step 5: If eligible for an Electronic Boarding Pass, enter your e-mail address or mobile phone number to complete your check-in and receive your Electronic Boarding Pass. Otherwise, you can obtain your boarding pass at the airport at a Self-Service Kiosk or with an Air Canada agent.
There are comparison between airlines and banks on availability and practicality.
A banking WAP service allows the customer to save from queuing up and anywhere.
A passenger is far less likely using WAP to book a flight, when he is already at an airport. However, a banking WAP service is practicality.
Reference:-
http://www.aircanada.com/en/travelinfo/traveller/mobile/mci.html

Thursday, May 13, 2010

Execrise 14


1.       What is spider? What does it do?
A spider is nothing more than a computer program that follows certain links on the web and gathers information as it goes. For example, Google bot will follow HREF or SRC tags to find pages and images that are associated with any given site. Because these crawlers are merely computer programs, they aren't always the smartest of creatures and may get caught in endless loops built by dynamically created Web Pages.

2.       Differentiate the various types of software agents.
Collaborative agents are autonomous, have social ability, are reactive and proactive. They can interact with other agents to achieve tasks that any single agent could not perform on its own.
Interface agents are autonomous, have social ability, and can learn. They learn to assist the user by imitating them. They can ask other agents for advice. Requirements for an interface agent are that a task is repetitive, and that it is different for different users.
Mobile agents are autonomous, have social ability, are adaptable and mobile. Mobile agents can perform some intelligent operation before sending a more useful request to a server, reducing bandwidth and CPU time on the server.
Information or Internet agents manage, manipulate, or collect information from many sources. They are grouped by what they do rather than what they are, and are more of a social agent.
Reactive agents are very simple and do not have internal models of their environment. Rather, they react to stimuli within then environment in which they exist.
Hybrid agents consist of 2 or more of the above mentioned agents.
Smart agents do not yet exist. They have the properties of all of the previously mentioned agents.
Competitive agents are similar to collaborative agents, but they compete with other agents to get a task done. They may not perform taks for other agents if it could affect the tasks they are performing.

4.       Computing ethics and bot programming case study:Rocky
a. Get an account username and password from the lecturer to LC_MOO at http://ispg.csu.edu.au:7680 and login to the welcome lobby.  


B.Hold a 5 minute discussion with Rocky on a special topic. Command and chat are entered in the command box:-act rocky (to start) and hash rocky(stop bot)



Execrise 11

1.      Give a description in your own words of the ACID properties of transaction.
The ACID properties of transaction are as follows:-
Atomicity
Atomicity requires that database modifications must follow an all or nothing rule. Each transaction is said to be atomic if when one part of the transaction fails, the entire transaction fails and database state is left unchanged. It is critical that the database management system maintains the atomic nature of transactions in spite of any application, DBMS, operating system or hardware failure.
An atomic transaction cannot be subdivided, and must be processed in its entirety or not at all. Atomicity means that users do not have to worry about the effect of incomplete transactions
Transactions can fail for several kinds of reasons:
Hardware failure: A disk drive fails, preventing some of the transaction's database changes from taking effect
System failure: The user loses their connection to the application before providing all necessary information
Database failure: E.g., the database runs out of room to hold additional data
Application failure: The application attempts to post data that violates a rule that the database itself enforces, such as attempting to create a new account without supplying an account number
 Consistency
The consistency property ensures that the database remains in a consistent state; more precisely, it says that any transaction will take the database from one consistent state to another consistent state.
The consistency property does not say how the DBMS should handle an inconsistency other than ensure the database is clean at the end of the transaction. If, for some reason, a transaction is executed that violates the database’s consistency rules, the entire transaction could be rolled back to the pre-transactional state - or it would be equally valid for the DBMS to take some patch-up action to get the database in a consistent state. Thus, if the database schema says that a particular field is for holding integer numbers, the DBMS could decide to reject attempts to put fractional values there, or it could round the supplied values to the nearest whole number: both options maintain consistency.
The consistency rule applies only to integrity rules that are within its scope. Thus, if a DBMS allows fields of a record to act as references to another record, then consistency implies the DBMS must enforce referential intergrity by the time any transaction ends, each and every reference in the database must be valid. If a transaction consisted of an attempt to delete a record referenced by another, each of the following mechanisms would maintain consistency:
abort the transaction, rolling back to the consistent, prior state;
delete all records that reference the deleted record (this is known as cascade delete); or,
Nullify the relevant fields in all records that point to the deleted record.
 Isolation
Isolation refers to the requirement that other operations cannot access or see data that has been modified during a transaction that has not yet completed. Each transaction must remain unaware of other concurrently executing transactions, except that one transaction may be forced to wait for the completion of another transaction that has modified data that the waiting transaction requires.
Durability
Durability is the DBMS's guarantee that once the user has been notified of a transaction's success, the transaction will not be lost. The transaction's data changes will survive system failure, and that all integrity constraints have been satisfied, so the DBMS won't need to reverse the transaction. Many DBMSs implement durability by writing transactions into a transaction log that can be reprocessed to recreate the system state right before any later failure. A transaction is deemed committed only after it is entered in the log.
Durability does not imply a permanent state of the database. A subsequent transaction may modify data changed by a prior transaction without violating the durability principle.

2. Describe a TP monitor environment. How can a TP monitor stop an operating system being overwhelmed?
Transaction Processing Monitor is a set of information which processes the data transaction in database system that monitors transaction programs. The essence of a transaction program is that it manages data that must be left in a consistent state. E.g. if an electronic payment is made, the amount must be either both withdrawn from one account and added to the other, or none at all. In case of a failure preventing transaction completion, the partially executed transaction must be ‘rolled back’ by the TPS. it is particularly important for online processing: if e.g. an airline seat reservation system is accessed by multiple operators, after an empty seat inquiry, the seat reservation data must be locked until the reservation is made, otherwise another user may get the impression a seat is still free while it is actually being booked at the time. Without proper transaction monitoring, double bookings may occur. Other transaction monitor functions include deadlock detection and resolution (deadlocks may be inevitable in certain cases of cross-dependence on data), and transaction logging (in 'journals') for 'forward recovery' in case of massive failures.
Reference:-

Exercise 10


1. Find definitions for the eight terms and concepts used in threaded programming.
a. Thread Synchronisation:-
Thread is a sequence of a program which runs a certain function within a program. As an application runs, it spawns off functions within the program as a thread. For example, mail program may need to contact the server to check for new mail, that function could be a thread. Some operating systems can run multiple threads at one time, allowing for fast execution of an application.

Thread synchronization requires that a running thread gain a "lock" on an object before it can access it. The thread will wait in line for another thread that is using the method/data member to be done with it. This is very important to prevent the corruption of program data if multiple threads will be accessing the same data. If two threads try to change a variable or execute the same method at the same, this can cause serious and difficult to find problems. Thread synchronization helps prevent this.
b. Locks
A lock is a mechanism for controlling access to something. In programming, locks are often used so that multiple programs or threads of a program can share a resource - for example, access to a file for updating it - on a one-at-a-time basis. Typically, a lock is of temporary duration and when the resource is no longer required, it is freed for locking and use by the next sharer in a queue.
From a system point-of-view, locking is a method of synchronizing potentially concurrent uses of a database or other common resource. An operating system may enforce locking or some other mechanism in order to ensure that actions occur in the right. An operating system must also provide for means to ensure that two programs do not become dependent on each other for the release of a lock, a situation known as a deadlock in which the programs are essentially halted.
c. Deadlock
 when two or more processes are each waiting for each other to release a resource, or more than two processes are waiting for resources in a circular chain is called deadlock.It is a common problem in multiprocessing where many processes share a specific type of mutually exclusive resource known as a software lock or soft lock. Computers intended for the time-sharing and/or real-time markets are often equipped with a hardware lock (or hard lock) which guarantees exclusive access to processes, forcing serialized access. Deadlocks are particularly troubling because there is no general solution to avoid (soft) deadlocks.
d.Semaphores
A semaphore is a hardware or software flag. In multitasking systems, a semaphore is a variable with a value that indicates the status of a common resource. Its used to lock the resource that is being used. A process needing the resource checks the semaphore to etermine the resource's status and then decides how to proceed.
In programming, especially in UNIX systems, semaphores are a technique for coordinating or synchronizing activities in which multiple process compete for the same operating system resources. A semaphore is a value in a designated place in operating system (or kernel) storage that each process can check and then change.

Depending on the value that is found, the process can use the resource or will find that it is already in use and must wait for some period before trying again.
Semaphores can be binary (0 or 1) or can have additional values.
Semaphores are one of the techniques for inter process communication .The C programming language provides a set of interfaces or "functions" for managing semaphores.
e. Mutex (Mutual Exclusion)
In computer programming, a mutex (mutual exclusion object) is a program object that is created so that multiple program thread can take turns sharing the same resource, such as access to a file. Typically, when a program is started, it creates a mutex for a given resource at the beginning by requesting it from the system and the system returns a unique name or ID for it. After that, any thread needing the resource must use the mutex to lock the resource from other threads while it is using the resource. If the mutex is already locked, a thread needing the resource is typically queued by the system and then given control when the mutex becomes unlocked (when once more, the mutex is locked during the new thread's use of the resource).
f.Thread
By definition, Thread is a piece of program which is running two or more concurrent task. Consider a sequential program which is printing a series of prime number on the screen. This program will start at line 1 and will run through the lines until the end. We have to note here that at any given time while the program is running, there is only one point of execution.
A thread is quite similar to the sequential program, where it differs, is when a stream of execution or part of the program that can run simultaneously and independently of everything else that might be happening with the rest of the program.
Without thread, a CPU intensive task can hold up the entire CPU for some time and just imagine if there in infinite loop in the same program. With thread, the part that is not part of the loop can continue processing without waiting for the infinite loop to finish.
G. Event
Lots of programs and some operating system are good examples of events. This normally occurs when a key is pressed or the mouse pointer has been rolled over some specific part of the screen which triggers a piece of program to be executed. For example, just by rolling the mouse pointer over the start icon on the Windows desktop, this will cause an event which will display a message, here is start.
8. Waitable timer
This is a very light weight object that is used to schedule an event for a specified time.