You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@edgent.apache.org by Yiannis Gkoufas <jo...@gmail.com> on 2016/12/12 14:05:19 UTC

Communication between Edgent apps running in different JVMs

Hi guys,

sorry if it has already been covered in a previous thread, but going
through the documentation it's not very clear to me the following:
I want to have multiple edgent apps running on seperate JVMs and
communicating with each other.
It's described here:
https://edgent.apache.org/recipes/recipe_dynamic_analytic_control.html#loosely-coupled-edgent-applications
but I cannot find an example in the source code to follow.
Any help is really appreciated.

Thanks!

Re: Communication between Edgent apps running in different JVMs

Posted by Dale LaBossiere <dm...@gmail.com>.
Communication between topologies, sending and receiving stream tuples, would generally be done via a connector.
Is your application for inter-jvm device-coresident topologies? Could you elaborate a bit on the characteristics
you’re looking for in such a connector?

The Mqtt or Kafka connectors to corresponding msg hubs could be used.
The Mqtt mosquito server could, perhaps, be run on the device for 
a inter-ivm device-coresident topologies  case.
The features of a msg hub may or may not be what your application needs
(e.g., msg persistence, topic based pub/sub).

If you’re looking for something simple like a basic endpoint-to-endpoint tcp-based “stream transport”, 
Edgent doesn’t currently have such a connector.  Such a connector would be a welcome addition! :-)
See https://cwiki.apache.org/confluence/display/EDGENT/Writing+Connectors+For+Edgent+Applications <https://cwiki.apache.org/confluence/display/EDGENT/Writing+Connectors+For+Edgent+Applications>

The loosely-coupled link that you referenced is really talking about *intra-ivm* dynamic multi-topology application
composition and intra-ivm inter-topology communication via the Edgent pubsub connector.  
The pubsub connector only supports intra-jvm.  The Mqtt connector / server would
be an inter-jvm analog.

An intra-jvm “Full device scenario” sample is:
https://github.com/apache/incubator-edgent/tree/master/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp <https://github.com/apache/incubator-edgent/tree/master/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp>
https://cwiki.apache.org/confluence/display/EDGENT/Full+Device+Scenario <https://cwiki.apache.org/confluence/display/EDGENT/Full+Device+Scenario>


Fwiw, there’s a sample for basic Iotp connector use here:
https://github.com/apache/incubator-edgent/tree/master/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp <https://github.com/apache/incubator-edgent/tree/master/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp>

Hope this is helping.
Looking forward to hearing more about your environment / needs!

— Dale

> On Dec 12, 2016, at 9:05 AM, Yiannis Gkoufas <jo...@gmail.com> wrote:
> 
> Hi guys,
> 
> sorry if it has already been covered in a previous thread, but going
> through the documentation it's not very clear to me the following:
> I want to have multiple edgent apps running on seperate JVMs and
> communicating with each other.
> It's described here:
> https://edgent.apache.org/recipes/recipe_dynamic_analytic_control.html#loosely-coupled-edgent-applications
> but I cannot find an example in the source code to follow.
> Any help is really appreciated.
> 
> Thanks!