This is a proof of concept demonstrating how a node.js client can obtain data from an Oracle db by using Pub/Sub with Redis. ASync provides control flow processing.
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
Node.js and Oracle db - Pub/Sub with Redis
1.
2. Data in 4 Easy Steps Node pub/sub with Redis Java pub/sub with Redis Java does query with message from Node Java publishes result set Async provides patterns for control flow
3. Java client receives a message containing the text to a query or stored procedure It processes the message by performing the request It returns the Result as a JSONArray of Jason Objects.
4. Lines 4 – 9, create 2 pairs of pub/sub clients Line 12-13, 15-16, when ready, subscribe to the results which is the JSONArray of JSONObjects Node.js
5. For query and storedProc, when a message is received, send it to the cb callback provided by Async. Publish the query or storedProc that was passed . Node.js
6. When processing is complete the node client ends the sub / pub connection. Node.js
7. Async provides parallel control flow. On line 10, the query function publishes it's message as does the storedProc function on line 24. Node.js test client
8. Continuing... Parallel control calls the anonymous function on line 32. The results obj contains the JSONArray data. After logging the results, the pub / sub is ended. Node.js test client
9. All open source. For complete write up see http://barton-notestomyself.blogspot.com/2011/12/nodejs-oracle-db-not-so-bad-union.html Node.js Oracle db Pub/Sub