Better HN
topnewbestaskshowjobs
Log inSign up

reidbuzby

30 karma · joined Oct 18, 2023 (3y ago) · 8 submissions

Submissions

comment 2y ago · link · parent

Hello! I've just released an open source library in Kotlin that allows safe and developer friendly arithmetic in idiomatic Kotlin, built on top of the Java native BigDecimal class. KonigDecimal most notably prevents accidental precision loss during arithmetic operations by enforcing type safety on limited precision arithmetic.

Let me know what you think!

2.

Eliminate arithmetic precision loss in idiomatic Kotlin(github.com ↗)

1 points · by reidbuzby · 2y ago · 1 comment

comment 3y ago · link · parent

Thanks for the comment, it seems like you know a lot more about this than I do.

This was a solution that has worked well for my company that averages <1 req/s, so yes I have not tested it under more extreme conditions. This is version 1.0.0 so it is quite new and naive by design. I was posting here to get some feedback on the initial version and see how I can improve it, which you have given me!

Feel free to contribute to the project! It seems like your expertise applies nicely!

comment 3y ago · link · parent

Support for multiple keys is in the works! See this issue for updates: https://github.com/konigsoftware/konig-kontext/issues/8

comment 3y ago · link · parent

You do get the same explicit schema and type safety with this library. The context values can be typed using a protobuf message: https://github.com/konigsoftware/konig-kontext#protobuf-mess..., or any other type you'd like. Although you are right, it is not explicitly in the request schema but that's kinda the point.

comment 3y ago · link · parent

Ditto whats been said before. It can be very cumbersome to update multiple request/response types with new data especially if an intermediary service has no use for the data and is simply passing it through.

comment 3y ago · link · parent

Hey everyone, I've recently created an open source library on top of grpc-kotlin and grpc-java that allows you to propagate a context across microservice boundaries throughout an entire request lifetime. The existing io.grpc.Context (https://grpc.github.io/grpc-java/javadoc/io/grpc/Context.htm...) only propagates a context across API boundaries within the same container and does not cross microservice boundaries.

It's called KonigKontext, check it out here: https://github.com/konigsoftware/konig-kontext!

Example use cases include:

Propagating security principals, or user credentials and identifiers throughout an entire request lifetime across all of your microservices. Propogating distributed tracing information. Set a request trace id upon receiving a request and later access that id in any downstream microservice. However, Konig Kontext is built to support any type of context value, so it can be extended to fit any specific use cases as well.

Let me know what you think!

8.

gRPC request context which caries values across microservice boundaries(github.com ↗)

61 points · by reidbuzby · 3y ago · 45 comments