|By Matthew Woodward||
|June 16, 2005 01:00 PM EDT||
One of the most powerful new features available in ColdFusion MX 7 Enterprise that many ColdFusion developers might not yet be using is event gateways. Event gateways open up entirely new possibilities for ColdFusion and allow our ColdFusion applications to communicate with more or less any other Internet-enabled system even if the system doesn't communicate via the "traditional" HTTP protocol.
CFMX 7 Enterprise ships with a few gateways to get you started, such as an SMS gateway for communicating with mobile devices, a directory watcher gateway, a socket gateway, a Java Message Service (JMS) gateway, and Jabber/XMMP as well as Lotus Sametime IM gateways, so you have a lot of possibilities right out of the box.
If you don't need the specific functionality offered by these gateways you might not have investigated them thoroughly and because the event gateways themselves are written in Java, creating new gateways may not be a high-priority item for many ColdFusion developers. But there is another gateway that ships with CFMX 7 Enterprise that ColdFusion developers can take advantage of right away, which offers numerous benefits in your ColdFusion applications. In this article I'd like to introduce you to the Asynchronous CFML Gateway, describe some of the great potential uses of the gateway, and show how I added an asynchronous CFML gateway to vastly improve the performance and functionality in an existing ColdFusion application.
The Asynchronous CFML Gateway
The purpose of the asynchronous CFML gateway is to allow developers to offload long-running processes to the gateway. The gateway immediately passes control back to the application and does it's processing behind the scenes. This means that your users will no longer have to wait for lengthy batch processes to complete before doing other things within the application. This is great for things like logging, which if you log a lot of data can really bog down your application since the user has to wait for the logging process to complete on each request.
Even if you have a process that runs behind the scenes that is initiated by the ColdFusion scheduler as opposed to by a user action, leveraging the asynchronous gateway can allow for the process to complete more quickly. For example, if you have a loop of some sort and the work done upon each iteration is fairly lengthy, by sending a message to the asynchronous gateway on each loop iteration the overall process doesn't need to wait for each iteration to complete before proceeding.
What allows this magic to be possible is the use of ColdFusion Components (CFCs) that operate within the event gateway environment as opposed to being tied to a specific request. By creating a CFC that contains a few specific methods (actually we'll concern ourselves with one method in particular - more on this in a moment) and registering the CFC as an event gateway instance in the ColdFusion administrator, the CFC can now operate independently of the traditional request/response model of web applications.
Bear in mind, however, that not all processes are suitable for use with the asynchronous event gateway. One big caveat here is that because the asynchronous process is detached from the request/response cycle, it isn't really feasible to provide feedback to the user in a traditional way such as sending the user to a confirmation page when a process completes. Also, if your application contains processes that occur sequentially and later processes rely on the results of preceding processes, then even if one of these processes is time-consuming this isn't a case in which use of the asynchronous gateway is possible. When you use the asynchronous gateway you essentially throw the process over the fence and give up control over when it completes and the ability to rely on the results of the asynchronous process.
The asynchronous CFC can however, do things such as log information to a file or database, send information via e-mail, or even send an instant message using the IM gateway, so by no means does the asynchronous CFC's processing disappear into a black hole.
In addition to these methods the event gateways can of course also use the cflog tag, which outputs information to a log that can be viewed from the ColdFusion administrator or directly in the log file itself. In the ColdFusion administrator's Debugging & Logging section you will also see an Event Gateway log that can provide information about what occurs inside your gateways. Finally, for some additional thoughts and methods by which to get feedback from asynchronous CFCs, please see Sean Corfield's blog entries about his Concurrency library under "Resources" at the end of this article.
If you haven't considered the power of asynchronous processing before, I'd be willing to bet the wheels are spinning and your head is filling with ideas of how you can leverage this power in your applications. Let's take a look at one real-world example that created dramatic improvements and was surprisingly easy to build.
Web-Based "E-Mail Blaster"
A few years ago I wrote a ColdFusion application for my company's marketing department that is used for generating and sending e-mail marketing campaigns. This application became affectionately known as the "E-Mail Blaster." Prior to the existence of the E-Mail Blaster our marketing team was literally cutting and pasting e-mail addresses from an Excel spreadsheet into the Lotus Notes e-mail client. Clearly not the most efficient way to do things given the fact that some of our larger batches of e-mail can top 50,000 recipients, and Notes has an upper limit of a few hundred recipients for each e-mail. (Before you declare me the Spam King of Texas, bear in mind that that our lists are entirely opt-in!)
When I saw how the marketing department was dealing with these e-mail campaigns I immediately knew that this was a perfect job for ColdFusion. ColdFusion Enterprise handles large volumes of e-mail extremely well, and it was quite simple to build a web-based interface for creating e-mail campaigns that saves countless hours of time versus the old cut-and-paste method. We use another tool to maintain contact lists, so the marketing team extracts the recipient list into an Excel spreadsheet. They then use the ColdFusion application to upload the Excel spreadsheet containing the recipients' e-mail addresses along with an HTML file containing the contents of the e-mail, and the E-mail Blaster handles the rest.
Hurry Up and Wait
The application was an immediate hit with the marketing department, but there was one drawback. Even as quickly as ColdFusion handles e-mail it still takes a bit of time to process 50,000 e-mails, and in the traditional request/response model of web applications this means the user of the application has to wait ... and wait ... and wait for the process to complete. This doesn't necessarily mean the user can't go do something else while it's processing, but people tend to get used to submitting a form and seeing a response relatively quickly so by force of habit the users of the E-mail Blaster tend to wait for a response from the application.
In a long-running process such as this the response can be substantially delayed, and this can cause problems ranging from simple annoyance to users resubmitting e-mail batches because they assume the process stopped or an error occurred. In the original version of the application there were problems with Internet Explorer refreshing the processing page automatically because I wasn't flushing anything to the screen during the send process. Once I discovered this issue I updated the application to flush each e-mail address to the screen as the e-mail was sent, which gave the user primitive feedback and also solved the auto-refresh issue with Internet Explorer.
"My role is working with customers, helping them go through this digital transformation. I spend a lot of time talking to banks, big industries, manufacturers working through how they are integrating and transforming their IT platforms and moving them forward," explained William Morrish, General Manager Product Sales at Interoute, in this SYS-CON.tv interview at 18th Cloud Expo, held June 7-9, 2016, at the Javits Center in New York City, NY.
Jul. 28, 2016 05:30 PM EDT Reads: 2,208
You think you know what’s in your data. But do you? Most organizations are now aware of the business intelligence represented by their data. Data science stands to take this to a level you never thought of – literally. The techniques of data science, when used with the capabilities of Big Data technologies, can make connections you had not yet imagined, helping you discover new insights and ask new questions of your data. In his session at @ThingsExpo, Sarbjit Sarkaria, data science team lead ...
Jul. 28, 2016 04:30 PM EDT Reads: 1,178
Extracting business value from Internet of Things (IoT) data doesn’t happen overnight. There are several requirements that must be satisfied, including IoT device enablement, data analysis, real-time detection of complex events and automated orchestration of actions. Unfortunately, too many companies fall short in achieving their business goals by implementing incomplete solutions or not focusing on tangible use cases. In his general session at @ThingsExpo, Dave McCarthy, Director of Products...
Jul. 28, 2016 04:15 PM EDT Reads: 1,772
WebRTC is bringing significant change to the communications landscape that will bridge the worlds of web and telephony, making the Internet the new standard for communications. Cloud9 took the road less traveled and used WebRTC to create a downloadable enterprise-grade communications platform that is changing the communication dynamic in the financial sector. In his session at @ThingsExpo, Leo Papadopoulos, CTO of Cloud9, discussed the importance of WebRTC and how it enables companies to focus...
Jul. 28, 2016 03:45 PM EDT Reads: 1,018
Verizon Communications Inc. (NYSE, Nasdaq: VZ) and Yahoo! Inc. (Nasdaq: YHOO) have entered into a definitive agreement under which Verizon will acquire Yahoo's operating business for approximately $4.83 billion in cash, subject to customary closing adjustments. Yahoo informs, connects and entertains a global audience of more than 1 billion monthly active users** -- including 600 million monthly active mobile users*** through its search, communications and digital content products. Yahoo also co...
Jul. 28, 2016 03:15 PM EDT Reads: 691
A critical component of any IoT project is what to do with all the data being generated. This data needs to be captured, processed, structured, and stored in a way to facilitate different kinds of queries. Traditional data warehouse and analytical systems are mature technologies that can be used to handle certain kinds of queries, but they are not always well suited to many problems, particularly when there is a need for real-time insights.
Jul. 28, 2016 03:15 PM EDT Reads: 1,903
Amazon has gradually rolled out parts of its IoT offerings in the last year, but these are just the tip of the iceberg. In addition to optimizing their back-end AWS offerings, Amazon is laying the ground work to be a major force in IoT – especially in the connected home and office. Amazon is extending its reach by building on its dominant Cloud IoT platform, its Dash Button strategy, recently announced Replenishment Services, the Echo/Alexa voice recognition control platform, the 6-7 strategic...
Jul. 28, 2016 12:30 PM EDT Reads: 604
The best-practices for building IoT applications with Go Code that attendees can use to build their own IoT applications. In his session at @ThingsExpo, Indraneel Mitra, Senior Solutions Architect & Technology Evangelist at Cognizant, provided valuable information and resources for both novice and experienced developers on how to get started with IoT and Golang in a day. He also provided information on how to use Intel Arduino Kit, Go Robotics API and AWS IoT stack to build an application tha...
Jul. 28, 2016 12:00 PM EDT Reads: 1,239
IoT generates lots of temporal data. But how do you unlock its value? You need to discover patterns that are repeatable in vast quantities of data, understand their meaning, and implement scalable monitoring across multiple data streams in order to monetize the discoveries and insights. Motif discovery and deep learning platforms are emerging to visualize sensor data, to search for patterns and to build application that can monitor real time streams efficiently. In his session at @ThingsExpo, ...
Jul. 28, 2016 11:15 AM EDT Reads: 1,149
SYS-CON Events announced today that LeaseWeb USA, a cloud Infrastructure-as-a-Service (IaaS) provider, will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. LeaseWeb is one of the world's largest hosting brands. The company helps customers define, develop and deploy IT infrastructure tailored to their exact business needs, by combining various kinds cloud solutions.
Jul. 28, 2016 10:45 AM EDT Reads: 1,289
SYS-CON Events announced today that 910Telecom will exhibit at the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Housed in the classic Denver Gas & Electric Building, 910 15th St., 910Telecom is a carrier-neutral telecom hotel located in the heart of Denver. Adjacent to CenturyLink, AT&T, and Denver Main, 910Telecom offers connectivity to all major carriers, Internet service providers, Internet backbones and ...
Jul. 28, 2016 10:30 AM EDT Reads: 833
Big Data, cloud, analytics, contextual information, wearable tech, sensors, mobility, and WebRTC: together, these advances have created a perfect storm of technologies that are disrupting and transforming classic communications models and ecosystems. In his session at @ThingsExpo, Erik Perotti, Senior Manager of New Ventures on Plantronics’ Innovation team, provided an overview of this technological shift, including associated business and consumer communications impacts, and opportunities it ...
Jul. 28, 2016 10:00 AM EDT Reads: 285
SYS-CON Events announced today that Venafi, the Immune System for the Internet™ and the leading provider of Next Generation Trust Protection, will exhibit at @DevOpsSummit at 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Venafi is the Immune System for the Internet™ that protects the foundation of all cybersecurity – cryptographic keys and digital certificates – so they can’t be misused by bad guys in attacks...
Jul. 28, 2016 09:30 AM EDT Reads: 1,416
It’s 2016: buildings are smart, connected and the IoT is fundamentally altering how control and operating systems work and speak to each other. Platforms across the enterprise are networked via inexpensive sensors to collect massive amounts of data for analytics, information management, and insights that can be used to continuously improve operations. In his session at @ThingsExpo, Brian Chemel, Co-Founder and CTO of Digital Lumens, will explore: The benefits sensor-networked systems bring to ...
Jul. 28, 2016 09:00 AM EDT Reads: 1,620
Manufacturers are embracing the Industrial Internet the same way consumers are leveraging Fitbits – to improve overall health and wellness. Both can provide consistent measurement, visibility, and suggest performance improvements customized to help reach goals. Fitbit users can view real-time data and make adjustments to increase their activity. In his session at @ThingsExpo, Mark Bernardo Professional Services Leader, Americas, at GE Digital, discussed how leveraging the Industrial Internet a...
Jul. 28, 2016 07:30 AM EDT Reads: 544
There will be new vendors providing applications, middleware, and connected devices to support the thriving IoT ecosystem. This essentially means that electronic device manufacturers will also be in the software business. Many will be new to building embedded software or robust software. This creates an increased importance on software quality, particularly within the Industrial Internet of Things where business-critical applications are becoming dependent on products controlled by software. Qua...
Jul. 28, 2016 06:45 AM EDT Reads: 1,583
In addition to all the benefits, IoT is also bringing new kind of customer experience challenges - cars that unlock themselves, thermostats turning houses into saunas and baby video monitors broadcasting over the internet. This list can only increase because while IoT services should be intuitive and simple to use, the delivery ecosystem is a myriad of potential problems as IoT explodes complexity. So finding a performance issue is like finding the proverbial needle in the haystack.
Jul. 28, 2016 05:45 AM EDT Reads: 2,340
The 19th International Cloud Expo has announced that its Call for Papers is open. Cloud Expo, to be held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, Big Data, Internet of Things, DevOps, Digital Transformation, Microservices and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportuni...
Jul. 28, 2016 03:15 AM EDT Reads: 2,661
Large scale deployments present unique planning challenges, system commissioning hurdles between IT and OT and demand careful system hand-off orchestration. In his session at @ThingsExpo, Jeff Smith, Senior Director and a founding member of Incenergy, will discuss some of the key tactics to ensure delivery success based on his experience of the last two years deploying Industrial IoT systems across four continents.
Jul. 28, 2016 03:00 AM EDT Reads: 1,656
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and shared the must-have mindsets for removing complexity from the develo...
Jul. 28, 2016 02:30 AM EDT Reads: 1,571