LOGIN
Leigh Cosma
Full-Stack Developer
 · New YorkU.S.
Edit
Delete
Share
Report
QUESTION
  ·  Mark as Answered

New here. Currently working on a MEAN stack website for following bands on tour using the following APIs: Google Maps, BandsInTown, SetlistFm, echonest, Facebook. Will be posting a link soon once I’ve got something to show 😃 Music Web

Music
1 like 
Like
Share
Anton Voltchok
Software Engineer & Design Lead at Collaborizm
 · New YorkU.S.
Edit
Delete
Share
Report

Leigh Cosma, Hey bud, I’m going to be starting 2 projects making coding more accessible to the masses via illustration/infographic/animation.

I would need some help thinking of analogies for basic programing principles, common methods (and real world use cases) and assembling common code patterns

Would you be interested in helping out on something like that? (also I see you got the MEAN stack going on, have you used React yet by any chance?
(we’re running on RRR stack here at Collaborizm, - React Redux Rethink)

0 like 
John Hardy
Computer Engineer
 · BengaluruIndia
Edit
Delete
Share
Report

Redux and React are for javascript apps. What’s rethink?

0 like 
Anton Voltchok
Software Engineer & Design Lead at Collaborizm
 · New YorkU.S.
Edit
Delete
Share
Report

Hey John Hardy thanks for the question,

RethinkDB open-source distributed database that stores JSON documents. It is a NoSQL solution to data storage, there may seem to be similarities to MongoDB but ReThink has a completely different architecture underneath. (It also might be the most intuitive persistence layer solution I’ve looked at). For us at Collaborizm it’s excellent because we get to use Javascript on the client side, the backend, AND in the database (although RethinkDB has excellent support for all popular programming languages) Here’s a little run down for you:

Scaling made easy - you can shard and replicate in a couple clicks with their a web ui.

Allows you to rapidly iterate and evolve your data structure over time. Let’s you focus on your application and prototyping over data modeling

It is both developer and operations oriented - combining an easy-to-use powerful query language with simple controls for operating at scale with high availability

Comes with a fantastic GUI based tool for real-time performance and health status. It’s also a management tool for each server and database in your cluster, as well as a data explorer for running queries

RethinkDB has it’s own query language ReQL. ReQL has official native bindings in Javascript, Ruby and Python (A number of unofficial bindings are also available). With this chainable query language you are able to ‘talk’ to your database in a language you are already comfortable with. One of the biggest benefits to arise from this approach is that query injection is now something of the past as you are no longer manipulating strings when querying a database.

The creation of a table in SQL and RethinkDB brings forward the issue of requiring a schema. In the world of RethinkDB you need not concern yourself with confirming the structure of your data prior to creating a table, only knowing that you want to store a certain type of something. > In SQL however, data modelling has to be considered as a step prior to creating your tables. This is important to flag up as in agile development, SQL puts up a significant road-block here. There is certain commitment that needs to be made by the developer up-front in order to cement the schema of a database. So if you’re in a situation where you have a fair amount of uncertainty in how you will model your data, RethinkDB has a clear advantage here

(Insertion) RethinkDB works with, and stores documents as JSON. You can use the insert command to insert one or more records at a time, and each document can have a varying structure and also contain nested documents. Any valid JSON document, is valid in RethinkDB

(Querying) When looking at equality, there isn’t too much to differentiate NoSQL and Rethink

r.db(‘game’).table('characters').filter({name: ‘Chuky’});```

**Below is the SQL counterpart**

```SQL
SELECT * 
FROM characters 
WHERE name = 'Goku';

When looking outside of equality, in RethinkDB you can use functions as filters for your data

r.db(‘game’).table('characters').filter(function(row){
        return row('maxStrength').gt(700000).and(row('species').contains(‘alienfish’));
    })

In rethink grouping is also significantly easier, for example to group characters in the database by species we can apply a group by species

r.db(‘game’).table('characters').group('species');

To achieve a similar result in SQL requires the use of LEFT JOINs, plus the use of group_concat() to make sure information isn’t lost from grouping.

RethinkDB shines in realtime applications (think google docs live editing with multiple people), right now they have streams but you still have to do a decent amount of work yourself to make it happen. However they have a feature coming up very soon which abstracts away complexity involved with setting up Socket.io/WebWorkers so very soon it should be much easier to set up realtime functionality

Although as you can tell I’m a fan, I’m not saying RethinkDB is the perfect solution for every problem, for example it is not a good solution if you need a fixed schema, or require transaction support. In this case you should still look to SQL for these use cases. It is also not a good solution if you intend to use it for intense data analysis. This use case would be better suited to another NoSQL system like Hadoop.

Robert Lancer is our tech lead and architect, and as you may guess is also a big fan of RethinkDB, if you have any questions about the stack or RethinkDB in particular, feel free to post a question on his wall or reach out to me whenever. There, that’s the end of my pitch on Rethink, hope you enjoyed it haha 😃

0 like 
John Hardy
Computer Engineer
 · BengaluruIndia
Edit
Delete
Share
Report

AMAZING. Hats off. I’am in awe of this concept.

0 like 
Leave a reply...
DISCOVER
CHAT
ALERTS
-2
DISCUSSIONS
-1
FEED