permutive-engineering / fs2-pubsub

Google Cloud Pub/Sub stream-based client built on top of cats-effect, fs2 and http4s.
Apache License 2.0
45 stars 16 forks source link

Revamp library as new `fs2-pubsub` #533

Closed alejandrohdezma closed 1 month ago

alejandrohdezma commented 3 months ago

💻 How to review this PR?

This PR was created with the idea of being reviewed commit by commit. Each commit contains an incremental change that makes it easier to review. Also some of the commits contain additional information in their description to help understand why the change was made.

I also recommend checking "Hide whitespace" when reviewing this PR!
![](https://i0.wp.com/user-images.githubusercontent.com/2503052/137387087-91cc8458-9e11-44a9-8da0-f48251ec452c.gif?ssl=1)

🚀 What's included in this PR?

This PR revamps the library as a new fs2-pubsub.

The new library includes several improvements over the previous one, such as builder-pattern for creating the publishers/subscribers, better utilities around message or error handling or pureconfig support.

I recommend checking out the README.md added in the last step to see how the new library works.

zan-preston commented 2 months ago

👋 What was the motivation for switching from wrapping the Google provided Java SDK to the generated Scala gRPC sources? Was it just to have pure Scala all the way down? Or were their other motivating factors?

What types of testing have been done comparing two implementations? Under load as well?

alejandrohdezma commented 2 months ago

👋 What was the motivation for switching from wrapping the Google provided Java SDK to the generated Scala gRPC sources? Was it just to have pure Scala all the way down? Or were their other motivating factors?

Hey Zan! Nice to see you here 😸 Main motivation was using pure Scala to avoid dependency hell when two Google libraries are being used and bring different versions of their internal dependencies.

What types of testing have been done comparing two implementations? Under load as well?

There hasn't been any actual testing comparing the two implementations. But the new library is already in use and we haven't observed any degradation on performance.