In these slides I show how to create a simple application where all the components act in a reactive (push/asynchronous) way, including the database.
I'll show a preview of a new functionality that is being released in OrientDB: Live Query
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Fully Reactive - from Data to UI with OrientDB + Node.js + Socket.io
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 ;-)
Everything will be officially released in a few weeks.
30. ROME 27-28 march 2015 - Luigi Dell’Aquila
Execurte live query:
You can provide three callback functions
•One for insert
•One for update
•One for delete
They will be invoked every time an insert/update/delete operation
is executed in the database (push to the application, asynchronous)
32. ROME 27-28 march 2015 - Luigi Dell’Aquila
And… elastic, resilient…
Do you remember?
33. ROME 27-28 march 2015 - Luigi Dell’Aquila
HAZELCASTHAZELCAST HAZELCASTHAZELCAST
HAZELCASTHAZELCAST
Multi Master
34. ROME 27-28 march 2015 - Luigi Dell’Aquila
HAZELCASTHAZELCAST HAZELCASTHAZELCAST
AsyncAsync
Async
Async
Async
Async
35. 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/