In prior post How to Integrate MongoDB with Diffusion Cloud, we discussed how Diffusion Cloud’s JSON topics dovetail with MongoDB’s JSON documents, and how in turn a MongoDB collection can be reflected as a branch of JSON topics. This approach gives the end consumer a means of subscribing to a MongoDB collection and changes to it. Additionally, it makes the information easily available to smartphones and web browsers, who are likely far removed from your MongoDB server.
Making things interesting with real data.
In our the prior blog, we created 100 Mongo documents to test the system out. This time, we’ll use real data to make things more interesting, and draw on the real foreign exchange data free available from TrueFX.
This standalone script polls the TrueFX service every 500ms, and gets real prices for a handful of currency pairs. The service is free, and registration gets you more than the basic set of currency pairs.
Visualizing the data
As prices rise and fall the tables cells flicker red and green. Web development is very far from my forte, nevertheless I was greatly impressed at how quickly a project could begin and get off the ground. The Electron name is a great piece of wordplay, being the ‘shell’ within which GitHub’s ‘Atom’ project exists. Keep on punning and developing guys, it’s only version one and it’s already looking great!
Let’s have a look at it all in action in our short video.
A quick summary
This blog began as a vehicle to explore the JSON features in Diffusion Cloud and any challenges encountered connecting it to something else, but has grown into something more ornate drawing in real data, and visualizing it a familiar manner:
Try Diffusion Cloud
Try Diffusion Cloud for yourself for free to see how easy it is for Diffusion Cloud to reflect a MongoDB collection into the topic tree.
Want to see how easy it is to get started with Diffusion Cloud? Sign up for a free demo here.
The Diffusion Intelligent Data Platform manages, optimizes, and integrates data among devices, systems, and applications. Push Technology pioneered and is the sole provider of real-time delta data streaming™ technology that powers mission-critical business applications worldwide. Leading brands use Push Technology to fuel revenue growth, customer engagement, and business operations. The products, Diffusion® and Diffusion Cloud™, are available on-premise, in-the-cloud, or in a hybrid configuration, to fit the specific business and infrastructure requirements of the applications operating in today’s mobile obsessed, everything connected world. Learn how Push Technology can reduce infrastructure costs, and increase speed, efficiency, and reliability, of your web, mobile, and IoT application.