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

us-west-2 is indeed very large, but will still not be able to take a full failover from us-east-1


Hi there, I was looking to get a NAS that I can just install and not have to worry about maintenance too much and senility was at the top of the list. If not synology what would you suggest?


In my case, Synology has worked fine. Reliability is a big deal for non-backup RAID (not the same as "backup," but does the trick, 90% of the time).

It's entirely possible that their newer units are crappier than the old workhorses I have.

I don't use any of the fancier features that might require a beefier CPU. One of the units runs a surveillance station, and your choices for generic surveillance DVRs is fairly limited. Synology isn't perfect, but it works quite well, and isn't expensive. I have half a dozen types of cameras (I used to write ONVIF stuff). The Surveillance Station runs them all.


Synology's fine - even ideal - for that use case. If you want to run Docker containers, run apps for video conversion like Plex, etc, then you'd likely want to consider something with a beefier CPU. For an appliance NAS, Synology's really pretty great.


May be a “fast follow”? Right after launch of the “MVP”?


Do you use or have used MySQL in the past?


One benefit is that it makes these operations lazy. There are no intermediate lists created when you call a map on a stream. If map were a method in a list, it would need to return a new list. And if you have multiple such maps etc, it would create more such lists for each map invocation.


From what I recall, Reddit uses AWS extensively. Could they not have replaced RabbitMQ with SQS? You get the near unlimited horizontal scalability, extremely good uptime, guaranteed at least once message delivery and for the case of a worker crash, the messages will become visible again after the visibility timeout (since they wouldn’t have been deleted by the worker).


SQS could not handle the volume or latency requirements we had, and it was too expensive compared to running it ourselves at the time.


I think there is a hard limit on the number of in-flight requests (that is items that have been dequeued by a worker, but whose job has not been completed). I wouldn't be surprised if Reddit hit those sorts of volumes.


The way you have expressed this, I am borrowing it for myself. Many times i run into these kind of situations and I fail to explain why doing something like this is frustrating and actually useless. Thank you.


Interesting. I have used free marker. Pretty happy with it in general. But inability to mutate collections is an annoyance.

I will checkout blueprint. A zero dependency library is always a bonus. I don’t see any mention of thread safety in the docs for the engine though.


Hey, Blueprint rendering was already thread-safe. Only the function/filter registrations, IF done during rendering phase, was not thread-safe.

I have just pushed small update to make even these thread-safe now. Entire library is now fully thread-safe.

Updated README as well.

Thanks for pointing this out.


A while ago, I had attempted to do it the Rust style with a Result type in Java (where it is called Data oriented programming) and the result is not great. I was fighting a losing battle in a naive attempt to replace checked exceptions but still retain compile time type safety.

https://www.reddit.com/r/java/s/AbjDEo6orq


Interesting anecdote.

At $DAYJOB, I'm currently migrating a non-performance sensitive system to a functional style, which requires defining basic functional types like Option<> and Result<>. So far I think it works pretty well and certainly improves edge case handling through explicit type declaration.

My current stable incarnation is something like this:

  sealed interface Result<T,E> {
      record Ok<T,E>(T value) implements Result<T,E> {}
      record Error<T,E>(E error) implements Result<T,E> {}
  }
Some additional thoughts:

- Using only 1 type parameter in `Result<T>` & `Ok<T>` hides the possible failure state. `Result<Integer>` contain less information in type signature than `Integer throwing() throws CustomException`, leaving you fall back on catching `Exception` and handling them manually. Which kind of defeats the typechecking value of `Result<>`

- A Java developer might find it unusual to see `Ok<T,E>` and realize that the type `E` is never used in `Ok`. It's called "phantom types" in other language. While Java's generic prevents something like C++'s template specialization or due to type erasure, in this case, it helps the type system track which type is which.

- I would suggest removing the type constraint `E extends Exception`, mirroring Rust's Result<> & Haskell's Either. This restriction also prohibits using a sum type `E` for an error.

- In case you want to rethrow type `Result<?,E>` where `E extends CustomException`, maybe use a static function with an appropriate type constraint on `E`

  sealed class Result<T,E> {
      public static <E extends Exception> void throwIfAnyError(Result<?,E>... );
  }
- I like the fact that overriding a method with reference type args + functional interface args triggers an "ambiguous type method call" error if you try to use bare null. This behavior is pretty handy to ensure anti-null behavior on `Option.orElse(T)` & `Option.orElse(Supplier<T>)`. Leaving `Option.get()` as a way to "get the nullable value" and a "code smell indicator"


Yeah, Java's generic-type erasure makes result types difficult, though as you mention in your code example, this can be mitigated some using switch guards. But you could also go into another switch:

    switch (result) {
        case Ok(var value) -> println(value);
        case Err(var ex) -> switch (ex) {
            case HttpException httpEx -> {
                // do something like a retry
            }
            default -> {
                // if not, do something else
            }
        }
    }


They thought Alexa will enable users to buy more from Amazon just by voice. But most users turned out like me. I would not spend a single dollar on Amazon without actually seeing the item on my mobile or desktop. I wouldn’t even add to cart via Alexa. That’s not an ideal user for device and service that requires hundreds of millions to run.


You saw this with Amazon Dash buttons too. This idea that users would just go "Hey order me some more Tide" and Amazon would just do the right thing at the right price like some sort of intelligent personal assistant. Which it by no means is.


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

Search: