Is there a way to use AWS IoT rule engine locally at AWS IoT greengrass?
Is the rule engine a feature of AWS IoT core (cloud) only?
Is a lambda function deployed to the local AWS IoT greengrass that subscribes to a topic and takes an action an equivalent of the AWS IoT core rules engine?
Even though greengrass is an extension of IoT Core, there is no native rules engine component in the greengrass service, greengrass serves the purpose of eventually sending the data to IoT Core where you can use rules engine to trigger other cloud services.
If you're specifically looking into Lambdas which run on greengrass, these Lambdas are running on your hardware and not the cloud and hence need to be handled by you, either using subscriptions or active invocations (code invoke).
This is because when you create a deployment from the cloud, greengrass service will containerize the greengrass group that you configure and deploy it on the GG core device. Once the container reaches the Core device, it cannot be altered/managed from the cloud unless you make another deployment with modifications.
Also there are 2 types of lambdas, long lived (think of it as daemon processes) and on-demand (think of it as a code which has to be triggered manually) lambda. The only way to trigger an on demand lambda is either subscriptions or active invocation. There’s no native feature which triggers on-demand lambdas, it has to be in your code logic.
Related
We want to use an app engine flexible process to update our ElasticSearch index, which is on Google Kubernetes Engine. We need to connect to ElasticSearch via a http(s) address. What's the recommended way to do this? We don't want to expose the cluster to the external networks since we don't have authentication in front of it.
I've seen this SO post but both k8s and AE have changed a lot in the 2 years since the question/answer.
Thanks for your help!
The post you linked to was about App Engine Standard. App Engine Flex is built on top of the same Google Cloud networking that is used by Google Compute Engine virtual machines and Google Kubernetes Engine clusters. As long as you put the App Engine flex application into the same VPC as the Google Kubernetes Engine cluster you should be able to communicate between them using internal networking.
On the other hand, to expose a Kubernetes service to anything running outside of the cluster will require you to modify the service for Elastic search because by default Kubernetes services are only reachable from inside of the cluster (due to the way that the service IPs are allocated and reached via IPTables magic). You need to "expose" the service, but rather than exposing it to the internet via an external load balancer, you expose it to the VPC using an internal load balancer. See https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing.
in addition to Robert's answer, make sure that app engine and GKE are in the same region,
because Internal load balancers are not usable from other region.
check this https://issuetracker.google.com/issues/111021512
We have a requirement where we want to run AWS GreenGrass on our VM in our own data center which will not have connectivity with AWS IoT. Thought is to have similar cloud and on-premise solution(behind a firewall). We want to reuse the cloud solution, which has lambda functions in AWS GreenGrass. Wanted to know if it is possible to run AWS GreenGrass without AWS IoT? Any insight would be of great help.
You should consider the hardware requirements of Greengrass and you can find more information here.
For defining the Greengrass configuration for first time, you need to connect your Greengrass to AWS IoT by deploying, after that you can run Greengrass without any AWS IoT connectivity. But Consider that the deployment of serverless functions (Lambda functions) will be done through AWS IoT. You can find more information about Greengrass here.
I am a big fan of particle.io and was very excited when they added a Google Cloud Platform (GCP) integration so I can save my IoT data into a GCP "DataStore".
I've followed their tutorial and got it working but I need some advice on implementing this so it can scale on GCP.
My current implementation is like so:
https://docs.particle.io/tutorials/integrations/google-cloud-platform/#example-use-cases
Basically I have a GCP "Compute Engine" instance which runs a node.js script that listens for the PubSub events (sent by my IoT devices) and saves it to DataStore.
Now because I want it to scale, ideally this node.js script should run on a managed service that can respond to spikes automatically. But GCP does not seem to have anything like this.
In AWS I could so this:
IoT Data -> Particle.io AWS WebHook -> AWS API Gateway Endpoint -> AWS Lambda -> AWS DynamoDB
All the AWS points are managed.
What's the best way to have that node.js script always running in a fully-managed, always-available way on GCP? which can run my node.js script that listens for PubSub events and saves to the DataStore and automatically scales as load increases
Any help/advice will be appreciated.
Thanks very much,
Mark
You have a number of options:
1- As someone else mentioned, there is Cloud Functions. It's basically a Node.js function you deploy and Google Cloud takes care of scaling it up/down for you.
2- You can deploy your Node.js app to App Engine Flex which has autoscaling enabled by default.
3- If you want to stay on Compute Engine, you can manually set autoscaling on Compute Engine.
We have an IoT project here
Facts:
We have our app running on Google App Engine, PHP runtime.
The clients are raspberry pi or similar boards.
We are using cloudmqtt (www.cloudmqtt.com) to generate a push event on our C client app, which then runs the sync process with the server
Is there a google cloud replacement for what we are doing?
We tried Google Push/Sub, but our C app needed to be polling the service.
We would love to use Google Cloud Messaging but we could not find any way to use it for push notifications for the client.
Basically, we need to send push messages to a raspberry pi, what would you recommend for that? (remember our server is on GAE)
GCM handle polling mechanisms on its own and should let you push notifications as well as messages to the client. Try debugging your application using documentation.
During I/O 2016, they also launched Firebase Cloud Messaging (FCM) which is basically a newer version of GCM, and is the recommended product to use.
But if you wanted to use your deployment rather than a service, you can use Google Compute Engine instances to deploy EMQTTD which is a highly scalable MQTT broker written in Erlang.
Usually we deploy BPEL business processes on Apache ODE or WSO2 BPS Server included in Tomcat server, can I deploy a business process on Google App Engine's Web Server? Actually I haven't any idea about that!
There is a lot more to running a BPEL process than it seems. You would not deploy the BPEL process, you would deploy Apache ODE to Google App Engine.
Unfortunately, last I checked App Engine has stringent restrictions on the number of threads a program can spawn, making Apache ODE unusable (see 0(their doc)):
The secured "sandbox" environment isolates your application for service and security. It ensures that apps can only perform actions that do not interfere with the performance and scalability of other apps. For instance, an app cannot spawn threads in some ways, write data to the local file system or make arbitrary network connections. An app also cannot use JNI or other native code. The JVM can execute any Java bytecode that operates within the sandbox restrictions.
you can't. See Google app engine's documentation.
[1] https://developers.google.com/appengine/docs/
[2] https://developers.google.com/search/results?q=BPEL&p=%2Fappengine