Codemotion Roma 2015 - Having both a reactive application layer and front-end is just not enough anymore. Today's reality demands a fully reactive architecture where all the layers, including the database, are able to interact with each other using a paradigm. In this presentation, you'll learn how to build a fully reactive application in a few minutes with just a few lines of code resulting in every database change propagating asynchronously between the application layer and the front-end.
Fully Reactive - from Data to UI with OrientDB + Node.js + Socket.io - Luigi Dell'Aquila - Codemotion Rome 2015
1. ROME 27-28 march 2015
Fully Reactive
From Data to UI
with OrientDB + Node.js + Socket.io
Director of Consulting
Orient Technologies LTD
The company behind OrientDB
Twitter: @ldellaquila
Luigi Dell’Aquila
2. 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
3. ROME 27-28 march 2015 - Luigi Dell’Aquila
Propagation of change
A = 1
B = 3
C = A + B // C == 4
4. ROME 27-28 march 2015 - Luigi Dell’Aquila
Propagation of change
A = 1
B = 3
C = A + B // C == 4
A = 2
5. ROME 27-28 march 2015 - Luigi Dell’Aquila
Propagation of change
A = 1
B = 3
C = A + B // C == 4
A = 2
C == ?
6. ROME 27-28 march 2015 - Luigi Dell’Aquila
So it’s about
Programming
Isn’t it…?
7. ROME 27-28 march 2015 - Luigi Dell’Aquila
From Reactive Manifesto
Reactive systems are:
8. ROME 27-28 march 2015 - Luigi Dell’Aquila
From Reactive Manifesto
Reactive systems are:
UX
9. ROME 27-28 march 2015 - Luigi Dell’Aquila
From Reactive Manifesto
Reactive systems are:
Infrastructure
10. ROME 27-28 march 2015 - Luigi Dell’Aquila
From Reactive Manifesto
Reactive systems are:
Programming paradigm?
11. ROME 27-28 march 2015 - Luigi Dell’Aquila
So it’s about
Systems!
19. 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.
20. 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.
21. 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)
22. ROME 27-28 march 2015 - Luigi Dell’Aquila
Let’s Start
(Fully reactive chat in 30 LOC)
23. ROME 27-28 march 2015 - Luigi Dell’Aquila
package.json
{
"name": "codemotion",
"version": "1.0.0",
"description": "Here we are",
"dependencies": {
}
}
24. ROME 27-28 march 2015 - Luigi Dell’Aquila
> npm install --save express@4.10.2
> npm install --save socket.io
28. 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
29. 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 ;-)
31. ROME 27-28 march 2015 - Luigi Dell’Aquila
And… elastic, resilient…
Do you remember?
32. ROME 27-28 march 2015 - Luigi Dell’Aquila
HAZELCASTHAZELCAST HAZELCASTHAZELCAST
HAZELCASTHAZELCAST
Multi Master
33. ROME 27-28 march 2015 - Luigi Dell’Aquila
HAZELCASTHAZELCAST HAZELCASTHAZELCAST
AsyncAsync
Async
Async
Async
Async
34. ROME 27-28 march 2015 - Luigi Dell’Aquila
References
Official Website
http://www.orientechnologies.com
Public Repository
http://github.com/orientechnologies/orientdb
Free on-line training
http://www.orientechnologies.com/training/