Fully Reactive - from Data to UI with OrientDB + Node.js + Socket.io - Luigi Dell'Aquila -...

Preview:

Citation preview

ROME 27-28 march 2015

Fully Reactive

From Data to UI with OrientDB + Node.js + Socket.io

Director of Consulting Orient Technologies LTDThe company behind OrientDB

Twitter: @ldellaquila

Luigi Dell’Aquila

ROME 27-28 march 2015 - Luigi Dell’Aquila

From Wikipedia

reactive programming is a programming paradigm oriented

around data flows and the propagation of change

ROME 27-28 march 2015 - Luigi Dell’Aquila

Propagation of change

A = 1B = 3C = A + B // C == 4

ROME 27-28 march 2015 - Luigi Dell’Aquila

Propagation of change

A = 1B = 3C = A + B // C == 4

A = 2

ROME 27-28 march 2015 - Luigi Dell’Aquila

Propagation of change

A = 1B = 3C = A + B // C == 4

A = 2

C == ?

ROME 27-28 march 2015 - Luigi Dell’Aquila

So it’s about Programming

Isn’t it…?

ROME 27-28 march 2015 - Luigi Dell’Aquila

From Reactive ManifestoReactive systems are:

ROME 27-28 march 2015 - Luigi Dell’Aquila

From Reactive ManifestoReactive systems are:

UX

ROME 27-28 march 2015 - Luigi Dell’Aquila

From Reactive ManifestoReactive systems are:

Infrastructure

ROME 27-28 march 2015 - Luigi Dell’Aquila

From Reactive ManifestoReactive systems are:

Programming paradigm?

ROME 27-28 march 2015 - Luigi Dell’Aquila

So it’s about Systems!

ROME 27-28 march 2015 - Luigi Dell’Aquila

Application

ROME 27-28 march 2015 - Luigi Dell’Aquila

UI/UX

Application

ROME 27-28 march 2015 - Luigi Dell’Aquila

UI/UX

Application

Data(base)

ROME 27-28 march 2015 - Luigi Dell’Aquila

UI/UX

Application

Data(base)

ROME 27-28 march 2015 - Luigi Dell’Aquila

UI/UX

Application

Data(base)

UI/UX

Application

Data(base)

UI/UX

Application

Data(base)

ROME 27-28 march 2015 - Luigi Dell’Aquila

Time toCode

ROME 27-28 march 2015 - Luigi Dell’Aquila

ROME 27-28 march 2015 - Luigi Dell’Aquila

Socket.IO enables real-time bidirectional event-based communication.

It works on every platform, browser or device, focusing equally on reliability and speed.

ROME 27-28 march 2015 - Luigi Dell’Aquila

Node.js® is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications.

Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications

that run across distributed devices.

ROME 27-28 march 2015 - Luigi Dell’Aquila

OrientDB is a 2nd Generation Distributed Graph Database with the flexibility of Documents in one product

and an Open Source commercial friendly license (Apache 2)

ROME 27-28 march 2015 - Luigi Dell’Aquila

Let’s Start

(Fully reactive chat in 30 LOC)

ROME 27-28 march 2015 - Luigi Dell’Aquila

package.json

{ "name": "codemotion", "version": "1.0.0", "description": "Here we are", "dependencies": { }}

ROME 27-28 march 2015 - Luigi Dell’Aquila

> npm install --save express@4.10.2

> npm install --save socket.io

ROME 27-28 march 2015 - Luigi Dell’Aquila

ROME 27-28 march 2015 - Luigi Dell’Aquila

ROME 27-28 march 2015 - Luigi Dell’Aquila

Live…

ROME 27-28 march 2015 - Luigi Dell’Aquila

Install OrientDB

(experimental branch, will be released soon)

https://github.com/orientechnologies/orientdb/tree/livequery

> ant clean install

ROME 27-28 march 2015 - Luigi Dell’Aquila

Install Oriento (OrientDB driver for Node.js)

> npm install git://github.com/luigidellaquila/oriento#livequery

(will be)> npm install oriento

Please, have a little patience, it’s still bleeding edge ;-)

ROME 27-28 march 2015 - Luigi Dell’Aquila

ROME 27-28 march 2015 - Luigi Dell’Aquila

And… elastic, resilient…Do you remember?

ROME 27-28 march 2015 - Luigi Dell’Aquila

HAZELCASTHAZELCAST HAZELCASTHAZELCAST

HAZELCASTHAZELCAST

Multi Master

ROME 27-28 march 2015 - Luigi Dell’Aquila

HAZELCASTHAZELCAST HAZELCASTHAZELCAST

AsyncAsync

Async

Async

Async

Async

ROME 27-28 march 2015 - Luigi Dell’Aquila

References

Official Websitehttp://www.orientechnologies.com

Public Repositoryhttp://github.com/orientechnologies/orientdb

Free on-line traininghttp://www.orientechnologies.com/training/

ROME 27-28 march 2015 - Luigi Dell’Aquila

Questions?

ROME 27-28 march 2015 - Luigi Dell’Aquila

Leave your feedback on Joind.in!https://joind.in/event/view/3347