Hacker Newsnew | past | comments | ask | show | jobs | submit | jodah's commentslogin

This is excellent news if it can actually be enforced.

Author here - yes, Failsafe-go definitely took some inspiration from Polly, but it also borrows ideas from the Failsafe JVM library [1]. Polly and Failsafe influenced each other back and forth over the years.

https://failsafe.dev/


Author here - I do get this critique, and of course API design is subjective, but there was a rationale behind the design choices. Putting each policy in its own package allowed the API to be slightly more concise. And having the API use a generic to represent a function's result type allowed different parts of the API to be independent and composable while still ensuring that result types align. A bit more on that here:

https://failsafe-go.dev/type-safety/


> allowed different parts of the API to be independent and composable while still ensuring that result types align

I found that states are not really required to know anything about internals of the executed code. All that a policy needs to know if the next state is an error or not, that's all.

I might have simplified the problem too much for my library to be useful in real life applications, but I still hold hope that a

stateFn func(context.Context) stateFn

is expressive enough for implementing the whole functionality.

If I may make another suggestion, I found that for more complicated flows, it is useful to be able to build a graph. I have made a rough approximation of a toold for my project based on parsing the go sources and inferring a state diagram from it. You can check it here: https://git.sr.ht/~mariusor/ssm/tree/master/item/cmd (Apologies for the lack of documentation, my work is much more recent than yours :D)


There are some (imperfect) workarounds, ex: https://github.com/jhalterman/typetools


I would love to learn how Bob approached interviewing, if you've ever up to writing this up!


While I didn't know Bob personally, he did he an impact on me.

Bob was the first person I looked up to as an open source engineer early in my career. I studied his code closely, and learned a lot from the way he was able to distill complex problems into beautifully crafted APIs. Those learnings, along with some of his principles of software design, shaped my own work, including in open source, to this day. When Bob went on to great success I was not surprised in the least. He was a great engineer and deserved to still be with us.


"For ILock, the lock is not mutually exclusive under split brain. However it can still be useful as an advisory lock."

Why use a lock that isn't safe when there are other alternatives?


For anyone wondering if there is a set of Hazelcast like data structures and primitives that actually have safe, strong consistency (based on Raft consensus), check out Atomix:

http://atomix.io/atomix/


> that actually have safe, strong consistency

Based on what data? Even hazelcast had that same claim before they got exposed?

I've only seen 2 systems that did rigorous in-house fault-tolerant testing (foundationdb and cockroachdb) and later when "jepsen-verified", they actually backed their claim or had few modifications to uphold their claim.


Atomix has a Jepsen test suite[1], which while not perfect, has helped fix the bugs that existed in the Raft implementation.

1: https://github.com/atomix/atomix-jepsen


12B sounds like an incredible number for labs. Is there a source?


I think it's 12Bn of investment in eCommerce, which includes but isn't solely Labs.


Good example of where random retry delays would be valuable. I filed this as a feature to add for the next release:

https://github.com/jhalterman/failsafe/issues/39


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: