-
Notifications
You must be signed in to change notification settings - Fork 12
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
Adapters for popular libraries #21
Comments
Hi @cornerman! I was happy to discover your excellent Sloth library and have been working the last few days to make some adoptions/adapters for Play ScalaJS that you can check out from https://github.com/marcgrue/play-scalajs where I have also made a similar adoption using the https://github.com/lihaoyi/autowire library. As you can see I made a maven-published version of some minimal boilerplate code and then two more projects, one using the dependency and the other including the files. I'm wiring with both Ajax and WebSocket. I did the most basic and simple implementations I could come up with to make the essential moving parts as clear as possible. I think it would great and helpful if you would consider to make similar implementations for other frameworks as you contemplate in the above comment! For me it was hard to "see through" for instance the Zio mechanics - have never worked with it, and I'm not a FP shark ;-) I'm really happy to have achieved an end-user simplification by using Sloth compared to using Autowire, like for instance calling the api with If you have any comments to my implementations, I would be very happy to hear from you! All the best and thanks for your efforts creating Sloth! |
I've just made an ammonite runnable demo for my co-workers at @deal-engine using Twitter Finagle Mux as transport. https://twitter.com/oeiuwq/status/1469094434344218628 If anyone is interested, we could try extracting an adapter for finagle mux. We previously used covenant on Scala.js for consuming an akka-http API. But this time we are creating an internal service where we care about re-using connections as much as possible and fast serialization (without using an IDL since our service will expose large legacy api interfaces - wich Sloth is pretty much happy to generate stubs for) Thanks for your awesome libraries, @cornerman |
We have started with a |
I think it would be great to have examples/blueprints/helpers for popular libraries that can be used with sloth. For example, it would be great to have a simple
RequestTransport
andRouter
-Adapter for libraries like http4s and akka-http that covers the basic use-cases.I have done this in a very opinionated way in https://github.com/cornerman/covenant for
akka-http
. It covers more than only basic use-cases and enforces a certain paradigm. So a question is how complex and sophisticated our implementations should be. I would like them to follow the same interface so you can still abstract over features they give you. And all implementations should provide more or less the same feature set.We should also look at other areas than only http or websocket communication. One specific example I have, you can use sloth to abstract over messaging between your javascript website and your serviceworker. This another example I would like to provide.
Should these helper libraries live in this repo or should they be decoupled from it? Is it more of an example or a full-fledged adapter than can handle a lot configurations?
The text was updated successfully, but these errors were encountered: