Communication between several cores in one Spark App

Is it possible to give special instructions to specific cores based on an event from one of them.
In my case am thinking of If I do something on one of the core the other(cores) are notified.

All help is appreciated
Thanks Meth

Yes, what you want to look into are Spark.publish and Spark.subscribe. See

Read that over and get back to us if you are unclear on what to do next

Like @harrisonhjones mentioned, the publish/subscribe functions are ideally suited for this. Currently, when you publish an event, all subscribed Cores will react to it. The ability to choose one specific Core will be implemented later on.
It’s specified in the docs like this:

In the near future, you’ll also be able to subscribe to events from a single Core by specifying the Core’s ID.

I’m not sure what the timeframe on this is, but perhaps @BDub could clarify this (or redirect to the person who knows).

Thanks for the quick reply. I will write to him/her to get more information about that. But in the case of publish/subscribe do I have to specify explicitly to that core( the one that is supposed to do something).

Thanks a lot

I believe this is currently supported in the Spark CLI and Spark API. Please give it a try and check out the discussion here:

Looking at the fix implemented by Dave you should be able to now use:
spark subscribe mine device_id to single out events from one core.

Zachary describes the API endpoint as /v1/devices/:device_id/events

1 Like

Thanks for the quick reply
That’s cool I will look it up.

1 Like

Thanks for the help .
I will read it again.

1 Like