Nice, good job the akka team On Thursday, December 4, 2014 6:08:30 PM UTC+1, rkuhn wrote: > > Dear hakkers, > > we are very pleased to announce the availability of the first milestone > release of the upcoming Akka Streams and Akka HTTP modules. The > significance of this milestone is that we have roughly reached feature > parity with Spray (sans spray-servlet that we will not port) and the > underlying streams are mature enough to take a closer look at their API. > > *It is important to note that we have focused entirely on the API and its > semantics, performance has not yet been optimized. Any benchmarks done at > this point are likely to be invalidated within weeks as we continue to work > on these projects.* (Nevertheless we find it performant enough to play > around with, so don’t hold back!) > > So, what is it that we are so excited about? Place a dependency on > "com.typesafe.akka" % "akka-stream-experimental_2.11" % "1.0-M1" (also > available for Scala 2.10) into your build definition and you can write an > echo server implementation like so: > > val toUppercase = Flow[ByteString].map(bs => bs > .map(_.toChar.toUpper.asInstanceOf[Byte])) > > StreamTcp().bind(serverAddress).connections.foreach { conn => > println("Client connected from: " + conn.remoteAddress) > conn handleWith toUppercase > } > > and then you can connect to this server and use it as an uppercase service: > > val result: Future[ByteString] = > Source(testInput) > .via(StreamTcp().outgoingConnection(serverAddress).flow) > .fold(ByteString()) { (acc, in) ⇒ acc ++ in } > > This will of course return a Future in order to keep everything nicely > asynchronous and non-blocking. For more details you can take a look at the > API docs (for Java > <http://doc.akka.io/japi/akka-stream-and-http-experimental/1.0-M1/> and > Scala > <http://doc.akka.io/api/akka-stream-and-http-experimental/1.0-M1/#package>). > On the HTTP front we kept the routing DSL very close to the one you know > from spray-routing, and we supplemented it with a nice Java DSL as well (for > the full program see here > <https://github.com/akka/akka/blob/akka-stream-and-http-experimental-1.0-M1/akka-http-java-tests/src/main/java/akka/http/server/japi/examples/simple/SimpleServerApp.java>, > > you’ll need to add akka-http-java-experimental_2.11 as dependency): > > route( > // matches the empty path > pathSingleSlash().route( > getFromResource("web/calculator.html") > ), > // matches paths like this: /add?x=42&y=23 > path("add").route( > handleWith(addHandler, x, y) > ), > // matches paths like this: /multiply/{x}/{y} > path("multiply", xSegment, ySegment).route( > // bind handler by reflection > handleWith(SimpleServerApp.class, "multiply", xSegment, > ySegment) > ) > ) > > You can find examples also in Activator templates (for Java > <https://typesafe.com/activator/template/akka-stream-java8> and Scala > <https://typesafe.com/activator/template/akka-stream-scala>). > > Over the next weeks we will continue to work on smoothing out kinks and > edges, in particular those that you—dear reader—report, either on this > mailing list or via github issues > <https://github.com/akka/akka/issues/new>. Prominent features that are > yet to be done are SSL support and WebSockets, for an exhaustive list you > can check our ticket list > <https://github.com/akka/akka/issues?q=is:open+is:issue+milestone:streams-1.0>. > > The plan is to reach feature completeness and adequate performance around > February 2015, so stay tuned! > > Regards, > > *Dr. Roland Kuhn* > *Akka Tech Lead* > Typesafe <http://typesafe.com/> – Reactive apps on the JVM. > twitter: @rolandkuhn > <http://twitter.com/#!/rolandkuhn> > >
-- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.