| By Matthew Woodward | Article Rating: |
|
| June 16, 2005 01:00 PM EDT | Reads: |
53,197 |
Although the onIncomingMessage function within the CFC doesn't return anything, the SendGatewayMessage() function returns a boolean. The gateway itself is limited in providing feedback because of its asynchronous nature, so the status boolean that is returned is really an indication of whether or not the call to the gateway was successful; it does not indicate whether or not the gateway's process itself was successful. The success or failure of the process inside the gateway itself must be retrieved using one of the methods previously outlined.
Now here's where the asynchronous magic happens. Once you call SendGatewayMessage(), processing within your application doesn't stop and wait for a response. The application immediately proceeds past that point in the code, and no matter how lengthy the gateway process is, your application is free to proceed. For lengthy processes that would previously hang up your application this is just what the doctor ordered!
Conclusion
Event gateways open ColdFusion applications up to a whole new world of possibilities. The asynchronous CFML gateway is simple, elegant, tremendously powerful, and surprisingly simple to use. If you have long-running processes in your ColdFusion applications or want to add functionality to your application that you were afraid to attempt before due to potential issues with the traditional request/response model, fear no longer. Write a CFC to handle the processing, register it in the ColdFusion administrator, and take advantage of the power of asynchronous processing.
Resources
Corfield, Sean (2005, April 16). "Asynchronous CFML - Concurrency Library." http://corfield.org/blog/index.cfm?do=blog.entry&entry=4D121277-A559-411...
Corfield, Sean (2005, April 14). "Debugging and Caching in Event Gateways." http://corfield.org/blog/index.cfm?do=blog.entry&entry=3F160E0C-B987-C46...
Forta, Ben (2005, March 16). "Understanding Asynchronous Processing." http://www.forta.com/blog/index.cfm?mode=e&entry=1541
Jordahl, Tom (2005, March 16). "Taking Advantage of ColdFusion MX 7 Event Gateways." Recorded Macrochat. http://www.macromedia.com/devnet/mx/coldfusion/articles/gateway_macrocha...
Published June 16, 2005 Reads 53,197
Copyright © 2005 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Matthew Woodward
Matt Woodward is Principal Information Technology Specialist with the Office of the Sergeant at Arms at the United States Senate. He was until recently a Web application developer for i2 Technologies in Dallas, Texas. A Macromedia Certified ColdFusion Developer and a member of Team Macromedia, he has been using ColdFusion since 1996. In addition to his ColdFusion work, Matt also develops in Java and PHP.
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe Flex Developer Earns $100K in New York City
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Adobe Cans Another 9% of its Workforce
- Moyea DVD4Web Converter V2.0 Converts DVD to FLV Fast and Synchronously with Watermarks
- Adobe Fiddles with its Web Apps
- Adobe & Salesforce Cut Cloud Deal
- Hosting.com Launches ColdFusion 9 in the Cloud
- The Real Time Infrastructure Ultimatum
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- The Planet Named “Bronze Sponsor” of Cloud Computing Expo
- Microsoft Expression Web Has Got Game
- Adobe Flex Developer Earns $100K in New York City
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Bruce Chizen Joins Voyager Capital as Venture Partner
- My Top Seven Wishes From Adobe MAX 2009
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- Constructing an Application with Flash Forms from the Ground Up
- AJAX World RIA Conference & Expo Kicks Off in New York City
- CFEclipse: The Developer's IDE, Eclipse For ColdFusion
- Personal Branding Checklist
- Adobe Flex 2: Advanced DataGrid
- Has the Technology Bounceback Begun?
- Building a Zip Code Proximity Search with ColdFusion
- i-Technology Viewpoint: We Need Not More Frameworks, But Better Programmers
- The Asynchronous CFML Gateway
- Web Services Using ColdFusion and Apache CXF

































