Can cygnus be used to trigger a change in Context Broker? - fiware

I am developing a service agent where I want to know when the values of sensor are changed. Instead of developing an automatic http request in my service to query context broker (each 15 mins or so) I want to know if I can configure cygnus to notify me of these changes?
Im doing this because I want to put the data coming from my sensors in an algorithm that detects certain trends.
Thank you, I hope my question is clear enough.
If you are not an experienced user of fiware technologies please ignore this question.

Probably it is better that you subscribe and end point (integrated with your service) to orion so your service is notified when the sensor value change.
https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broker_-_Orion_Context_Broker_-_User_and_Programmers_Guide#Context_subscriptions
Do you really need to use Cygnus?

Related

Which hook to limit the number of messages a user can send per day?

We want to use ejabberd in the context of a web application having fairly unique and business rules, we'd therefore need to have every chat message (not protocol message, but message a user sends to another one) go through our web application first, and then have the web application deliver the message to ejabberd on behalf of the user (if our business rules allow the message to be sent).
The web application is also the one providing the contact lists (called rosters if I understand correctly to ejabberd). We need to be and remain the single source of truth to ease maintenance.
To us, ejabberd value added would be to deliver chat messages in near real-time to clients, and enable cool things such as presence indicators. Web clients will maintain a direct connection to ejabberd through websocket, but this connection will have to be read-only as far as chat messages are concerned, and read-write as far as presence messages are concerned.
The situation is similar with regards to audio and video calls. While this time the call per see will directly be managed by ejabberd to take advantage of built-in STURN, TURN etc... and will not need to go through our web app, we have custom business logic to manage who is able to call who, when, how often etc... (so in order words, we have custom business logic to authorize the call or not and we'd like to keep all the business logic centralized in the web app).
My question is what would be the proper hooks we'd need to look into to achieve what we are after? I spent an hour or so in the documentation, but I couldn't find what I am after so hopefully someone can provide me pointers. In an ideal world, we'd like to expose API endpoints from our web app that ejabberd hooks can hit. However, the first question is: which relevant hooks is ejabberd offering and where are these hooks documented?
Any help would be greatly appreciated, thank you!
When a client sends a packet to ejabberd, it triggers the user_send_packet hook, providing the packet and the state of the client's session process. Several modules use that hook, for example mod_service_log.

How to send notification to users of a mobile application from a server when an event happens, using ionic 3 and laravel 5.6

I am building a school application that will connect parents to teachers, i am using Ionic 3 and Laravel 5.6.
And i want to be able to send a notification to all parents, when for instance a teacher gives an assignment, when the teacher enters the assignment question and click on the send button, the question is save to the database, after then a notification should be sent to the mobile devices of all parents who's children are taking that subject.
I have done a lot of research on how to do this, on the Cordova Push Notification Plugin and Cordova Local Notification. I have followed a video tutorial that implements Firebase and Push Notification, and also One Signal and Push Notification. But i was still unable to achieve what i wanted.
If they are anymore materials out there, that could help me achieve this, I will be so grateful to have someone share it with me, or if anyone can help me out with is, I will be very happy.
These are the other materials I found:
The PHP Package repository
Laravel Notification Channels
Quora
Please let your users know that using OneSignal's "free" service would allow the company to get users data and sell it to others.
Google's Firebase cloud messaging service is reliable but comes with a cost if you want many connections. See Firebase Pricing Plans.
I personally used fcm. It was not really a breeze implementing it on my thesis but it worked nicely. No need to make the app listen on background for incoming notifications then create a local notification, me not selling my users data, and not paying anything on the use of firebase's services. I used the free 300 dollars gift from google cloud to shoulder the expenses from the firebase spark plan.(free for 12 months)
A warning if you use the cordova plugins of fcm: If you have a cordova plugin that uses google's services it may come in conflict with the fcm plugins you listed above due to different versions used. It may need manual editing on the src plugins.
If you decide on using fcm, this link might help you.
The basic steps you have to do after you set up the needed environment is to
Get FCM token on platform.ready async.
Save it to firebase under the said user
Create a cloud function that will send notifications

Looking for a way to receive a rest notification when data updated on Socrata

Do any features exist in Socrata whereby my cloud-based app can receive a REST notification when new data is added to a (specific) dataset?
I could of course poll Socrata - via a REST request - to check this, but it would be much more efficient if there was a hook that I could, say, register a listener with to be notified when new data arrived in a dataset.
If this does not exist within Socrata, I could simulate this by creating a service that would poll Socrata and notify my app accordingly. Perhaps such a service exists?
Any suggestions are welcome.
Thanks
Colin Goldberg
What you're talking about sounds like a Webhook, and unfortunately its not something we support in our platform (yet). It's on our roadmap, and I'd love to have it myself, but unfortunately its not far enough along for me to have an availability date I can give you.

CouchBase WEB(AngularJS), Android(Native), IOS(Native)

I'm planning to build an application that runs on WEB(AngularJS), Android(Native), IOS(Native).
I have experience with MongoDB, but I found CouchBase which sounds really good for me.
I read documentation and I found out I need to use sync_gatway to sync my mobile databases with main database server and reverse, until now everything is fine.
I also need to use "channels" to share records with multiple users.
The problem comes when I need to implement this for web application.
In their documentation on "Working with web applications" they explain how "bucket shadowing" is working, but they also say:
Bucket shadowing is meant to enable sync for existing Couchbase Server
apps. If you are creating a new app with both mobile and web clients,
we recommend starting with the Sync Gateway REST APIs, and connecting
backend services using the Changes Worker Pattern.
After reading Sync Gateway REST API I found out I'm limited to facebook and persona authentication. So I can't use my own authentication mechanism?
Also, there is nothing specified in REST API about channels?
Is there any example project or more documentation about this? I couldn't find anything :(
If someone has experience with this, please explain how this works.
Thanks
There is also Custom (Indirect) Authentication available on Sync Gateway, which you can use for any type of auth you need.
But you have to hide Sync Gateway's Admin API under your backend layer.
As for the channels: it is responsibility of Sync Function to route different documents to necessary channels based on Document data.
Here is a good video that describes how to build production architecture around Couchbase Lite.
I'm probably late for the party - but as of today I'd recommend taking a look in the PouchDB project for the WEB AngularJS side - they match pretty well and will sync with Couchbase.
Regarding authentication, I just released an article on that topic, find it here. Hope this helps somebody

How do I set up Box event notifications (webhooks) at the org level?

The documentation (http://developers.box.com/webhooks/) talks about webhooks in the context of "user's account". I read that as getting notifications only about the objects to which I have access.
Let's say I want to be notified every time there is a new upload anywhere across my organization. Do I need to be an admin to accomplish this, or is the webhooks scope not subject to my user permissions?
While we're continuing to enhance webhooks, there is some administrative functionality built-in. For instance, if you can get your webhooks installed for all your users, and have the webhook point to one endpoint, that can track all activity in your account.
There is a way to force webhooks on all users in your domain as an administrator. However, this feature hasn't been optimized for companies that use webhooks for internal use. That's still in progress.
If you'd like to be kept in the loop, or try some workarounds with what we have, feel free to contact us at api [at] box [dot] com. With more information, we may find something that works today, based on your exact needs.
At this point, the webhooks are only provided at the user level. If you log on as an admin and setup an application that gets webhooks, you will only get the same set of notifications as you see in the "Updates" tab in the Web UI.
We are looking to expand the webhooks capabilities, and this is one area that we may explore. However, it is not currently scheduled, so I can't provide any idea of even rough dates.