kaiak31 / numbersrest Goto Github PK
View Code? Open in Web Editor NEWplaying with Node.js and Riak
playing with Node.js and Riak
Question: Write a node.js server that takes a number from the client , saves it, returns it based on another call, and modifies it based on a third call. The number should be saved in RIAK. Program Solution: The program will create a TCP Server and also 1 client (socket) connection. This client will send a number and the server will perform the following: 1.Receive a digit from client 2.Save it using a call back to retrieve the data 3.Upon data retrieval a call back is issue to modify the data. 4.Data will be modified (incremented by one) and saved. 5. Steps 2-4 are done in a callback loop for 3 times. At the end of each iteration, the new value is send back to the client. I Notes: I wanted to really understand node.js's callback loop and events and added a bonus step in creating the loop(step 2-4). If time permitted, I would have sent error messages back to the client if they sent a non-digit. Also, for the looping, I would have liked to include the client-sending data once it receives it from the server. Challenges: I had to build riak from scratch since Riak doesn't have a package installer for 32-bit computers. This took a few hours to figure out. Intro to NoSQL, a bit of a learning curve. Learning Node, riak-js and express took some time as well. Conclusion: This was a great excercise and Node has definately piqued my interest.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.