Implementation Technical Background Research

Posted on April 19, 2012

0


Nodejs Server Research

Implemented a TCP server in nodejs, however, it was discovered that a TCP server may not be the best technology for AgNetPro, as the server opens a connection to the server and listens for messages on the server, therefore, the initial request will only open a socket rather than trigger a request.

The Nodejs TCP server was implemented due to problems of message being rebroadcasted when using Nodejs HTTP server with Socket IO – this was discovered when testing and debugging code.  This was later resolved by using a straight nodejs HTTP server without Socket IO.  It was also discovered that Socket IO was not necessary for sending and receiving messages between FrontlineSMS and Nodejs.

Google Search Nodejs TCP Server: https://www.google.co.uk/search?aq=f&sourceid=chrome&ie=UTF-8&q=nodejs+tcp+server [accessed 18-04-2012]

Nodejs .NET Manual and Documentation: http://nodejs.org/docs/v0.4.12/api/net.html#server.listen [accessed 18-04-2012]

Nodejs TCP Socket Programming: http://www.hacksparrow.com/tcp-socket-programming-in-node-js.html [accessed 18-04-2012]

Benchmarking TCP Server with Nodejs: http://nodetuts.com/tutorials/24-benchmarking-your-tcp-server-with-nodejs.html [accessed 18-04-2012]

Nodejs TCP Server Application (dotcloud questions): http://answers.dotcloud.com/question/560/nodejs-tcp-application  [accessed 18-04-2012]

Nodejs Simple Examples: http://howtonode.org/hello-node  [accessed 18-04-2012]

Simple TCP Based Chat Server: https://gist.github.com/707146 [accessed 18-04-2012]

Book on using Nodejs: http://book.mixu.net/[accessed 18-04-2012]

Connections, the Event Loop and the One and Only JS Thread (nodejs google group):  http://groups.google.com/group/nodejs/browse_thread/thread/82e33c65a96bef68 [accessed 17-04-2012]

Threads and asynchronous connection

Threads-A-GoGo  Javascript Threads for Nodejs: https://github.com/xk/node-threads-a-gogo [accessed 17-04-2012]

Libeio Event Based Fully Asynchronous I/O Library for C: http://software.schmorp.de/pkg/libeio.html  [accessed 17-04-2012]

Taking Baby Steps with Nodejs: http://elegantcode.com/2011/05/04/taking-baby-steps-with-node-js-websockets/ [accessed 17-04-2012]

Keeping HTTP Connection Alive (nodejs google group): http://groups.google.com/group/nodejs/browse_thread/thread/648e969c3830c15d/1aa487786b9f94f5 %5Baccessed 17-04-2012]

Code Academy Javascript Glossary: http://www.codecademy.com/glossary [accessed 17-04-2012]

Connect Static Cache (connect module for nodejs): http://www.senchalabs.org/connect/staticCache.html [accessed 17-04-2012]

Node Templates: http://paularmstrong.github.com/node-templates/ %5Baccessed 17-04-2012]

Nodejs Natural Language library for implementing artificial intelligence

Natural Language Processing Library for Nodejs: https://github.com/NaturalNode/natural/blob/master/README.md %5Baccessed 17-04-2012]

Natural Language Processing Library Git Repository: https://github.com/NaturalNode/natural/tree/master/lib/natural [accessed 17-04-2012]

Using Natural – Natural Language Processing Library for Nodejs: http://css.dzone.com/articles/using-natural-nlp-module %5Baccessed 17-04-2012]

Chris Umbel – Natural Language Processing Nodejs: http://www.chrisumbel.com/article/node_js_natural_language_porter_stemmer_lancaster_bayes_naive_metaphone_soundex %5Baccessed 17-04-2012]

Developers NLTK Guide: http://code.google.com/p/nltk/wiki/DevelopersGuide [accessed 17-04-2012]

Request – Simplified HTTP Request: https://github.com/mikeal/request %5Baccessed 17-04-2012]

XML Parser was needed for parsing weather data from google weather api, as one of the user requirement included retrieving weather conditions.  All of the XML libraries seemed to work of the node-expat or libxml library which was throwing errors.  Therefore, the data information is currently being retrieved from google but not being parsed.  This feature will be available in future release.

LibXML to JS Nodejs Module: https://github.com/SaltwaterC/libxml-to-js#readme [accessed 17-04-2012]

List of Nodejs Modules: https://github.com/joyent/node/wiki/modules#wiki-parsers-xml  [accessed 17-04-2012]

Google Search Nodejs Reading XML Page: http://www.google.co.uk/search?hl=en&site=&source=hp&q=nodejs+reading+xml+page&oq=nodejs+reading+xml+page&aq=f&aqi=&aql=&gs_l=hp.3…702l17741l0l17938l27l26l2l1l2l0l209l1849l17j3j1l21l0. [accessed 17-04-2012]

JSDOM – Implementation of HTML5 DOM in Javascript: https://github.com/tmpvar/jsdom [accessed 17-04-2012]

Nodejs JSDOM Error on Stackoverflow (received similar error when trying to use node googleweather module which relies on the JSDOM module to parse xml data): http://stackoverflow.com/questions/10143288/node-js-jsdom-error  [accessed 17-04-2012]

Error Message logged in JSDOM Issues on Git: https://github.com/tmpvar/jsdom/issues/436 [accessed 17-04-2012]

Libexpat XML Sax parser binding for node.js (Node-Expat): https://github.com/astro/node-expat#readme  [accessed 17-04-2012]

The Expat XML Parser: http://expat.sourceforge.net/ %5Baccessed 17-04-2012]

Node-XML2JSON Library for Nodejs: https://github.com/buglabs/node-xml2json#readme %5Baccessed 17-04-2012]

LibXMLjs – LibXML binding for javascript v8 library: https://github.com/polotek/libxmljs#readme %5Baccessed 17-04-2012]

XML C Parser : http://www.xmlsoft.org/  [accessed 17-04-2012]

LibXML Downloads: http://xmlsoft.org/sources/ %5Baccessed 17-04-2012]

Waf Meta Build System:  http://code.google.com/p/waf/ [accessed 17-04-2012]

Node- GoogleWeather module for nodejs:  https://github.com/ianshward/node-google-weather [accessed 17-04-2012]

JSDOM Use Cases (Stackoverflow): http://stackoverflow.com/questions/6101673/what-are-the-use-cases-of-jsdom %5Baccessed 17-04-2012]

Javascript JSDOM: http://krook.org/jsdom/ %5Baccessed 17-04-2012]

Node-Iconv Nodejs Iconv bindings: https://github.com/bnoordhuis/node-iconv#readme [accessed 17-04-2012]

Javascript NPM Registry: http://search.npmjs.org/ %5Baccessed 17-04-2012]

Libxml2 – XML parser and markup toolkit repository: http://git.gnome.org/browse/libxml2/  %5Baccessed 17-04-2012]

LibXML LibXSLT Binaries: http://www.explain.com.au/oss/libxml2xslt.html [accessed 17-04-2012]

Understanding Mac OSX environment variable for setting node path.

Understanding Mac Environment Variables: http://garyboone.com/2009/06/understanding-mac-environment-variables/?wscr=1440×900  [accessed 17-04-2012]
How to Edit Path Environment Variables: http://hathology.com/2008/06/how-to-edit-your-path-environment-variables-on-mac-os-x/ [accessed 17-04-2012]
Google Search Mac Environment Variables: http://www.google.co.uk/search?hl=en&site=&source=hp&q=mac+environment+variables&oq=mac+env&aq=0&aqi=g10&aql=&gs_l=hp.3.0.0l10.6210l13390l0l16225l7l7l0l0l0l0l84l268l7l7l0.  [accessed 17-04-2012]
NPM Local vs Global Install: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/  [accessed 17-04-2012]
Node XML2JS-Expat: https://github.com/Poetro/node-xml2js-expat [accessed 17-04-2012]
Manipulating JSON and XML with Nodejs: http://templth.wordpress.com/2011/06/07/manipulating-json-and-xml-with-node-js/ [accessed 17-04-2012]
Node-Mysql Javascript Client Implementing MYSQL: https://github.com/felixge/node-mysql [accessed 17-04-2012]
Most Important Nodejs Modules (blog): http://www.freshblurbs.com/important-node-js-modules [accessed 17-04-2012]
Google Search  nodejs bindings mac osx: http://www.google.co.uk/search?hl=en&q=libxml+nodejs+bindings+mac+osx&oq=libxml+nodejs+bindings+mac+osx&aq=f&aqi=&aql=&gs_l=serp.3…16102l20161l0l20454l17l17l5l0l0l0l233l1170l6j1j2l9l0. [accessed 17-04-2012]
Six Must Have Nodejs Modules (Nodejitsu blog): http://blog.nodejitsu.com/6-must-have-nodejs-modules [accessed 17-04-2012]
Node-GoogleWeather.js: https://github.com/maxkueng/node-googleweather/blob/master/lib/googleweather.js  [accessed 17-04-2012]
Nodejs Email Handling: https://gist.github.com/1226809 [accessed 17-04-2012]
24 Ways to Have a Field Day With HTML5 Forms: http://24ways.org/2009/have-a-field-day-with-html5-forms [accessed 14-04-2012]
FrontlineSMS: http://www.frontlinesms.com/

Disabling Favicon request in Nodejs https://gist.github.com/763822 [accessed 20-04-2012]