You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gossip.apache.org by Terry Weymouth <we...@umich.edu> on 2017/05/27 13:59:37 UTC

Running the example: StandAloneNode

I thought it would be worthwhile to capture my experience, in brief, under a topic heading that indicates the specific subject; especially for someone (like me) looking for this basic information.

Following Edward's suggestion. I watched the video: Apache Gossip Peer to Peer Communications
 <https://www.youtube.com/watch?v=bZXZrp7yBkw&t=39s>And was able to get the example to run, after fixing some dependency problems, that seem to be a consequence of the split of gossip into multiple modules. 

First I tired running the demo (extrapolating from the video) with these commands:
cd gossip-base
mvn exec:java -Dexec.mainClass=org.apache.gossip.examples.StandAloneNode -Dexec.args="udp://localhost:10000 0 udp://localhost:10000 0”
 
But this resulted in a coupe of class not found errors which I had to resolve by including, in the pom.xml file, dependencies on other modules: 
  <dependency>
    <groupId>org.apache.gossip</groupId>
    <artifactId>gossip-protocol-jackson</artifactId>
    <version>0.1.3-incubating-SNAPSHOT</version>
  </dependency>
  <dependency>
    <groupId>org.apache.gossip</groupId>
    <artifactId>gossip-transport-udp</artifactId>
    <version>0.1.3-incubating-SNAPSHOT</version>
  </dependency>
Which did not seem like a good idea in general.

So, my solution was to create an empty maven project, gossip-tutorial, and then add the above dependencies to its pom.xml file. At which point I was able to run the commands:
cd gossip-tutorial
mvn exec:java -Dexec.mainClass=org.apache.gossip.examples.StandAloneNode -Dexec.args="udp://localhost:10000 0 udp://localhost:10000 0”
 
And the example ran, as shown in the video. From there following the rest of the video was straight forward.

See: https://github.com/Terry-Weymouth/gossip-tutorial/tree/basic-working-example <https://github.com/Terry-Weymouth/gossip-tutorial/tree/basic-working-example>



Re: Running the example: StandAloneNode

Posted by Edward Capriolo <ed...@gmail.com>.
Terry,

We are all volunteers and understand that things happen when they happen.
Feel free to drop any emails to the list or catch up on IRC.

Let us know what you learn as you go.

Edward

On Wed, May 31, 2017 at 3:57 PM, Terry Weymouth <we...@umich.edu> wrote:

> Thanks. Will do. Holiday, evening, and weekend project, so be a few days.
>
>

Re: Running the example: StandAloneNode

Posted by Terry Weymouth <we...@umich.edu>.
Thanks. Will do. Holiday, evening, and weekend project, so be a few days. 


Re: Running the example: StandAloneNode

Posted by Edward Capriolo <ed...@gmail.com>.
On Mon, May 29, 2017 at 9:49 PM, Terry Weymouth <we...@umich.edu> wrote:

> Folks,
>         as a learning exercise, I started working on a README for the
> examples package in gossip-base, org.apache.gossip.examples.
> It is meant to be a “how to run the examples" for a new person, and I’m
> about a quarter of the way through. See:
> https://github.com/Terry-Weymouth/incubator-gossip/tree/example-setup <
> https://github.com/Terry-Weymouth/incubator-gossip/tree/example-setup>
>
> While browsing around in the GitHub site, I ran across a branch in which
> gossip-examples is in a module on its own: https://github.com/gdusbabek/
> incubator-gossip/tree/gossip_manager_coupling <
> https://github.com/gdusbabek/incubator-gossip/tree/gossip_manager_coupling>
> .
>
> Based on my experience over the last couple of weeks, in the process of
> (still) coming up to speed on Gossip, this separation seems an excellent
> idea. What are the plans for merging a separate gossip-examples module into
> the master branch, if any?
>
> If there is something that makes sense for me to use, I’d love to
> pull/merge that effort so that my work could build on top of the examples
> in a separate module. It make so much sense; clarifies usage.
>
> Terry.
>
>
>
> Terry,

The normal use/user of Gossip would be embedding it in something else a
nosql database or a web server, some other piece of software where they
wish to share information or member state.

The stand alone examples are essentially are a way for the end-user(like
you) to interact with the project without me saying "run the unit tests".

I would love to get your markdown into the project and coupling that with a
new module seems liek a good idea to me.

Please read our guide on contributing code.
https://cwiki.apache.org/confluence/display/GOSSIP/Apache+Gossip+contribute+code

We have already talked about this enough so you can start from the part
"Create a JIRA ticket" and submit a patch with the examples moved out into
a module and your markdown.

I will help usher the process.

Thanks
Edward

Re: Running the example: StandAloneNode

Posted by Terry Weymouth <we...@umich.edu>.
Folks,
	as a learning exercise, I started working on a README for the examples package in gossip-base, org.apache.gossip.examples.
It is meant to be a “how to run the examples" for a new person, and I’m about a quarter of the way through. See:
https://github.com/Terry-Weymouth/incubator-gossip/tree/example-setup <https://github.com/Terry-Weymouth/incubator-gossip/tree/example-setup>

While browsing around in the GitHub site, I ran across a branch in which gossip-examples is in a module on its own: https://github.com/gdusbabek/incubator-gossip/tree/gossip_manager_coupling <https://github.com/gdusbabek/incubator-gossip/tree/gossip_manager_coupling> .

Based on my experience over the last couple of weeks, in the process of (still) coming up to speed on Gossip, this separation seems an excellent idea. What are the plans for merging a separate gossip-examples module into the master branch, if any?

If there is something that makes sense for me to use, I’d love to pull/merge that effort so that my work could build on top of the examples in a separate module. It make so much sense; clarifies usage.

Terry.




Re: Running the example: StandAloneNode

Posted by Terry Weymouth <we...@umich.edu>.
Edward, yes, the approach of running from gossip-itest did the trick. Thanks.

I wonder if it might not be a good idea to move the examples to the itest module.


Re: Running the example: StandAloneNode

Posted by Edward Capriolo <ed...@gmail.com>.
I think that since the video gossip-itest would be the module you can run
it from.

I thing soon we will do a moduke with something like gossip-uber that does
the amagamation.

On Saturday, May 27, 2017, Terry Weymouth <we...@umich.edu> wrote:

> I thought it would be worthwhile to capture my experience, in brief, under
> a topic heading that indicates the specific subject; especially for someone
> (like me) looking for this basic information.
>
> Following Edward's suggestion. I watched the video: Apache Gossip Peer to
> Peer Communications
>  <https://www.youtube.com/watch?v=bZXZrp7yBkw&t=39s>And was able to get
> the example to run, after fixing some dependency problems, that seem to be
> a consequence of the split of gossip into multiple modules.
>
> First I tired running the demo (extrapolating from the video) with these
> commands:
> cd gossip-base
> mvn exec:java -Dexec.mainClass=org.apache.gossip.examples.StandAloneNode
> -Dexec.args="udp://localhost:10000 0 udp://localhost:10000 0”
>
> But this resulted in a coupe of class not found errors which I had to
> resolve by including, in the pom.xml file, dependencies on other modules:
>   <dependency>
>     <groupId>org.apache.gossip</groupId>
>     <artifactId>gossip-protocol-jackson</artifactId>
>     <version>0.1.3-incubating-SNAPSHOT</version>
>   </dependency>
>   <dependency>
>     <groupId>org.apache.gossip</groupId>
>     <artifactId>gossip-transport-udp</artifactId>
>     <version>0.1.3-incubating-SNAPSHOT</version>
>   </dependency>
> Which did not seem like a good idea in general.
>
> So, my solution was to create an empty maven project, gossip-tutorial, and
> then add the above dependencies to its pom.xml file. At which point I was
> able to run the commands:
> cd gossip-tutorial
> mvn exec:java -Dexec.mainClass=org.apache.gossip.examples.StandAloneNode
> -Dexec.args="udp://localhost:10000 0 udp://localhost:10000 0”
>
> And the example ran, as shown in the video. From there following the rest
> of the video was straight forward.
>
> See: https://github.com/Terry-Weymouth/gossip-tutorial/tree/
> basic-working-example <https://github.com/Terry-
> Weymouth/gossip-tutorial/tree/basic-working-example>
>
>
>

-- 
Sorry this was sent from mobile. Will do less grammar and spell check than
usual.