-
Notifications
You must be signed in to change notification settings - Fork 106
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
Include horde_process in the main repo #272
Comments
I think we could have an api built into Horde this way. As long as this is completely optional I believe it is a good thing. |
Another important point would be to add an option for the call and cast functions, allowing you to bypass the lookup step. Sometimes it is interesting to take the risk and use other retry or failure handling mechanisms if the target process has not been completely synchronized in CRDT |
Always looking for feedback, thanks @sleipnir ! Quick question though, what do you mean by "bypass the lookup step"? Do you mean effectively calling Apologies if I've misunderstood the request. |
Let's start with linking to the project in the README? |
If we had a reference to the PID somewhere in the api we wouldn't have to do the lookup |
I'd go further and include some of their docs in the readme as well! Their explanation on the |
This is an open source project, PRs improving the documentation are welcome. |
I know (and I usually do), butI'll sit this one out and I'm just relaying an info I found useful exactly because I lack understanding of the lib's internals, quirks, etc, so I don't think I'm the best to update the docs, and I thought the maintainer would know best what to do with that info 🤷 |
Ah, I see. Well, you actually can skip the lookup and just use # Using a Horde Process might look like...
My.Horde.Process.call(identifier, {:foobar, args})
# But if you already have the PID, skip it and use GenServer directly
GenServer.call(pid, {:foobar, args}) In fact, if you look at the source for e.g. |
It feels a bit self-aggrandizing if I were to link my own project in your readme, but I will at least see if I can add to the documentation some of the pitfalls I ran into that shaped the direction of my |
I think I didn't explain my point well. What I wanted to say is that since you are providing an API, it should provide the means without having to resort directly to a lower-level API, in the case of GenServer. See this example from the Spawn project: Do you realize that the API itself deals with passing on the reference? It's just an example but it explains my point of view a little better, I think. But I think this discussion could be moved to the library repository in question so as not to disturb this thread here on Horde. |
That I can do: #273 |
https://github.com/tyler-eon/horde-process
This seems very useful, specially for initial adoption. It's a single file defining a behaviour + implementation. At the very least the documentation @tyler-eon wrote to their lib was very helpful in understanding issues we were having with Horde in production
The text was updated successfully, but these errors were encountered: