Using event gateways
Because event gateways provide a generalized asynchronous messaging mechanism, you can use them with many kinds of event or messaging resources. For example, ColdFusion MX includes gateways (either product quality, or lighter weight example gateways) for communicating between ColdFusion applications and the following types of resources:
-
Mobile phones and other devices that support short messaging services (SMS)
-
XMPP or IBM Sametime Instant message clients
-
Java Sockets (which let your ColdFusion application communicate with TCP/IP-based devices and programs, such as Telnet terminal clients).
-
Java Messaging Service (JMS) resources, such as storefront sales order handling systems.
Event gateways are not limited to sending or receiving information using communications protocols. For example, ColdFusion MX includes an example event gateway that monitors changes to a directory and invokes a CFC method whenever the directory changes. ColdFusion MX also includes an event gateway that lets a CFML application "call" a CFC asynchronously and continue processing without getting a response from the CFC.
Just as you can create event gateways that serve many different event or messaging based technologies, you can write many kinds of applications that use them. Just a few examples of possible gateway uses include the following.
Server to client push examples
-
An application that sends an instant message (IM) or SMS text message to a person who can approve a purchase order, get a response, and mark the purchase order as approved or denied.
-
A bot that notifies users through their preferred messaging method (cell phone, instant messaging, or even e-mail) when watch list stock goes up, and offers to buy or sell the stock immediately.
-
An application that authenticates web users by sending them an SMS message that includes code that they must to enter into the browser in order to proceed.
Client to server examples
-
A menu-based SMS application that lets users get information from any of several web service data providers. ColdFusion MX includes a SMS menuing example int the gateways/cfc directory.
-
A instant messaging application that takes messages from users to technical support and assigns and directs the messages to the most available support staff member. The application could also log the user ID and session, and you could use ColdFusion MX to generate usage reports.
-
A directory lookup robot IM "buddy" that responds to messages chat contain an employee's name with the employee's phone number or buddy ID.
Server to serve examples
-
A JMS subsystem that publishes status updates that are consumed by business intelligence systems.
-
A system that monitors and publishes download events from a website.
View comments in LiveDocs