Can ElasticSearch be packaged locally with Electron? - elasticsearch

I'm exploring building an Electron desktop app that would be powered by ElasticSearch running on the client. Is this possible, and if so, how can it be done?

Depending on interpretation, there are two possible answers to your question:
If you want to implement an elasticsearch library that enables the use of elasticsearch from within electron, try elasticsearch.js.
If you want to implement local offline search within a client, try using either lunr.js, or its weird but loveable cousin, elasticlunr.

Related

Java vs Python for elastic search

We are starting with Elastic search for a full text search and still not started anything with code level. We are familiar with both Java and Python as well. Some one could suggest, which one is preferable to use for building a ES application - Java or Python?
Language is not an issue here I think. Especially when you are considering Java or Python. Both have official clients and if something is not implemented there you can always communicate with Elasticsearch directly via REST. Elasticsearch is written in Java so the Java clients could me often faster up-to-date but it is not a rule.

Kubernetes Go API

I have some questions about the golang API for kubernetes.
which one should I use? k8s.io/client-go or k8s.io/kubernetes/pkg/client? What's the difference?
I want to get list of all pods and then listen to add/update/delete events, what's the difference between using the api.Pods("").Watch method and using an informer?
I'm using the API from inside the cluster, how can I fetch the name of the node I'm currently in? is it just the hostname of the machine?
which one should I use? k8s.io/client-go or k8s.io/kubernetes/pkg/client?
Use k8s.io/client-go.
what's the difference between using the api.Pods("").Watch method and using an informer?
The informer is essentially a shared cache, reducing the load on the API server. Unless you're doing something trivial, this is the preferred way.
how can I fetch the name of the node I'm currently in?
Use k8s.io/api/core/v1.Node, see for example this code.
BTW, a colleague of mine and myself gave a workshop on this topic (using the Kube API with Go) last week at GopherCon UK—maybe the slide deck and the repo are useful for you; also, there is an accompanying online Katacoda scenario you can use to play around.

viranode project [duplicate]

My website uses Mongo as its database. I was wondering if the Java driver from the Mongo website applies to Android as well because I read that it wasn't supported.
Simpy put it's not a good Idea for your Android app to connect to MongoDB directly in the first place.
You should be thinking as if it was just another web client and implement a RESTful interface for all the data you want to exchange or update. Look at these links as a possibility or otherwise roll your own interface.
MongoDB should be supported on Android since 2.9.0
Based on this : https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10006&version=11124
This may be helpful :
http://www.mkyong.com/tutorials/java-mongodb-tutorials/

How to monitor Elastic Stack without X-Pack?

Can we monitor the elastic stack 6.0 and above(like elastic search..) without using the X-Pack?As we know many of the Features like security, machine learning, graph APIs don't be supported under BASIC(free Licence).
So I want to know if there are any APIs, without Licence limitation, can be used to implement those functionalities mentioned above?
All the information should be in the cluster APIs, you'll just lack the visualizations.
Monitoring (of the local cluster) is actually included in X-Pack Basic unlike the other features. Any reason you don't want to use it?
Alternatives include Kopf, Cerebro,... though you'll need to run them as a separate process and watch out for version compatibilities.
We've had success with ElasticHQ for Monitoring (requires python)
https://github.com/ElasticHQ/elasticsearch-HQ
And sentinl for setting up alerts/watchers (it is a plugin for kibana)
https://github.com/sirensolutions/sentinl/wiki
We have set up a reverse proxy to enable ssl/tls and use ubuntu user management to create logins, however, we do not limit access within Kibana itself.
We have little need for graph/machine learning so I am unaware of free alternatives.
The company I work for is heavily Open Source, so these projects suit us.

Can I use meteor for this?

I'm looking for a way to create an app which has a realtime web interface as well as an API which can be called by a node.js client while sharing most of its code.
I'd like to be able to manage data, monitor and execute tasks inside of my app via browser, but also have an automation/scheduling program which connects to my web app and tells it to run various tasks and get results of each task.
Unfortunately it doesn't look like I can connect to Meteor from the server, so I'm wondering if there's another approach? Is what I described even possible using Meteor?
I have done some testing using socket.io and I think I may be able to do it this way, but Meteor seems like it'd be really great for the realtime user interface.
Yes, you can use npm packages to do what you want. Just like standard Node.js programming.
There might be one error you run into when calling Meteor between external code, but it is easy to solve.
I guess in your case you could set up a TCP server that way and make it update a collection, then you could get the clients to update through the reactive collection publishing mechanism.

Resources