Wednesday, November 11, 2009

Exercise 8

Strengths of Ruby-on-Rails workshops
  • no strict time limit
  • helps develop skills with rails framework
  • different perspectives for students that want to become developers or students that don't
Weaknesses
  • So much information out there that it can become confusing on how to complete some tasks
  • Time consuming if u need to teach yourself from scratch
  • Difficult for inexperienced developers
Most difficult
  • Programming
  • Finding exactly which rails app to install in the beginning
  • Not getting carried away with other subjects and leaving this until the last minute
Improvements
  • Maybe more guidance with getting the app started for the inexperienced like myself
Free response
I had trouble with getting it to work, but that was more of a user issue than an application issue. I think with the right information and in the right hands ruby on rails is quite effective, judging by the outputs some of the other students.

Elevator Pitch 2

During my studies in ITC382 business to business systems I have learnt a huge amount about web applications and their development. The internet and e-commerce have become a huge part of everyday life in a large amount of peoples lives throughout the world. Whether it be through online social networking, gaming or shopping, ecommerce systems are becoming more and more abundant and penetrating societies everyday life.
Coming into this subject I had little experience with the development of web applications and no experience with ruby on rails. Although I have not quite grasped the developers side of the subject, I have learnt a great deal about why web application frameworks are necessary to reduce production times and increase development efficiency.
I have found the most interesting part of the subject was learning about spiders, software agents and intrusion detection systems. The workshops helped me to understand how valuable development frameworks are throughout the development process and I have obtained a more in depth knowledge of Model View Controller. They have also helped me to grasp the concept convention over configuration.
This subject has been very insightful regarding web application development process and the behind the scenes development and planning that goes into an online system.

Tuesday, November 10, 2009

Exercise 16

XML and Web Services as the Glue

Systems integration is the core to providing a high-level set of features that provide functionality for business-to-business e-commerce and web based systems. These high-level feature sets are made up of a group of sub systems which each play their part to providing functionality to the one main system. This process of information technology integration gives a business the ability to provide more services and functionality to its clients. These systems are achieved through the use of these three service descriptions parts:
  • Schema definition
  • Interface definition
  • Location definition
eXtensible Markup Language (XML) along with web services can be used to create a custom service definition that allows a system to be integrated. XML enable the data within a system to be described and formatted to meet the required systems needs. having a standardized schema allows for easier and more efficient sub-system integration.

Web services are "a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically Web Services Description Language WSDL). Other systems interact with the web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other web-related standards." As defined by W3C.

I have had no experience with online systems in my previous studies. As a network engineer student this subject has broadened my knowledge into this side of computing. While I find online systems very useful in a lot of day to day activities, while doing online banking and purchasing of goods, I think I might leave the creation of online systems to somebody with a bit more experience...well for the time being anyway, while I hone my skill set in this field. I have found this subject to be a quite worth while and have learnt so much about online systems, an area of IT that I had very limited knowledge.

Monday, November 9, 2009

Exercise 15

1. Location based service

"A location-based service (LBS) is a software application for a IP-capable mobile device that requires knowledge about where the mobile device is located. Location-based services can be query-based and provide the end user with useful information such as "Where is the nearest ATM?" or they can be push-based and deliver coupons or other marketing information to customers who are in a specific geographical area.[...]An LBS requires five basic components: the service provider's software application, a mobile network to transmit data and requests for service, a content provider to supply the end user with geo-specific information, a positioning component (see GPS) and the end user's mobile device." http://searchnetworking.techtarget.com/sDefinition/0,,sid7_gci532097,00.html

LBS can be used to find(nearest the users current location):
  • Places, including restaurants, movie theaters, mechanics
  • People, doctors, co-workers, friends
  • Proximity based payment, EZ pass, bus tickets

2. Open Mobile Alliance Initiative

"The Open Mobile Alliance Ltd. has been established by the consolidation of the WAP Forum and the Open Mobile Architecture Initiative. The new Open Mobile Alliance is a group of companies and organizations, with a commitment to a shared set of principles, who have come together to drive the growth of the mobile industry. It intends to grow the market for the entire industry by removing barriers to interoperability and supporting a seamless and easy-to-use mobile experience for end users.

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." http://www.palowireless.com/wap/oma.asp

3. Mobile web services framework

The main components of the mobile web services framework as stated by IEEE Distributed Systems Online.

"Figure 1 shows our proposed framework’s architecture. We built it on the standard Web service architecture’s three pillars—a service provider, requestor, and registry—but we also introduced three new components: a service broker, a workflow engine, and a mobile Web service agent.

Figure 1.

Figure 1. Our proposed framework’s architecture. The framework preserves the three roles in the standard Web service architecture, but also introduces three new components.

The new architecture complies with wireless portal networks and attempts to overcome both the processing overhead on mobile devices and the data load on wireless links with limited bandwidth.

Service broker

The service broker augments data stored on the UDDI registry with nonfunctional attributes such as service-area location, service time, and accessible network types. Each provider that implements a new service supplies this information; for this reason, we defined a service broker service ontology similar to one described elsewhere.9 Figure 2 shows this ontology’s Unified Modeling Language (UML) class diagram.

Figure 2.

Figure 2. UML class diagram for the service broker service ontology. The service broker provides Web services for mobile clients. By invoking these Web services, mobile clients can specify their domain or service-class-specific preferences and search all available services.

The service broker service ontology specifies a domain (such as food, rental, or entertainment) and a set of synonyms for flexible search. The rental domain, for example, includes “rent” and “lease” as synonyms as well as a set of service classes to define properties. Each service that belongs to a service class must have a unique name.

A service class is further specified by its attributes, which are service-class specific and can include URIs. These attributes also hold nonfunctional attributes, which the mobile agent uses to select available services that match user preferences and context. In the food domain, for example, the “pizza” class might have attributes such as minimum delivery time and minimum delivery amount.

Workflow engine

The workflow engine uses standard orchestration languages to execute any processes the service providers give as workflows. While executing a workflow, the engine communicates with Web service providers and invokes related services. All messaging between the engine and the provider is via standard SOAP messaging. Having several workflow engines on the network helps avoid a single point of failure.

Mobile Web service agents

A mobile Web service agent acts as a gateway to Web services for mobile clients and handles all communication between mobile clients and the service broker or workflow engine.

The mobile Web service agent is located inside the mobile network. It receives the input parameters required for service execution from the mobile device and returns the executed service. The agent also selects services according to user preferences and context information such as location, air-link capacity, or access-network type." http://dsonline.computer.org/portal/site/dsonline/menuitem.9ed3d9924aeb0dcd82ccc6716bbe36ec/index.jsp?&pName=dso_level1&path=dsonline/2006/06&file=w3bener.xml&xsl=article.xsl&

Sunday, November 8, 2009

Exercise 6 and 7

I believe that Ruby-on-Rails will be a very suitable framework for the completion of this online taxi booking system. It provides a framework to which it is easy (for some) to create online booking systems such as the online taxi booking system. Some quotes from some developers tend to back up this assertion.

“Ruby on Rails is astounding. Using it is like watching a kung-fu movie, where a dozen bad-ass frameworks prepare to beat up the little newcomer only to be handed their asses in a variety of imaginative ways.”

-Nathan Torkington, O’Reilly Program Chair for OSCON

“Rails is the most well thought-out web development framework I’ve ever used. And that’s in a decade of doing web applications for a living. I’ve built my own frameworks, helped develop the Servlet API, and have created more than a few web servers from scratch. Nobody has done it like this before.”

-James Duncan Davidson, Creator of Tomcat and Ant


There are a couple of hosting solutions available for the new online taxi booking system. The first of which is the creation of an in house web server that is built and connected through the businesses internet connection to the internet. This might not be the best way to go about it depending on the size of the business and budget of the project. This solution could entail the purchasing of a dedicated web server that will need to be configured to host a secure website on facing the internet, this will also require the knowledge of an IT professional to configure and maintain.

The second option is for the business to purchase some web hosting space from a dedicated website hosting company. This could be a more viable option for a small business as there will be no need to purchase dedicated web server hardware or hire an IT professional to maintain the system. This solution will entail a monthly fee for the website to be hosted.

Workshop 5

I have now had the easy decision of taking the IT Managers side of the Ruby on Rails ride for the rest of the workshops. It took me a whole of 2 seconds to make the decision after hours of frustrated ill attempts at being able to create a fully functioning rails app. I put this down to my network engineering major with little to no exposure to the realm of creating online systems.

Through vast research on the net I have found a variety of SMS devices but the one I am going to recommend is the SMS Prodigy version of a GSM modem sms hardware. This device can be configured to send personal SMS messages to the individuals that make a booking with the online taxi system. This device requires minimal system requirements.

Technical Data

The GSM Modem derives +5V DC power from the USB port, therefore, the PC must have a USB port conforming to the USB 2.0 standards. The device does
not require any external power supply for its operation.

Modem is dualband EGSM900 and GSM1800.

SMS Hardware

SMS Hardware Operating Environment

System Requirements

  • Windows 2003, XP or Vista
  • Pentium 1GHz and above
  • 1 GB RAM
  • 50MB HDD
  • 1 free USB 2.0 Port
Information provided from http://smsprodigy.com/sms-hardware.html

The network needs for the taxi booking system will not necessarily change with the implementation of the SMS taxi booking system. Personnel will need to be trained and new people recruited for the implementation and everyday use/management of the new technologies and systems implemented.

Saturday, November 7, 2009

Exercise 14

1. Spiders

A spider is an application that actively searches web pages and their links for search engines and other similar sites. Spiders collect information such as:
  • Dead links
  • Email addresses
  • Web page titles, content etc.
Spiders are used by a majority, if not all, search engines on the web to add links in their databases for when people undertake a search. These applications are also commonly known as "bots" and "crawlers". Spiders have the ability to visit many sites in parallel, this is called the spiders "legs". In the case of deadlinks spiders can be used for maintenance tasks.

2. Software Agents

Intelligent - This type of agents have the ability of adaptation and the ability to learn. The ability to adapt allows the agent to sense the environment and reconfigure to meet. Algorithms and problem solving strategies can allow and agent to be able to adapt. The ability to learn can be established through trial and error which creates an illusion of behaviour.

Autonomous - Autonomous software agents claim to be autonomous through making independent decisions and taking action to meet the needs of an environment. These agents usually have the input of a user in order to make decisions within important applications.

Distributed - These agent can work together or be very loosely coupled, this allows them to be executed independently on distributed systems.

Multiagent Systems - Several agents can interact to form a multiagent system. Some agents may not have all data and methods inbuilt, this is when they may need to collaborate with other agents. These systems are also referred to as swarm systems and have their data is decentralized.

Mobile - These type of agents are able to move to other machines along with their data and execution state. These agents are used to backup files in client/server environments, monitoring network throughput and check resource utilization.

Fuzzy - "In computer science a fuzzy agent is a software agent that implements fuzzy logic. This software entity interacts with its environment through an adaptive rule-base and can therefore be considered as a type of intelligent agent." http://www.statemaster.com/encyclopedia/Fuzzy-agent

3. Software Agents in Use

Update Agents - These agents notify the user of when a change has occurred, eg:
  • Alerting when news has been updated on a website
  • Alerts a user when a job becomes available from a job board
Shopping Agents - These agents help with the purchasing of goods from retail websites. They can help find the best price for specific goods that the user is looking for.

Friday, November 6, 2009

Exercise 13

Shopping Cart Class Diagram


Exercise 12

MVC architecture of an online bookstore

Model
  • Customer model - Holds customers information
  • Order model - For processing orders
  • Book model -Holds information and functions of books
  • Shopping Cart model -Holds information of the customers transaction
View
  • Book Controller - searching for books
  • Book Controller - information on books
  • Order Controller - ordering for books
  • Order Controller - books availability
  • Order Controller - order confirmation
  • Order Controller - order status
  • Shopping Cart Controller - add to cart, contents of cart
  • Shopping Cart Controller - purchasing
Controller
  • Books - lookup, return methods
  • Orders - create, cancel and status of books
  • Shopping Cart - add, modify, cancel
  • Customer - get details

Exercise 11

1. ACID Properties and TP monitoring

ACID stands for Automicity, Consistency, Isolation, Durability.
  • Automicity - The ability for a transaction to be fully processed and completed or cancelled or rolled back to ensure data integrity.
  • Consistency - The data of a transaction must be left in a continuous stable state until the transaction is completed.
  • Isolation - A transaction must be isolated while being processed, ensuring it is not interrupted or modified by any process or other transactions.
  • Durability - Transactions must not be able to be changed due to hardware failure and system crashes or the like. Other transactions must still be able to alter the processed data.
TP stands for Transaction Process monitoring. A transaction process monitor is used to ensure data integrity in a multi-threaded environment. A distributed client/server system is an example of a TP where all transactions are enforced with the properties of ACID. A TP monitor schedules threads and processes to evenly spread the processing load to ensure that an operating system is not overwhelmed.

Thursday, November 5, 2009

Exercise 10

1. Thread Syncronisation

"In a multithreaded environment, each thread has its own local thread stack and registers. If multiple threads access the same resource for read and write, the value may not be the correct value. For example, let's say our application contains two threads, one thread for reading content from the file and another thread writing the content to the file. If the write thread tries to write and the read thread tries to read the same data, the data might become corrupted. In this situation, we want to lock the file access. The thread synchronization has two stages. Signaled and non-signaled.

The signaled state allows objects to access and modify data. The non-signaled state does allow accessing or modifying the data in the thread local stack." http://www.codeproject.com/KB/threads/Synchronization.aspx

2. Locks

A Lock is a synchronization method that controls access to resources for threads and processes. Data integrity of resources is ensured through the use of locks as it does not allow any 2 threads to access the same 1 data source at the same time.

3. Dead Locks

"In computer science, deadlock refers to a specific condition 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 (see Necessary conditions). Deadlock 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." http://en.wikipedia.org/wiki/Deadlock

4. Semaphores

"Semaphores are routines that ensure orderly access to regions of code. Like spinlocks, semaphores guard kernel data structures by controlling access to regions of code associated with a set of data structures. Unlike spinlocks, semaphores require the waiting thread to relinquish the CPU while awaiting the lock. Semaphores are implemented using a swtch() to allow another thread to run....Semaphores serve two functions mutual exclusion and synchronization. Mutual-exclusion semaphores protect data and are further classified by their degree of restrictiveness." http://docs.hp.com/en/5965-4643/ch01s08.html

5. Mutex

"A mutex object is a synchronization object whose state is set to signaled when it is not owned by any thread, and nonsignaled when it is owned. Only one thread at a time can own a mutex object, whose name comes from the fact that it is useful in coordinating mutually exclusive access to a shared resource. For example, to prevent two threads from writing to shared memory at the same time, each thread waits for ownership of a mutex object before executing the code that accesses the memory. After writing to the shared memory, the thread releases the mutex object." http://msdn.microsoft.com/en-us/library/ms684266%28VS.85%29.aspx

6. Thread

"In computer science, a thread of execution results from a fork of a computer program into two or more concurrently running tasks. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process. Multiple threads can exist within the same process and share resources such as memory, while different processes do not share these resources." http://en.wikipedia.org/wiki/Thread_%28computer_science%29

7. Event

"In computer science, an event is a type of synchronization mechanism that is used to indicate to waiting processes when a particular condition has become true.

An event is an abstract data type with a boolean state and the following operations:

  • wait - when executed, causes the executing process to suspend until the event's state is set to true. If the state is already set to true has no effect.
  • set - sets the event's state to true, release all waiting processes.
  • clear - sets the event's state to false.

Different implementations of events may provide different subsets of these possible operations; for example, the implementation provided by Microsoft Windows provides the operations wait (WaitForObject and related functions), set (SetEvent), and clear (ResetEvent). An option that may be specified during creation of the event object changes the behaviour of SetEvent so that only a single process is released and the state is automatically returned to false after that process is released." http://en.wikipedia.org/wiki/Event_%28synchronization_primitive%29

8. Waitable Timer

"A waitable timer object is a synchronization object whose state is set to signaled when the specified due time arrives. There are two types of waitable timers that can be created: manual-reset and synchronization. A timer of either type can also be a periodic timer.

ObjectDescription
manual-reset timerA timer whose state remains signaled until SetWaitableTimer is called to establish a new due time.
synchronization timerA timer whose state remains signaled until a thread completes a wait operation on the timer object.
periodic timerA timer that is reactivated each time the specified period expires, until the timer is reset or canceled. A periodic timer is either a periodic manual-reset timer or a periodic synchronization timer.
" http://msdn.microsoft.com/en-us/library/ms687012%28VS.85%29.aspx