Saturday, May 30, 2009
Exercise 24. Virtual business worlds and software agents
1. Differentiate the various types of software agents.
A Software agent is a single software that works for a user or other program in a relationship of agency. The term 'agent' describes a software abstraction, an idea or a concept that similar to the methods, functions and objects in object oriented programming. The agent provides a easy and powerful way to describe a complex software entity that capable of working with a certain degree of autonomy in order to achieve tasks on behalf of its user. Various type of software agents
- Intelligent software agents are a branch of artificial intelligence research. The intelligent agents include ability to adapt and learn. Ability to adapt means sensing the environment and reconfiguring in response by choice of alternative problem solving rules or algorithms.
- Autonomous agents are software agents that claim to be autonomous. It is self contained and capable of making independent decisions, and taking actions to satisfy self goals that upon their sense environment.
- Distributed agents are designed to be very loosely coupled and easy to execute as independent threads on distributed processors.
- Multi-agent systems are several agents work together or collaborate with other agents. Data is decentralized and execution is asynchronous in mult-agent systems.
- Mobile agents are agent that moves itself include its execution state from one to another machine to continue execution there. Mobile agents can be used to gather system information, taking files backup, monitoring network throughput or checking of available resources and moderating the resource utilization.
- Fuzzy agents are software agent that implements fuzzy logic. They interact with their environment through an adaptive rule-base and can be considered as a kind of intelligent agent.
2. Describe how techniques such as artificial intelligence and statistical techniques are used in software agents.
The artificial intelligence technique is used in intelligent software agents and Fuzzy agents for capable in ability to adapt and learn. The ability to adapt means sensing the environment and reconfiguring in response, through the select of alternative problem-solving-rules or algorithms, or through the discovery of problem solving strategies. The ability to learn means learning through trial-and-error, then capable to introspection and analysis of behavior and success, capable to abstract and generalize.
The statistical technique is used in mobile agents in gather system information, monitoring network throughput, check resources avaliablity and moderating the resource utilization. The statistical technique is used intensively in data mining agents for information collection and analysis.
3. Identify various activities in e-commerce where software agents are currently in use.
Buyer agents are widely used in e-commerce such as Amazon.com and eBay. Their Website offer a list of products for users to buy. They also use the collaborative filtering technology to show similar products that customers who did the search looked at.
Data mining agents are also used e-commerce for collecting data to promote e-commerce activities. Data collect include the users' browsing history, keywords used in search engines and hit rate of Web page etc.
4. List popular software agents currently in use in the commercial world?
1. Buyer agents also called 'shopping bots', they search around the network to retrieve information about goods and services. The Website offer a list of products that you may like to buy such as Amazon.com or eBay.
2. User agents or personal agents are intelligent agents that take action on your behalf. They perform the tasks for you: check e-email, play computer games, assemble customized news reports, find information, fill out forms on the Web automatically, scan Web page and discuss topics with you.
3. Monitoring-and-surveillance(predictive) agents are used to observe and report on equipment, usually computer systems. They may keep track the inventory levels, price of competitors and relay them back to the company.
4. Data mining agents uses information technology to find trends and patterns in a abundance of information from many sources that come from different systems. Users can seek and sort the information in any way they want.
1. Hagg, S. (2006), Management information systems for the information age, 224-228.
2. Wikipedia (2009), Software agent, Retrieved at http://en.wikipedia.org/wiki/Software_agent on 3rd May, 2009.
Exercise 23: Search mechanisms
1. What is a spider? what does it do?
An Internet spider is a program used by searched engines which is designed to "crawl" over the World Wide Web, the portion of the Internet most familiar to general users, and retrieve locations of Web pages. The usual starting points are lists of heavily used servers and very popular pages. The spider will begin with a popular site, indexing the words on its pages and following every link found within the site. In this way, the spidering system quickly begins to travel, spreading out across the most widely used portions of the Web. It is sometimes referred to as a webcrawler. Many search engines use webcrawlers to obtain links, which are filed away in an index. When a user asks for information on a particular subject, the search engine pulls up pages retrieved by the Internet spider. Without spiders, the vast richness of the Web would be all but inaccessible to most users, rather as the Library of Congress would be if the books were not organized.
Some search engines are human-based, meaning that they rely on humans to submit links and other information, which the search engine categorizes, catalogues, and indexes. Most search engines today use a combination of human and crawler input. Crawler-based engines send out spiders, which are actually computer programs that have sometimes been likened to viruses because of their ability to move between, and insert themselves into, other areas in cyberspace.
Spiders visit Web sites, record the information there, read the meta tags that identify a site according to subjects, and follow the site's links to other pages. Because of the many links between pages, a spider can start at almost any point on the Web and keep moving. Eventually it returns the data gathered on its journey to the search engine's central depository of information, where it is organized and stored. Periodically the crawler will revisit the sites to check for changed information, but until it does so, the material in the search engine's index remains the same. It is for this reason that a search at any time may yield "dead" Web pages, or ones that can no longer be found.
No two search engines are exactly the same, the reason being (among other things) a difference in the choice of algorithm by which the indices are searched. Algorithms can be adjusted to scan for the frequency of certain keywords, and even to circumvent attempts at keyword stuffing or "spamdexing," the insertion of irrelevant search terms intended simply to draw traffic to a site.

http://www.answers.com/topic/internet-spider
http://computer.howstuffworks.com/search-engine1.htm
2. What is a meta-search engine? Provide some examples.
Meta search engines are search engine tools that pass queries on to many other search engines and/or directories and then summarize all the results in one handy interface. They appear like an aggregator for receiving your input (search requests) and then forward the request(s) to several other search engines and/or databases and aggregates the results into a single list or displays them according to their source. Metasearch engines enable users to enter search criteria once and access several search engines simultaneously. Metasearch engines operate on the premise that the Web is too large for any one search engine to index it all and that more comprehensive search results can be obtained by combining the results from several search engines. This also may save the user from having to use multiple search engines separately.
Examples of Meta-search engines:
Clusty: www.clusty.com
Dogpille: www.dogpile.com
SurWax: www.surfwax.com
Copernic Agent: www.copernic.com
3. How can you get your site listed at major search sites; and how could you improve your site ranking?
Here are some of the ways you could improve your website ranking.
- Subscribe your Web site to major search sites for them easily to reach your Web site.
- Declare the key terms that your users will search on to find content like yours carefully. Use those key terms to guide the text and construct your web pages.
- As users are likely to click the link if the title matches their search, choose terms for the title that match the concept of your document.
- Use meta-tags as a description and write the description accurately and carefully. Make sure the document title and description attract the interest of the user.
- Use 'keyword' in meta-tag to list key words for the document.
- Keep relevant text and links in HTML. An HTML site map, with a link from the welcome page, can help to make sure all your pages are crawled by the search engines.
- Use ALT text for graphics for good page design to accommodate text browsers or visually impaired visitors.
Exerscise 22: CRM
Differentiate between software systems such as Customer Relationship Management (CRM) software, Business-to-Business e-commerce programs and Supply-Chain Management (SCM) software.
CRM (customer relationship management) is a collective term for methodologies, software, and usually Internet capabilities that help and enterprises manage customer relationships in an organized way. For example, an enterprise might build a database about its customers that described relationships in sufficient detail so that management, salespeople, people providing service, and perhaps the customer directly could access information, match customer needs with product plans and offerings, remind customers of service requirements, know what other products a customer had purchased, and so forth.
Business-to-Business (B2B) software is used to transfer data between businesses such as purchase orders and invoices. This decreases cost of employees to manually enter data, time for goods to ship as orders can be processed almost immediately if stock is available, and time to receive payment, as many businesses using B2B have payments automatically flagged to pay on their due date.
Supply chain Management: Supply chain management (SCM) is the oversight of materials, information, and finances as they move in a process from supplier to manufacturer to wholesaler to retailer to consumer. Supply chain management involves coordinating and integrating these flows both within and among companies. Supply chain management flows can be divided into three main flows:
- The product flow
- The information flow
- The finances flow
The product flow includes the movement of goods from a supplier to a customer, as well as any customer returns or service needs. The information flow involves transmitting order and updating the status of delivery. The financial flow consists of credit terms, payment schedules, and consignment and title ownership arrangements.
Exercise 21: Shopping Cart Specifications
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 20: Modelling with UML
Describe each of the eight main diagrams used in UML.
At the centre of the UML are its nine kinds of modelling diagrams, which we describe here.
- Use case diagrams
- Class diagrams
- Object diagrams
- Sequence diagrams
- Collaboration diagrams
- Statechart diagrams
- Activity diagrams
- Component diagrams
- Deployment diagrams
Use case diagrams describe what a system does from the standpoint of an external observer(High Level View). The emphasis is on what a system does rather than how.
Class diagram gives an overview of a system by showing its classes and the relationships among them. Class diagrams are static -- they display what interacts but not what happens when they do interact.
Object diagrams show instances instead of classes. They are useful for explaining small pieces with complicated relationships, especially recursive relationships.
Sequence diagram is an interaction diagram that details how operations are carried out -- what messages are sent and when. Sequence diagrams are organized according to time. The time progresses as you go down the page
Collaboration diagrams are also interaction diagrams. They convey the same information as sequence diagrams, but they focus on object roles instead of the times that messages are sent. In a sequence diagram, object roles are the vertices and messages are the connecting links.
A state chart diagram shows the possible states of the object and the transitions that cause a change in state.
An activity diagram is basically a glorified flowchart. Activity diagrams and state chart diagrams are related where a state chart diagram focuses the attention on an object undergoing a process (or on a process as an object), the activity diagram focuses on the flow of activities involved in a single process. The activity diagram shows the how those activities depend on one another.
A component is a code module. Component diagrams are physical analogs of class diagram.
Deployment diagrams show the physical configurations of software and hardware.
At the centre of the UML are its nine kinds of modelling diagrams, which we describe here.
- Use case diagrams
- Class diagrams
- Object diagrams
- Sequence diagrams
- Collaboration diagrams
- Statechart diagrams
- Activity diagrams
- Component diagrams
- Deployment diagrams
Use case diagrams describe what a system does from the standpoint of an external observer(High Level View). The emphasis is on what a system does rather than how.
Class diagram gives an overview of a system by showing its classes and the relationships among them. Class diagrams are static -- they display what interacts but not what happens when they do interact.
Object diagrams show instances instead of classes. They are useful for explaining small pieces with complicated relationships, especially recursive relationships.
Sequence diagram is an interaction diagram that details how operations are carried out -- what messages are sent and when. Sequence diagrams are organized according to time. The time progresses as you go down the page
Collaboration diagrams are also interaction diagrams. They convey the same information as sequence diagrams, but they focus on object roles instead of the times that messages are sent. In a sequence diagram, object roles are the vertices and messages are the connecting links.
A state chart diagram shows the possible states of the object and the transitions that cause a change in state.
An activity diagram is basically a glorified flowchart. Activity diagrams and state chart diagrams are related where a state chart diagram focuses the attention on an object undergoing a process (or on a process as an object), the activity diagram focuses on the flow of activities involved in a single process. The activity diagram shows the how those activities depend on one another.
A component is a code module. Component diagrams are physical analogs of class diagram.
Deployment diagrams show the physical configurations of software and hardware.
Exercise 19: TP Monitors and Transaction Protocols
1. Give a description in your own words of the ACID properties of a transaction.
ACID properties of a transaction refers to
Atomicity: When an update occurs to a database, either all or none of the update becomes available to anyone beyond the user or application performing the update.
Consistency: Consistency is the ACID property that ensures that any changes to values in an instance are consistent with changes to other values in the same instance
Isolation: The isolation portion of the ACID properties is needed when there are concurrent transactions. An important concept to understanding isolation through transactions is serializability. Transactions are serializable when the effect on the database is the same whether the transactions are executed in serial order or in an interleaved fashion.
Durability: Durability refers to the ability of the system to recover committed transaction updates if either the system or the storage media fails.
2. Describe a TP monitor environment. How can a TP monitor stop an operating system being overwhelmed?
A TP Monitor is a subsystem that groups together sets of related database updates and submits them together to a relational database. The result is that the database server does not need to do all of the work of managing the consistency/correctness of the database; the TP Monitor makes sure that groups of updates take place together or not at all. TP-Monitor environment which partitions the workflow engine into several resource managers (RMs) individually managed by a TP-Monitor environment. The RMs together form the workflow engine serving user requests. (Browne's, 2007)
3. What is the difference in load balancing with traditional and transactional MOM, RPC, and conversations?
Load balancing is dividing the amount of work that a computer has to do between two or more computers so that more work gets done in the same amount of time and, in general, all users get served faster.
Traditional RPC Model: In this the request from user should be queued and wait synchronously for the server to execute and return the reply where the client and server should be free at the same time.
MOM: MOM stands for Message-oriented middleware It acts as a middleware between the client and server, buffering the requests from user and replies from servers.
RPC(remote Procedure Call): Remote procedure call (RPC) is an Inter-process communication technology that allows a computer program to cause a subroutine or procedure to execute in another address space(commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction.
4.Why is a two-phase commit protocol better than a one-phase atomic commit protocol?
One –phase Atomic Commit Protocol
This protocol overlaps the voting phase with the execution of transaction and just has a decision
phase. There are two implementation the Implicit Yes Voting and the Coordinate Log.
Advantages:
Simple protocol fewer overheads.
• Low latency due to fewer disk writes.
• Useful in case of low bandwidth networks, as lesser messages are exchanged.
• In most cases all the updates will be logged befor commit so durability is assured.
Disadvantages
• The greatest disadvantage is that it can only handle immediate consistency con-
straints as there is no voting phase. It can not handle the deferred consistency
constraints
Two-Phase Atomic commit protocol: This is the most widely used protocol which commences in two phases ,Voting , to ensure that all sites are ready to commit,Decision , to ensure uniformity at abort or commit at all sites.
2PC is largely used in all distributed systems.
Advantages
• It ensures atomicity even in the presence of deferred constraints.
• It ensures independent recovery of all sites.
• Since it takes place in twophases, it can handle network failures, disconnections and
in their presence assure atomicity.
Disadvantages
• Involves a great deal of message complexity.
• Greater communication overheads as compared to simple optimistic protocols.
• Blocking of site nodes in case of failure of coordinator.
• Multiple forced writes of log, which increase latency.
• Its performance is again a trade off,especially for short lived transactions, like Internet
applications
Exercise 18: Threading demonstration in Python.
A simple demonstration of the threading module in Python that uses both a lock and semaphore to control concurrency is by Ted Herman at the University of Iowa. The code and sample output below are worth a look. Report your findings.
There are a number of elements to the threaddemo.py program. It incorporates threaded programming, including locks, semaphores and monitoring.
The following were my findings after reviewing a threaddemo.py program which
- Firstly the numtasks variable is set to 10, which gives a total of ten tasks to be run.
- The second variable of sema is set to 3, which allows three threads to run simultaneously.
- The third variable set is mutex, which creates a read lock on the thread.
- The final variable set is running, which keeps track of how many threads are running.
As the code runs, the tasks are completed, with a maximum of three running at the one time (as set in the sema variable). The running variable monitors this number of threads. When each thread completes running, the mutex variable allows the read lock to be released and for the next thread to be run. These continue to run until the total number of tasks listed in numtasks (ten in this case) have been processed, with a maximum of three running at the one time.
Subscribe to:
Posts (Atom)