mliarakos / lagom-js Goto Github PK
View Code? Open in Web Editor NEWScala.js client for Lagom
License: Apache License 2.0
Scala.js client for Lagom
License: Apache License 2.0
Update lagom.js to support Scala 2.13.
Lagom.js depends on Akka.js, which is still working on Scala 2.13 support (see this comment in akka-js/akka.js#103).
Once that is resolved it should be as simple as adding Scala 2.13 to scalaVersions
in build.sbt
:
val scalaVersions = Seq("2.12.10", "2.13.1")
Currently, the lagom.js WebSocket client does not support back-pressure for sending or receiving messages over the socket. As described here, back-pressure for receiving messages is not possible under the current WebSocket standard.
However, it is possible to provide back-pressure for sent messages using WebSocket.bufferedAmount
, as described here. We should evaluate if sending side back-pressure can be implemented using this approach.
The feature/circuit-breaker branch contains a mostly working implementation of circuit breakers for Lagom.js. The outstanding issues are:
java.util.function.Consumer
- see scala-js/scala-js#3916 and akka-js/akka.js#109IllegalStateException
issue - see akka-js/akka.js#108The CircuitBreakerMetricsProviderImpl
is a no-op implementation that doesn't actually collect any metrics because the metrics library used by Lagom isn't available for Scala.js. I need to work on a real implementation, but it isn't critical to releasing the actual circuit breaker functionality.
The ClientServiceCallInvoker.parseHeaders
method fails if there are no response headers or if a header is empty. The method assumes headers will have the form "key: values".
The method uses xhr.getAllResponseHeaders()
to get headers. In some cases a request will fail with no response headers (e.g., CORS issue), which causes getAllResponseHeaders()
to return an empty string and the method to fail. Additionally, if a header was ever empty it would also cause the method to fail.
The WebSocket client implementation is missing some important features. It needs to:
When a client AJAX request fails by timeout it has status code 0. The Lagom TransportErrorCode.fromHttp
method throws an IllegalArgumentException
for status code 0, which obscures the AJAX timeout.
https://github.com/lagom/lagom/releases/tag/1.5.5
I'd be happy to assist with some guidance.
I've already prepared a PR on akka.js to update it to 2.6.14. I guess that's a dependency for lagom.js 1.6.5?
https://www.lagomframework.com/documentation/1.6.x/java/Migration16.html
https://github.com/lagom/lagom/releases/tag/1.6.0
I guess we need to wait for akka-js/akka.js#103 first. After that I'd be happy to assist here too :)
Due to akka-js/shocon#55 adding client settings to the lagom.js client config is difficult. Lagom.js should provide access to the default client config so it can be used by user, similar to Akka.js:
lazy val conf =
ConfigFactory
.parseString("""
akka {
loglevel = "DEBUG"
stdout-loglevel = "DEBUG"
}""")
.withFallback(akkajs.Config.default)
lazy val system = ActorSystem("yourname", conf)
Stepping by just to say that I love this project!
I would love to speak with you about what you are trying to achieve and obvious dependencies on akka.js to support as much as I can. You have my personal email in my GitHub profile or you can reach out on Gitter or Twitter as you prefer!
Cheers!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.