ELASTICSEARCH
The “new school” search/analytics engine
What is it and what you can do with it
About me - @nignatov
• Founder/CEO/TA/PM/AM… at Node Spark
• Using PHP since 2006
• Using Drupal since 2009
• Love to experiment with new technologies
• The Godfather of Elasticsearch Connector
After the session you should know:
• What is Elasticsearch • How Elasticsearch is working in general • How you can integrate it with PHP • If time - share some ideas of possible
use cases.
Shay Banon
• http://thedudeabides.com/ • https://github.com/kimchy • https://twitter.com/kimchy/
• Founder & CTO at Elastic https://elastic.co
Who made Elasticsearch?
Why “new school”?
Why “new school”?
Why “new school”?
Who else is using it?
Who else is using it?
• Distributed out of the box - Incredible easy to make cluster, just start new node!
• High availability • Real time index/search • REST API with JSON • Written in Java, build on top of Apache Lucene and Open Source
http://github.com/elasticsearch/elasticsearch • Schema free • Document oriented
What is Elasticsearch?
Vertical and horizontal scaling
E01
E01
E01 E02 E03 E04+
E01
ELK Stack
https://www.elastic.co/webinars/introduction-elk-stack
Some associations
Some associations
RELATIONAL DB ELASTICSEARCH
Database Index
Tables Types
Rows Documents
Column Field
How to install it?
How to install it?
How to install it?
Support matrix
… or Elastic Cloud
Elasticsearch in action
Elasticsearch Demo!
https://www.elastic.co/webinars/get-started-with-elasticsearch
https://github.com/nodespark/talks/blob/master/PHPUG.md
How distributed works?
Node 1
PUT /twitter index: number_of_shards:3 number_of_replicas:1
How distributed works?
Node 1
PUT /twitter index: number_of_shards:3 number_of_replicas:1
1P 2P
3P
How distributed works?
Node2
Node 1
1P 2P
3P
How distributed works?
Node2
Node 1
1P
3P
2P 1R
3R
2R
How distributed works?
Node2
Node 1
1P
3P
2P 1R
3R
2R
Node3
How distributed works?
Node2
Node 1
1P 2P2R
Node3
3P 1R3R
How distributed works?
Node2
Node 1
1P 2P2R
Node3
3P 1R3R
How distributed works?
Node 1
1P 2R
Node3
3P 1R
How distributed works?
Node 1
1P
Node3
3P 1R
2R3R
2P
Distributed indexing
Node2
Node 1
PUT /twitter/tweet/1{….}
1P 2P2R
Node3
3P 1R3R
Distributed indexing
Node2
Node 1
PUT /twitter/tweet/1{….}
1P 2P2R
Node3
3P 1R3R
Distributed indexing
Node2
Node 1
PUT /twitter/tweet/1{….}
1P 2P2R
Node3
3P 1R3R
Distributed indexing
Node2
Node 1
PUT /twitter/tweet/1{….}
1P 2P2R
Node3
3P 1R3R
Distributed indexing
Node2
Node 1
PUT /twitter/tweet/1{….}
1P 2P2R
Node3
3P 1R3R
Distributed indexing
Node2
Node 1
PUT /twitter/tweet/1{….}
1P 2P2R
Node3
3P 1R3R
Distributed indexing
Distributed Search
Node2
Node 1
GET /twitter/_search?q=php
1P 2P2R
Node3
3P 1R3R
Distributed Search
Node2
Node 1
GET /twitter/_search?q=php
1P 2P2R
Node3
3P 1R3R
Distributed Search
Node2
Node 1
GET /twitter/_search?q=php
1P 2P2R
Node3
3P 1R3R
Distributed Search
Node2
Node 1
GET /twitter/_search?q=php
1P 2P2R
Node3
3P 1R3R
Distributed Search
PHP Libraries
https://github.com/elastic/elasticsearch-php
https://github.com/ruflin/Elastica
Brainstorm – Content hub
Site X
Site Y
Site Z
Content Hub
Feed Site
Brainstorm – Headless
NodeJS
Data Warehouse
Drupal/Wordpress CMS
Frontend
Brainstorm – SLA Hub
Site 01
Site 02
Site 03
Site 04
Site 05
Support Department Monitoring
Brainstorm - Async storage
Web 01
Web 02
Web 03
Web 04
Web 05
Thank you!
Thank you!
Questions ?
Top Related