将 Scala 与 Apache Camel 结合使用是否存在已知问题?
我知道 Camel 有受支持的 Scala DSL。除此之外,
对于基于 Camel 的项目,用 Scala 完全取代 Java(语言)是否现实?
已知存在哪些类型的已知问题?
对于这些问题存在哪些解决方法(除了使用 Java 之外)?
我主要是寻找更少的样板代码。
I know that there is a supported Scala DSL for Camel. Apart from that
Is it realistic to replace Java (the language) completely by Scala for a Camel based project?
Which kind of known problems are known to exist?
Which workarounds exist for those problems (other than using Java)?
I am mainly looking for less boilerplaty code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Akka 提供稳定的 Scala 惯用Camel 集成。
除此之外,我确信由于良好的互操作性,这种替换是可能的,而且几乎不可能有任何不是 Java 所特有的 Scala 特定问题。例如,用于发布到 Camel 端点/从 Camel 端点消费的 Akka Actors 是基于 java.util.concurrency,我能想到的唯一问题是库中的一个可修复的错误。
Akka offers stable Scala-idiomatic Camel integration.
Apart from that, I'm sure this replacement is possible due to a good interop, and there could hardly be any Scala-specific issues that are not peculiar to Java. E.g., Akka Actors used for publishing to/consuming from Camel endpoints are based on java.util.concurrency, and the only problem I can think of is a fixable bug in the library.
与此同时,已经为 Camel 开发了一个相对简单的 Scala DSL,应该具有以下功能Java DSL。
要确定它对您是否现实,请考虑:
- 语言IDE 支持的质量
- Scala 语言的复杂性
- Scala/Java 语言的流行
- DSL 扩展的可能性。在 Scala 中,应该可以(使用一些 Scala 魔法)扩展 DSL(添加额外的 DSL 元素)。
如果您决定尝试一下,那么如果您与 Apache Camel 社区分享您的经验和印象,那就太好了:
代码可读性
、代码可维护性
、代码效率
、开发人员满意度
、代码大小
、“人日”
的数量。In the meantime a relatively simple Scala DSL has been developed for Camel, that should have the functionality of the Java DSL.
To decide if it is realistic for you, consider:
- The quality of the IDE support for the languages
- The Scala language complexity
- The Scala/Java language popularity
- DSL extension possibilities. In Scala, it should be possible (with some Scala magic) to to extend the DSL (add additional DSL elements)
If you decide to try it out, it would be great if you share your experience with the Apache Camel community your impressions on:
code readability
,code maintainability
,code efficiency
,developer satisfaction
,code size
, the number of"man-days"
.从那时起(2010-2011 年),现在(2016 年 9 月)出现了一项名为 Akka Streams Integration 的最新计划,代号为 Alpakka。
我们相信 Akka Streams 可以成为构建 Apache Camel 的现代替代品的工具。这不会在一夜之间自然发生,我们呼吁社会各界加入我们的行列。 Camel 最大的资产是其丰富的端点组件。我们希望看到为 Akka Streams 开发类似的端点。
请参阅“
akka/akka-stream-contrib
”。Since then (2010-2011), there is now (Sept 2016) a recent initiative named for Akka Streams Integration, codename Alpakka.
We believe that Akka Streams can be the tool for building a modern alternative to Apache Camel. That will not happen by itself overnight and this is a call for arms for the community to join us on this mission. The biggest asset of Camel is its rich set of endpoint components. We would like to see that similar endpoints are developed for Akka Streams.
See "
akka/akka-stream-contrib
".