REAN Stack – A new thought

Erstellt von Vishnu CA am 15. Jun 2018

Similiar to MEAN stack, REAN is a collection of JavaScript-based technologies — RethinkDB, Express.js, AngularJS, and Node.js — used to develop project has a great potential, especially for realtime web and mobile apps, consuming API’s and for developers who want to minimize DB related boilerplate code.

Why REAN Stack?

The major benefit of the REAN stack is that it’s extremely quick to prototype with. Node.js allows you to use Javascript on the backend as well as the frontend which can save you from having to learn a separate language. In addition, the NoSQL nature of RethinkDB allows you to quickly change and alter the data layer without having to worry about migrations, which is a very valuable attribute when you’re trying to build a product without clear specifications and also RethinkDB pushes JSON to your apps in realtime. Finally, these technologies have a lot of community support behind them so finding answers to questions or hiring help is going to be much easier using these technologies.
An obvious question would be why the choice of RethinkDB, Node.js, and Express, when we could use any other stack.
To be correct, we could use any other technology, such as Java, PHP, ASP.NET, or even Ruby on Rails, to build the backend part and angularjs would work just as fine.
The main reason to choose this stack is that all the tools within this stack use a single language, which is JavaScript. Other than this, each of the following tools offers certain unique benefits that make it equally suitable to build this application:

  • Node.js: This is the most important tool in this stack. It allows us to build event-driven, nonblocking I/O applications using JavaScript. Thanks to Node.js, we are now able to write server-side applications in JavaScript.
  • ExpressJS: This is a lightweight web application framework that allows us to build a server-side application on Node.js using the Model View Controller (MVC) design pattern.
  • RethinkDB: This adds a modern query language, a massively parallel distributed infrastructure, support for distributed joins and subqueries, and has administration tools that are both simple and beautiful.
  • AngularJS: This is a complete JavaScript-based open-source front-end web application framework mainly maintained by Google and by a community of individuals and corporations to address many of the challenges encountered in developing single-page applications.

 

rean stack

 

RethinkDB over MongoDB

First generation NoSQL products fall into roughly two categories—developer-oriented and operations-oriented.

Developer-oriented products include MongoDB and CouchDB. They typically pay close attention to ease of use, have rich document structure, and offer flexible querying capabilities. However, when compared with their operations-oriented counterparts, they are more difficult to deploy to sharded environments and to scale to significant load.
Operations-oriented systems include Cassandra and Riak. These products are designed for highly available deployments and high scale. Unlike developer-oriented products, in their current form operations-oriented products typically have less powerful querying capabilities, and tend to focus less on ease of use.
With the benefit of hindsight and three years of engineering effort, RethinkDB aims to embody ideas from each philosophy to offer the best of both worlds. It is designed to be very easy to use, has a rich data model, and supports extremely flexible querying capabilities. A cluster of RethinkDB nodes can be sharded in only a couple of clicks (really, it’s that easy, check out the screencast). Browse through the ReQL API reference to see how RethinkDB attempts to accomplish these goals.

Raising the bar

RethinkDB adds a modern query language, a massively parallel distributed infrastructure, support for distributed joins and subqueries, and has administration tools that are both simple and beautiful. Here are some of the reasons our early adopters have been especially excited about RethinkDB.

Modern query language

  • ReQL is a data-driven, abstract, polymorphic query language. It’s easy to learn and extremely flexible.
  • Each host language driver (currently Python, Ruby, Java, and JavaScript) implements a custom, tightly integrated domain-specific language. It’s both pragmatic and fun to use.
  • Unlike most NoSQL systems, RethinkDB supports server-side subqueries and distributed join operations. This eliminates complex client-side code and multiple network roundtrips to the database server.
  • ReQL is not based on string parsing, so the risk of injection attacks is greatly minimized.

That’s not to say that ReQL is complete. There are more features and operations that we’re constantly adding to the query language.

Administration: simple and beautiful

  • Sharding and replication can be done in a few clicks.
  • All cluster operations are scriptable in ReQL.
  • The built-in data explorer offers online documentation and query language suggestions.

Many products are easy to use, but we think RethinkDB is beautiful. See the screencast video and be the judge yourself.

screencast

 

Massively parallelized distributed infrastructure

  • All queries including joins, aggregation, and subqueries are automatically compiled to distributed programs and executed across the cluster without any effort from the user.
  • Data intensive operations are automatically compiled to map-reduce jobs that take advantage of the distributed architecture.
  • Cluster protocol is peer-to-peer and doesn’t require coordinator nodes. This makes clusters extremely easy to set up and operate.

Robust implementation

  • A lock-free architecture and a multi-version concurrency control system allow different workloads to coexist in one cluster.
  • A custom, B-Tree aware buffer cache efficiently operates on datasets much larger than the amount of available RAM.
  • An asynchronous, event-driven architecture based on highly optimized coroutine code scales across multiple cores and processors, network cards, and storage systems.
  • A custom log-structured storage engine with a concurrent, incremental on-disk garbage compactor takes advantage of different types of storage hardware.

Even though LAMP is the most prominent and reliable player,  REAN Stack could be a better alternative  and cutting-edge technology. If you require a fast, real-time, lightweight, scalable network application definitely consider REAN Stack.

Reference

https://rethinkdb.com/

https://www.codeschool.com/

Schreibe einen Kommentar

Kontaktieren Sie uns!
Nach oben scrollen