Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mini tutorial #23

Open
ppom0 opened this issue May 12, 2024 · 5 comments
Open

Mini tutorial #23

ppom0 opened this issue May 12, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@ppom0
Copy link

ppom0 commented May 12, 2024

Hi!
This library really looks amazing, I was looking for a Rust Serf implementation and I'm glad I found it :)

However I'm strugling to figure out how to use it. An example mini-agent implementation that would just print received messages to stdout (or something like this) would really help the onboarding! Or even bigger examples if you're already using it elsewhere 👀

Many thanks

@al8n
Copy link
Owner

al8n commented May 13, 2024

Hi! Thanks!
I will work on the examples. For now, maybe you can get some ideas about how to use it from the test cases.

@ppom0
Copy link
Author

ppom0 commented May 13, 2024

Okay thanks!

@austin-barrington
Copy link

Hello @al8n, Did you get anywhere with some examples / tutorials please? I am using the go implementation of serf at the moment and would like to explore the rust implementation.

@al8n
Copy link
Owner

al8n commented Dec 30, 2024

Hello @al8n, Did you get anywhere with some examples / tutorials please? I am using the go implementation of serf at the moment and would like to explore the rust implementation.

Hi @austin-barrington, unfortunately, you can only reference the test cases in https://github.com/al8n/serf/tree/main/core/src/serf/base/tests and https://github.com/al8n/serf/tree/main/serf/test to find how to use it.

Basically, the usage should be similar to Go's implementation, the only differences are:

  1. Users need to choose a runtime tokio, async-std or smol.
  2. Users need to choose a transport implementation from memberlist, either memberlist::net::NetTransport or memberlist::quinn::QuinnTransport, there are some type alias in serf.
  3. Users need to choose an encoding/decoding layer, the builtin one is Lpe.

@al8n al8n added enhancement New feature or request help wanted Extra attention is needed documentation Improvements or additions to documentation labels Dec 30, 2024
@alidehghan
Copy link

alidehghan commented Jan 22, 2025

could you please provide an easy sample to run? @al8n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants