什么网络服务器使用akka akka-http,我如何获得它的版本? [英] What webserver uses akka akka-http and how can I get the version of it?

查看:86
本文介绍了什么网络服务器使用akka akka-http,我如何获得它的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用akka和akka-http 2.4.2,并且试图让我了解它们的内部组件。

I'm using akka and akka-http 2.4.2 and I'm trying ti understand the internal components of them.

akka和做什么? akka-http用于启动其他Web服务吗?

它使用了Embebedd Web服务吗? (如Jetty?)

我如何获取它的版本?

我运行以启动我的代码其余的Web服务为:

The code I run to start my rest web-service is:

implicit val actorSystem = ActorSystem("system")
implicit val actorMaterializer = ActorMaterializer()

val route: Route = {
      blablabla ...
}

val bind = Http().bindAndHandle(route, "0.0.0.0", 8080)

谢谢。

推荐答案

akka http没有使用任何Web服务器。 Akka http自己绑定到一个端口,它通过Tcp本身使用Http协议,而不依靠其他任何第三方库来完成该任务。这与Unfiltered之类的库不同,后者为Http请求处理定义了通用的抽象,然后提供了一些可供用户选择的实现选项,例如Netty和Jetty。

There is no webserver used by akka http. Akka http binds to a port on it's own and it speaks the Http protocol over Tcp itself, not relying on any other third party libraries to do that part for it. This is different than a library like Unfiltered which defines a common abstraction for Http request handling, then provides several implementation options like Netty and Jetty that the user can choose from.

这篇关于什么网络服务器使用akka akka-http,我如何获得它的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆