Constructing Intelligent Agents Using Java: Professional Developer’s Guide

Couple tidbits from Constructing Intelligent Agents Using Java: Professional Developer’s Guide.

Page 3, an Alan Turing quote: “.. if a machine is expected to be infallible, it cannot also be intelligent.

On the classifications of agents (agency, intelligence, mobility): “…Agency deals with the degree of autonomy the software agent has in representing the user to other agents, applications and computer systems…. Intelligence refers to the ability of the agent to capture and apply domain specific knowledge and processing to solve problems…. An agent is mobile if it can move between systems in a network.” [page 10]

On processing strategies: “… reactive or reflex agents, which respond in the event-condition-action mode. Reflex agents do not have internal models of the world. They respond solely to external stimuli and the information available from their sensing of the environment…. Deliberative or goal directed agents have domain knowledge and the planning capability necessary to take a sequence of actions in the hope of reaching or achieving a specific goal…. Collaborative agents work together to solve problems. Communication between agents is an important element, and while each individual agent is autonomous, it is the synergy resulting from their cooperation that makes collaborative agents interesting and useful.” [page 10]

…intelligent agent software is practical software. It just gets the job done. If intelligent agent software introduces another level of complexity that the user has to deal with, then it will be a failure. Intelligent agents must be enabling and automating, not frustrating or intrusive.” [page 13]

Using Google & ColdFusion

I’m sure this has been on Macromedia’s site for a bit, but it’s an interesting article for two reasons:

a) I’ve never really looked into the CFX documentation, but it appears from this article that creating a CFX, at least in Java, is a snap. Basically you implement the CustomTag interface, which means you only have to write one method, processRequest(), which looks very much like the doGet() method of the HttpServlet. After that you can write to the screen (ie: out.println() in servlet land == response.write() in CFX land), create a Query object for a CF page to loop over, or simply set a variable and return that variable to the calling template (response.setVariable() which is probably very much like request.setAttribute() in servlet land).

b) Couldn’t the author have done everything in a CF script using createObject() rather than using a CFX?

Jakarta HTTPClient

I’m going through the Jakarta HTTPClient package (used in LARM to retrieve web pages) and I don’t understand what function the HostConfiguration class performs.

a) It looks like it’s just a wrapper for a URI that adds proxy server information (so that when the HttpConnection class calls a URI, the HostConfiguration class adds the proxy information to the request). That seem right?

b) What’s up with the developer not providing a lick of documentation for HostConfiguration? Normal? Oversight? Unnecessary? 🙂

Using the volatile keyword in Java

Using the volatile keyword in Java.

The volatile modifier is used when you are working with multiple threads.

The Java language allows threads that access shared variables to keep private working copies of the variables; this allows a more efficient implementation of multiple threads. These working copies need be reconciled with the master copies in the shared main memory only at prescribed synchronization points, namely when objects are locked or unlocked. As a rule, to ensure that shared variables are consistently and reliably updated, a thread should ensure that it has exclusive use of such variables by obtaining a lock that, conventionally, enforces mutual exclusion for those shared variables.

More on Wireless J2ME Applications with Java and Bluetooth

Java Developer’s Journal – Wireless J2ME Applications with Java and Bluetooth: “The oven is great at cooking, but bad at heating food quickly ­ and it’s also pretty expensive. Conversely, the microwave is cheap and great at heating food quickly, but it’s bad at cooking. Both devices have their trade-offs, although either could be used for heating and cooking. How does all this compare to wireless communication?

It’s pretty simple. Wireless LAN (802.11b) is good at connecting two relatively large devices with lots of power at high speeds. A good use of the technology is connecting two laptops at 11Mb/s. Wireless LAN is also good at connecting those devices at long distances (up to 300 ft).

Bluetooth is ideal if you want to connect small devices at slower speeds (1Mb/s) and within a shorter range (30 ft.). You can often find this technology on cheaper wireless headphones and even on higher performance devices like gaming peripherals. Why slower speeds? Isn’t faster better? Isn’t long-range communication a good thing? Not necessarily, especially when you consider the memory and power constraints on smaller devices. Faster connection speeds and longer communication ranges equate to larger power requirements. Why use an 11Mb/s connection if you’re transferring a 50K file between two PDAs?

One of Bluetooth’s strengths is its ability to function as a cable replacement technology. If you have multiple peripherals connected to your computer using RS-232 or USB, then Bluetooth is the ideal solution if you want to use those devices wirelessly. It’s difficult (if not impossible) to connect computer peripherals using 802.11b technology (except for printers). Bluetooth even has a built-in capability for wireless audio communication. To put things succinctly: Bluetooth will never replace 802.11b because it’s bad for:

  • Large file transfers between devices
  • Long-range communication

On the other hand, 802.11b will never replace Bluetooth because:

  • It can’t be used to communicate to peripherals.
  • It requires too much power for small devices.
  • It’s overkill for small data transfers.
  • It wasn’t designed for voice communication.

For the moment in the wireless communications arena, there’s no technology that’s best suited for every possible application. Either Bluetooth or 802.11b can be utilized for wireless communication between computers. Both have their place in the market, and both can perform remarkably well in their niches.

Wireless J2ME Applications with Java and Bluetooth

Java Developer’s Journal — Wireless J2ME Applications with Java and Bluetooth: “Let’s look at a scenario where life is made simpler using Java and Bluetooth technology: the Java Shared Whiteboard. Three employees of Acme Widgets Inc. need to have an impromptu meeting. Unfortunately, no conference rooms are available, so the team is forced to hold their meeting in the cafeteria. They would have preferred using a conference room because each room is equipped with an electronic whiteboard. However, since every member of the team has a Java Bluetooth-enabled PDA, their meeting in the cafeteria is very productive.

One member has a new program for his PDA called the Java Shared Whiteboard. Using Bluetooth technology, he sends that program to the rest of the team. Using Over-the-Air Provisioning (OTA) provided by J2ME, each member installs and runs the application on the fly. The meeting can now begin because the whiteboard is shared among the PDAs. Each participant can draw figures on his or her device and the image will appear instantly on the other screens. To save time, one member can take notes and send them to everyone’s device while the meeting is in progress.

Now with 50% less caffeine!