13.3 MESSAGE HANDLING USING J2EE

The concept of software collaboration via message passing is sometimes confused with collaborating via Remote Procedure Calls (RPCs), which is something different. RPC is more like what we discussed in depth when we looked at Remote Method Invocation, or RMI. Unlike RMI, messaging is a very loosely coupled process. The sender and receiver remain totally disassociated from each other. In fact, the sender of a message may not even know who consumed it. It could be a general message produced, like ‘this just happened in cell 12’ and any software process listening (subscribed) to events about cell 12 can pick it up. The fire-and-forget nature of message sending is a useful communications paradigm that we call asynchronous messaging. An example of the usefulness of asynchronous processing in general may serve us well, but still thinking about location services.

As Figure 13.8 shows, a user has unexpectedly arrived in a foreign place (perhaps for a last minute business meeting) and wishes to find and arrange accommodation, food and entertainment. Using the ‘My Area Search’ application, the user selects the required search fields and then specifies some particulars: four-star, non-smoking hotel room, somewhere to eat Indian food, and somewhere to watch a comedy film that evening. This type of request is a common requirement for travellers of all kinds. Location-based services have a lot to offer the traveller, particularly if the information service is ...

Get Next Generation Wireless Applications: Creating Mobile Applications in a Web 2.0 and Mobile 2.0 World, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.