Can a (WMB) message flow have multiple monitoring profiles? - messagebroker

I need to emit the same events (Start/End/Rollback) from a message flow twice - as they need to be consumed by two different data services who require different data. So I need two monitoring profiles applied to the same flow.
Is this possible?
When actually consuming the data, I plan to use subscription filtering to differentiate the events emitted from the two profiles.

I don't think it is possible to have 2 monitoring profiles attached.
But you can always reprocess the monitoring event messages in an other flow. So the flow which you are monitoring could emit events with all the data needed in them while a second flow can transform these and create the different messages you need for the different consumers.

Related

FCM device groups vs topics

I'm developing an iOS app that sends notifications to individual groups of users. Number of users per group will most likely be in the order of 1-7, but can exceed that and while the app generally doesn't set a limit, I hardly see it exceeding 20.
Currently I've set it up with the topics approach and it works like it should. I understand this approach is optimized for throughput rather than latency, as opposed to device groups.
Nearing completion of my app, I'm considering to change to device groups. However, I don't see many advantages, especially considering the substantial complexity that comes along with it.
Notifications at the moment is fast enough. As long as delivery time doesn't suddenly increase by a lot, it's perfectly fine at the moment.
How secure are topics compared with device groups?
The app does allow the user to use more than one device, but I don't see that happening often - realistically quite seldom. However if that were to happen, device groups would handle it better. Still, I think it's an acceptable compromise to stick with topics.
For device groups to work, I have to create a new collection server-side to manage device registration tokens and their updates, pairing with my existing data structure and implementing several http requests. I also need to query for the notification_key every time I want to send a notification, instead of sending it to the more obvious id I now use for topics.
I've read through other questions on SO, but wanted to get some fresh thoughts on this. My opinion is to stay with topics unless convinced otherwise
I'm using both of these delivery methods and yes, topics are far easier to manage but that comes at a cost of security. If your groups are public in nature then you should be fine with topics. If they're meant to handle more sensitive/private information you should probably go with device groups / individual tokens. Reason being, topics are more public facing and anyone can listen in on them, even devices not on your app.

Transform data to pubsub events

I have a dataflow pipeline that collects user data like navigation, purchases, crud actions etc. I have this requirement to be able to identify patterns real time and then dispatch pubsub events that other services can listen to in order to provide the user real time tips, offers or promotions.
I'm thinking to start grouping the events by user id and then if the match a pattern to create a PCollection that contains the events names that need to be triggered via pubsub.
Is this the right approach? Is there a better way?
This could certainly work for some use cases.
If you are using session based windowing in combination with early firings (triggering upon arrival of each element). You can have all the data needed to identify patterns each time a new element arrives.
However, depending on the rate of user data being pushed and the size of the session, this might result in holding a lot of data in the PCollection and repeating this pattern matching a lot (on the same data), since you have to reuse all the data in the session. Furthermore you cannot use elements that arrived before this session.
Sometimes, you might be better off by keeping a state for each user (without redoing the pattern matching on all the data of the user for this session). Using a state would in fact remove the need to work with windowing.
The new process would now look like this:
For each element that arrives:
Fetch the current state
Calculate the new state (based on the old state and the new element)
If needed, emit a message to PubSub.
To hold your state, you could use BigTable or Datastore.

How to show hide iPhone's step tracking in HealthKit?

My app syncs 3rd party step data to HealthKit. However, iPhone itself will also do step tracking, user ends up seeing data from two sources added together.
In Health App, it claims that the top source gets displayed, however it's not the real case. Data from all sources will be added together, which is bad for users. Is there a way to resolve this?
Health kit may have duplicate data entries from different sources.
For instance, the M7/M8 processor and Jawbone UP will both add step counting samples to health kit.
When you use a statistics query, health kit will provide the correct statistics, based on the order the sources are set in the health up.
Otherwise, you will need to either filter by source (and choose the source you prefer) or find duplicates based on the begin/end timestamps, which is the preferred method in my opinion, but it involves more work.

Tracking User Journeys with Flurry Anayltics

I have an iOS App where a sequence of three events spread across three Pages constitute a single Journey.
I can log each page view and single events via flurry.
But can I log the entire sequence as a single event ?
PS: I considered using timed events but didn't seem like the best fit.
Are you trying to track the conversion of this particular journey. If yes, then this is definitely possible by creating a funnel of these three specific events. For more information on funnels please refer: http://support.flurry.com/index.php?title=Analytics/Overview/Lexicon/FunnelAnalysis
However, if you are trying to log this particular journey as one single event, then that also can be done. You need to flag all the three events/pages and create an event, which gets triggered/logged when all three flags are true.
If you need further details please reach out to us in support#flurry.com.
Thanks

Is there some way for networking data to be directed to two applications simultaneously?

I'm developing an application that processes a real time data feed across the internet. There are 2 fundamentally different things I want to do with it: one extremely simple but critical that it never is interrupted. Another much more complex but interruption is not such a horrible problem. Given that the second would have higher risk of the application crashing due to its complexity... I'm asking if there is some way that both can be receiving the data feed at the same time?
I could have both functions in a single application but if it crashes, that's very bad. I was thinking by separating the two functions into two applications, it might provide more robust handling for the critical simple processing.
But if I separate into two applications, is it possible for both of them to receive the identical data at the same time? Some type of OS networking voodoo or something?
It depends on the stream and on the way you want to implement it - some general ideas to achieve what you describe:
make a receiver app
this has the only purpose in receiving the feed and dispatching it to any apps/consumers who register to receive... if the receiving apps are on the same system you can use shared memory (MemoryMappedFile in .NET for example) which is really fast... this would help regarding future requirements - for example if you need to implement another processing app it just needs to register with the receiver app... another nice side-effect: the receiver app can capture the feed to some persistence and thus allow a "replay" for testing purposes etc.
make the "critical" one multiplex the feed
this would mean only your critical app receives the feed and sends a copy to the other app (for example on a different thread)

Resources