Reputation: 432
I have been using AWS Firehose, Lambda and ElasticSearch to analyse and visualize Twitter data following this tutorial:
https://aws.amazon.com/blogs/big-data/building-a-near-real-time-discovery-platform-with-aws/
It works great and I can open the link to the Kibana dashboard and make the plots. However, I would like to display the plots in a custom built dashboard that I will build with HTML and javascript as part of a web app (I will use plotly.js to build plots).
How can I get the data from ElasticSearch into the javascript file to make the plots? Can I make the plots update in realtime like Kibana does
Is the endpoint an API? What javascript packages and commands do I need?
Do I even need ElasticSearch or could I just go straight from the S3 bucket which holds the streaming data into the app via a Lambda function? What are the advantages/disadvantages?
Upvotes: 1
Views: 1916
Reputation: 604
Please have a look at elastic apis
It's just a matter of consuming those APIs with any programmed ReST Client such as retrofit/okHttp etc.
A sample here : http://www.baeldung.com/elasticsearch-java
To implement this in JS , a simple call will serve your purpose : **Using JQuery
$.ajax({
url: 'http://<yourElasticHost:port>/',
type: '<GET/PUT/POST etc>',
data: 'ID=1', //
success: function() { alert('done !!'); }
});
ElasticSearch includes lots of search options
and it is Document-oriented
.
If the access speed, Scalability, fine tune queries
based on json dsl
are your requirements then you can definitely go for elastic approach
Upvotes: 2