Comments (7)
I recently created akka/akka#21826, sort of related to this
from alpakka.
Oh yes, don't mind if I plug the lib there as well :)
from alpakka.
Looks interesting. I will probably take a look.
from alpakka.
@ktoso mentioned that it may be a better fit to have ts-reaktive-marshal
augment/replace the JSON framing support in akka-http
, rather than have it in alpakka
.
from alpakka.
@jypma we finally looked at ts-reaktive again during last week's team meeting. Sorry for delaying this for so long.
We think it is indeed a good fit for alpakka. We looked at the code a bit which looks well-structured so it shouldn't be too hard to extract.
The scope would be the ts-reaktive-marshal and ts-reaktive-marshal-http modules. I'll try to summarize the functionality (please correct if I'm wrong):
- Java DSLs for specifying marshalling formats from / to XML and JSON
- Streaming parsers that allow parsing XML and JSON data using the above marshallers
- Glue code to make it easy to use with akka-http
Here are a few remarks:
- Dependencies:
- The module should not have any dependencies to ts-reaktive. As you already extracted it into an extra module in https://github.com/Tradeshift/ts-reaktive/tree/master/ts-reaktive-marshal, that doesn't seem to be a big problem.
- There seem to be multiple backends for JSON parsing (actson, jackson) in the original code. Would it stay that way?
- Let's put all of the code into a single module that has a provided dependency on akka-http. This way you can either use it with or without akka-http without needing an extra module.
- The usage of javaslang internally is fine (though binary compatibility might become a problem if javaslang starts to become commonly used in incompatible versions). Not exposing javaslang in the API might simplify changing internals later on (e.g. partial reimplementation in Scala).
- A Scala API for the marshaller would be nice-to-have but not strictly required for the first version.
WDYT?
from alpakka.
Adding context from gitter chat on last Friday which Johannes missed:
Jan Ypma @jypma Mar 23 11:30
I was a bit worried "requiring" a certain version... but actually, now I think of it, the bindings for their collections possibly need to change together with the version anyways.
OK, let's go for
implementation depends on Javaslang
plain Java collection bindings separate from javaslang bindings (can be in the same JAR though, javaslang is already on board)
scala bindings in a separate JAR
?
however, the internal API would then still hava Javaslang signatures. In other words, if one would want to add support for e.g. YAML or sth, you'd be coding against Javaslang classes.Patrik Nordwall @patriknw Mar 23 11:34
sounds good, but why scala bindings in separate jar (scala is also already a dependency)?Jan Ypma @jypma Mar 23 11:40
it isn't. It only is for the layer that binds the marshalling to akka streams. The basic marshalling doesn't depend on scala (or akka). The thing can conceivably be used with e.g. RxJava
@ktoso is this acceptable as far as scala marshalling DSL? https://github.com/Tradeshift/ts-reaktive/pull/56/files#diff-87884016caa105133b216b64cd5088faR17 If so, I'll park that PR and start working on a first PR onto alpakka, as tentatively talked about with Patrik.
from alpakka.
And just as a sanity check: I think Johannes's summary contains everything we discussed.
So the parsing is one thing, and the nice glue code for HTTP is another :)
from alpakka.
Related Issues (20)
- Failed: CassandraFlowTest
- Release 6.0.0
- Release 6.0.1
- Add supports for Byte-Range Fetches when downloading from S3
- Elasticsearch connector should log stacktrace when failure in flow HOT 1
- Scala3 release for mongodb HOT 3
- Support for Jakarta Messaging
- 6.0.1 release not Java 8 compatible HOT 2
- Release 6.0.2
- FTP: Server encoding detection HOT 1
- Replaced base uri path when using ElasticsearchSink HOT 1
- Release 7.0.0-M1, M2
- AMQP cached connection provider does not reconnect HOT 2
- Release 7.0.0
- Make google credentials debugable HOT 1
- Alpaka S3 - is it possible to pass custom s3 client ? HOT 1
- Alpakka JMS Consumer memory leak HOT 4
- Release 7.0.1
- Google OAuth authentication does not deduplicate scopes
- Provide convenient access to getting a Google access token
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alpakka.