SlideShare uma empresa Scribd logo
1 de 20
Akka - HTTP
Harshit Daga
Software Consultant
Knoldus Software LLP
Agenda
● Overview of Akka Http
● Common Abstractions
● Low level API
● High level API
● Demo
Overview of Akka-Http
● A library for providing HTTP based services.
● Used for building REST APIs.
● Build on the top of Akka- actors and Streams.
Overview of Akka Http (Cont..)
● Akka Http contains following module:
– Akka-http-core
– Akka-http
– Akka-http-testkit
– Akka-http-spray-json
– Akka-http-xml
Overview of Akka-Http (Cont..)
Common Abstractions
● HttpRequest
● HttpResponse
● HttpEntity
● HttpHeaders
● Marshalling & Unmarshalling
Http Request
● Used to send a request to the server
● Akka-Http request consists of -
– method (GET, POST, etc.)
– A URI
– Seq of headers
– Entity (body data), and
– Protocol
HttpRequest (method, URI, List(headers), entity, protocol)
Http Response
● Response is what server replies to its client.
● HttpResponse consists of
– Status code
– Seq of headers
– Entity
– Protocol
HttpResponse(StatusCode, List(headers), entity, protocol)
Http Entity
● Contains the data bytes of a message with
content-type and length.
● Different kinds of entities:
– Strict
– Default
– Chunked
– ClosedDelimited
– IndefiniteLength
Marshalling
● To convert higher level objects into wire-format.
● Some pre-defined marshallers :
– Array[Byte]
– String
– ByteString
– Array[Char]
– FormData
Unmarshalling
● To convert lover level objects into higher level
objects.
● Some pre-defined unmarshallers:
– Byte, Boolean
– Short, Int, Long , Float, Double
– String
– Array[String]
Low Level API
● The implementation is in akka-http-core
module.
● It provides support for :
– Connection management
– Parsing and rendering of messages and headers
– Timeout management
– Response ordering
Low Level API (Cont...)
Http().bindAndHandleSync(reqHandler, interface, portAddr)
This method specifies the interface and port to bind for
handling incoming Http requests.
Low Level API (Cont...)
Low Level API is based simply on mapping from request to response
High Level API
● Low level API becomes uneasy to handle when we
need to create large number of routes.
● For this we use should Higher Level APIs.
● Provides a flexible ways to create routes.
● These are located in akka-http module.
● Low level API becomes uneasy to handle when we
need to create large number of routes.
● For this we use should Higher Level APIs.
● Provides a flexible ways to create routes.
● These are located in akka-http module.
High Level API (Cont..)
● Directives
● Routing DSL (alternative to Low level API)
● Rejection & Exception Handling
● Path Matcher
● Case class extraction
Directives
● A block used for creating route structure.
● Extract the requests from RequestContext to make
it available for inner route.
Path Matcher
● When request enters the structure, it has an
unmatched path.
● The path matcher decides on which route it is
supposed to hit.
path(“foo” / “bar”)
means path is foo / bar
Case Class extraction
● Used to directly map request to the case class
Thank You !!!

Mais conteĂșdo relacionado

Mais procurados

Akka Streams and HTTP
Akka Streams and HTTPAkka Streams and HTTP
Akka Streams and HTTPRoland Kuhn
 
Journey into Reactive Streams and Akka Streams
Journey into Reactive Streams and Akka StreamsJourney into Reactive Streams and Akka Streams
Journey into Reactive Streams and Akka StreamsKevin Webber
 
Introduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsIntroduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsShashank L
 
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
Understanding Akka Streams, Back Pressure, and Asynchronous ArchitecturesUnderstanding Akka Streams, Back Pressure, and Asynchronous Architectures
Understanding Akka Streams, Back Pressure, and Asynchronous ArchitecturesLightbend
 
System Integration with Akka and Apache Camel
System Integration with Akka and Apache CamelSystem Integration with Akka and Apache Camel
System Integration with Akka and Apache Camelkrasserm
 
VJUG24 - Reactive Integrations with Akka Streams
VJUG24  - Reactive Integrations with Akka StreamsVJUG24  - Reactive Integrations with Akka Streams
VJUG24 - Reactive Integrations with Akka StreamsJohan Andrén
 
Understanding Implicits in Scala
Understanding Implicits in ScalaUnderstanding Implicits in Scala
Understanding Implicits in Scaladatamantra
 
Introduction to Spark Streaming
Introduction to Spark StreamingIntroduction to Spark Streaming
Introduction to Spark StreamingKnoldus Inc.
 
Stream processing from single node to a cluster
Stream processing from single node to a clusterStream processing from single node to a cluster
Stream processing from single node to a clusterGal Marder
 
What’s expected in Spring 5
What’s expected in Spring 5What’s expected in Spring 5
What’s expected in Spring 5Gal Marder
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterKonstantin Tsykulenko
 
Reactive Stream Processing with Akka Streams
Reactive Stream Processing with Akka StreamsReactive Stream Processing with Akka Streams
Reactive Stream Processing with Akka StreamsKonrad Malawski
 
Logging in Scala
Logging in ScalaLogging in Scala
Logging in ScalaJohn Nestor
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016Martin Odersky
 
What’s expected in Java 9
What’s expected in Java 9What’s expected in Java 9
What’s expected in Java 9Gal Marder
 
Scala usergroup stockholm - reactive integrations with akka streams
Scala usergroup stockholm - reactive integrations with akka streamsScala usergroup stockholm - reactive integrations with akka streams
Scala usergroup stockholm - reactive integrations with akka streamsJohan Andrén
 
Reactive integrations with Akka Streams
Reactive integrations with Akka StreamsReactive integrations with Akka Streams
Reactive integrations with Akka StreamsKonrad Malawski
 
Dive into spark2
Dive into spark2Dive into spark2
Dive into spark2Gal Marder
 

Mais procurados (20)

Akka Streams and HTTP
Akka Streams and HTTPAkka Streams and HTTP
Akka Streams and HTTP
 
Journey into Reactive Streams and Akka Streams
Journey into Reactive Streams and Akka StreamsJourney into Reactive Streams and Akka Streams
Journey into Reactive Streams and Akka Streams
 
Introduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actorsIntroduction to concurrent programming with Akka actors
Introduction to concurrent programming with Akka actors
 
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
Understanding Akka Streams, Back Pressure, and Asynchronous ArchitecturesUnderstanding Akka Streams, Back Pressure, and Asynchronous Architectures
Understanding Akka Streams, Back Pressure, and Asynchronous Architectures
 
System Integration with Akka and Apache Camel
System Integration with Akka and Apache CamelSystem Integration with Akka and Apache Camel
System Integration with Akka and Apache Camel
 
VJUG24 - Reactive Integrations with Akka Streams
VJUG24  - Reactive Integrations with Akka StreamsVJUG24  - Reactive Integrations with Akka Streams
VJUG24 - Reactive Integrations with Akka Streams
 
Understanding Implicits in Scala
Understanding Implicits in ScalaUnderstanding Implicits in Scala
Understanding Implicits in Scala
 
Introduction to Spark Streaming
Introduction to Spark StreamingIntroduction to Spark Streaming
Introduction to Spark Streaming
 
Stream processing from single node to a cluster
Stream processing from single node to a clusterStream processing from single node to a cluster
Stream processing from single node to a cluster
 
What’s expected in Spring 5
What’s expected in Spring 5What’s expected in Spring 5
What’s expected in Spring 5
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka Cluster
 
Scalatra 2.2
Scalatra 2.2Scalatra 2.2
Scalatra 2.2
 
Reactive Stream Processing with Akka Streams
Reactive Stream Processing with Akka StreamsReactive Stream Processing with Akka Streams
Reactive Stream Processing with Akka Streams
 
Logging in Scala
Logging in ScalaLogging in Scala
Logging in Scala
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
 
What’s expected in Java 9
What’s expected in Java 9What’s expected in Java 9
What’s expected in Java 9
 
Scala usergroup stockholm - reactive integrations with akka streams
Scala usergroup stockholm - reactive integrations with akka streamsScala usergroup stockholm - reactive integrations with akka streams
Scala usergroup stockholm - reactive integrations with akka streams
 
Reactive integrations with Akka Streams
Reactive integrations with Akka StreamsReactive integrations with Akka Streams
Reactive integrations with Akka Streams
 
Dive into spark2
Dive into spark2Dive into spark2
Dive into spark2
 
Play Framework
Play FrameworkPlay Framework
Play Framework
 

Destaque

Nothing About Me, Without Me - Person-Centered Planning
Nothing About Me, Without Me - Person-Centered PlanningNothing About Me, Without Me - Person-Centered Planning
Nothing About Me, Without Me - Person-Centered PlanningAquila "Q" Jordan
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPRafal Gancarz
 
Akka HTTP
Akka HTTPAkka HTTP
Akka HTTPTanUkkii
 
Building a Reactive RESTful API with Akka Http & Slick
Building a Reactive RESTful API with Akka Http & SlickBuilding a Reactive RESTful API with Akka Http & Slick
Building a Reactive RESTful API with Akka Http & SlickZalando Technology
 
Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015Evan Chan
 
Scala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on HerokuScala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on HerokuHavoc Pennington
 
DUMP-2015: Â«Đ Đ°ŃĐżŃ€Đ”ĐŽĐ”Đ»Đ”ĐœĐœĐ°Ń ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚ĐșĐ° ĐŒĐžĐ»Đ»ĐžĐŸĐœĐŸĐČ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚ĐŸĐČ ĐœĐ° Scala Đž Akka» Ст...
DUMP-2015: Â«Đ Đ°ŃĐżŃ€Đ”ĐŽĐ”Đ»Đ”ĐœĐœĐ°Ń ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚ĐșĐ° ĐŒĐžĐ»Đ»ĐžĐŸĐœĐŸĐČ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚ĐŸĐČ ĐœĐ° Scala Đž Akka» Ст...DUMP-2015: Â«Đ Đ°ŃĐżŃ€Đ”ĐŽĐ”Đ»Đ”ĐœĐœĐ°Ń ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚ĐșĐ° ĐŒĐžĐ»Đ»ĐžĐŸĐœĐŸĐČ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚ĐŸĐČ ĐœĐ° Scala Đž Akka» Ст...
DUMP-2015: Â«Đ Đ°ŃĐżŃ€Đ”ĐŽĐ”Đ»Đ”ĐœĐœĐ°Ń ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚ĐșĐ° ĐŒĐžĐ»Đ»ĐžĐŸĐœĐŸĐČ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚ĐŸĐČ ĐœĐ° Scala Đž Akka» Ст...it-people
 
Play Template Engine Based On Scala
Play Template Engine Based On ScalaPlay Template Engine Based On Scala
Play Template Engine Based On ScalaKnoldus Inc.
 
Designing Reactive Systems with Akka
Designing Reactive Systems with AkkaDesigning Reactive Systems with Akka
Designing Reactive Systems with AkkaThomas Lockney
 
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011Matt Raible
 
Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1Matthew Barlocker
 
How the Rules Are Made - KDADS
How the Rules Are Made - KDADSHow the Rules Are Made - KDADS
How the Rules Are Made - KDADSAquila "Q" Jordan
 
Leveraging MLTSS to Accomplish System Objectives
Leveraging MLTSS to Accomplish System ObjectivesLeveraging MLTSS to Accomplish System Objectives
Leveraging MLTSS to Accomplish System ObjectivesAquila "Q" Jordan
 
KaufmanPDEvalCountyResponse-072012-
KaufmanPDEvalCountyResponse-072012-KaufmanPDEvalCountyResponse-072012-
KaufmanPDEvalCountyResponse-072012-Aquila "Q" Jordan
 
Integrating LTSS in Managed Care
Integrating LTSS in Managed CareIntegrating LTSS in Managed Care
Integrating LTSS in Managed CareAquila "Q" Jordan
 

Destaque (20)

Nothing About Me, Without Me - Person-Centered Planning
Nothing About Me, Without Me - Person-Centered PlanningNothing About Me, Without Me - Person-Centered Planning
Nothing About Me, Without Me - Person-Centered Planning
 
Akka-http
Akka-httpAkka-http
Akka-http
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTP
 
Akka HTTP
Akka HTTPAkka HTTP
Akka HTTP
 
Building a Reactive RESTful API with Akka Http & Slick
Building a Reactive RESTful API with Akka Http & SlickBuilding a Reactive RESTful API with Akka Http & Slick
Building a Reactive RESTful API with Akka Http & Slick
 
Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015
 
Scala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on HerokuScala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on Heroku
 
DUMP-2015: Â«Đ Đ°ŃĐżŃ€Đ”ĐŽĐ”Đ»Đ”ĐœĐœĐ°Ń ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚ĐșĐ° ĐŒĐžĐ»Đ»ĐžĐŸĐœĐŸĐČ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚ĐŸĐČ ĐœĐ° Scala Đž Akka» Ст...
DUMP-2015: Â«Đ Đ°ŃĐżŃ€Đ”ĐŽĐ”Đ»Đ”ĐœĐœĐ°Ń ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚ĐșĐ° ĐŒĐžĐ»Đ»ĐžĐŸĐœĐŸĐČ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚ĐŸĐČ ĐœĐ° Scala Đž Akka» Ст...DUMP-2015: Â«Đ Đ°ŃĐżŃ€Đ”ĐŽĐ”Đ»Đ”ĐœĐœĐ°Ń ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚ĐșĐ° ĐŒĐžĐ»Đ»ĐžĐŸĐœĐŸĐČ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚ĐŸĐČ ĐœĐ° Scala Đž Akka» Ст...
DUMP-2015: Â«Đ Đ°ŃĐżŃ€Đ”ĐŽĐ”Đ»Đ”ĐœĐœĐ°Ń ĐŸĐ±Ń€Đ°Đ±ĐŸŃ‚ĐșĐ° ĐŒĐžĐ»Đ»ĐžĐŸĐœĐŸĐČ ĐŽĐŸĐșŃƒĐŒĐ”ĐœŃ‚ĐŸĐČ ĐœĐ° Scala Đž Akka» Ст...
 
Playing with Scala
Playing with ScalaPlaying with Scala
Playing with Scala
 
[Start] Playing
[Start] Playing[Start] Playing
[Start] Playing
 
Play Template Engine Based On Scala
Play Template Engine Based On ScalaPlay Template Engine Based On Scala
Play Template Engine Based On Scala
 
Designing Reactive Systems with Akka
Designing Reactive Systems with AkkaDesigning Reactive Systems with Akka
Designing Reactive Systems with Akka
 
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
HTML5 with Play Scala, CoffeeScript and Jade - Devoxx 2011
 
Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1
 
How the Rules Are Made - KDADS
How the Rules Are Made - KDADSHow the Rules Are Made - KDADS
How the Rules Are Made - KDADS
 
Leveraging MLTSS to Accomplish System Objectives
Leveraging MLTSS to Accomplish System ObjectivesLeveraging MLTSS to Accomplish System Objectives
Leveraging MLTSS to Accomplish System Objectives
 
HCBS Final Rule
HCBS Final RuleHCBS Final Rule
HCBS Final Rule
 
Conflict Free HCBS
Conflict Free HCBSConflict Free HCBS
Conflict Free HCBS
 
KaufmanPDEvalCountyResponse-072012-
KaufmanPDEvalCountyResponse-072012-KaufmanPDEvalCountyResponse-072012-
KaufmanPDEvalCountyResponse-072012-
 
Integrating LTSS in Managed Care
Integrating LTSS in Managed CareIntegrating LTSS in Managed Care
Integrating LTSS in Managed Care
 

Semelhante a Akka http

Building REST API using Akka HTTP with Scala
Building REST API using Akka HTTP with ScalaBuilding REST API using Akka HTTP with Scala
Building REST API using Akka HTTP with ScalaKnoldus Inc.
 
Building RESTful services using SCA and JAX-RS
Building RESTful services using SCA and JAX-RSBuilding RESTful services using SCA and JAX-RS
Building RESTful services using SCA and JAX-RSLuciano Resende
 
Scorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain FrameworkScorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain FrameworkAlex Chepurnoy
 
Rack
RackRack
Rackshen liu
 
Networked APIs with swift
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swiftTim Burks
 
AK 3 web services using apache axis
AK 3   web services using apache axisAK 3   web services using apache axis
AK 3 web services using apache axisgauravashq
 
Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsSagara Gunathunga
 
Understanding ASP.NET Under The Cover - Miguel A. Castro
Understanding ASP.NET Under The Cover - Miguel A. CastroUnderstanding ASP.NET Under The Cover - Miguel A. Castro
Understanding ASP.NET Under The Cover - Miguel A. CastroMohammad Tayseer
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack APIKrunal Jain
 
Python WSGI introduction
Python WSGI introductionPython WSGI introduction
Python WSGI introductionAgeeleshwar K
 
Building Asynchronous Microservices with Armeria
Building Asynchronous Microservices with ArmeriaBuilding Asynchronous Microservices with Armeria
Building Asynchronous Microservices with ArmeriaLINE Corporation
 
Spray - Build RESTfull services in scala
Spray - Build RESTfull services in scalaSpray - Build RESTfull services in scala
Spray - Build RESTfull services in scalaSandeep Purohit
 
Angular 4 The new Http Client Module
Angular 4 The new Http Client ModuleAngular 4 The new Http Client Module
Angular 4 The new Http Client Modulearjun singh
 
Hia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyHia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyAndrew Coleman
 
KrakenD API Gateway
KrakenD API GatewayKrakenD API Gateway
KrakenD API GatewayAlbert Lombarte
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web FrameworkDaniel Woods
 
Where is my scalable api?
Where is my scalable api?Where is my scalable api?
Where is my scalable api?Altoros
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsNaresh Chintalcheru
 
Asynchronous handlers in asp.net
Asynchronous handlers in asp.netAsynchronous handlers in asp.net
Asynchronous handlers in asp.netAbhishek Sur
 

Semelhante a Akka http (20)

Building REST API using Akka HTTP with Scala
Building REST API using Akka HTTP with ScalaBuilding REST API using Akka HTTP with Scala
Building REST API using Akka HTTP with Scala
 
Building RESTful services using SCA and JAX-RS
Building RESTful services using SCA and JAX-RSBuilding RESTful services using SCA and JAX-RS
Building RESTful services using SCA and JAX-RS
 
Scorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain FrameworkScorex, the Modular Blockchain Framework
Scorex, the Modular Blockchain Framework
 
Rack
RackRack
Rack
 
Networked APIs with swift
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swift
 
AK 3 web services using apache axis
AK 3   web services using apache axisAK 3   web services using apache axis
AK 3 web services using apache axis
 
Java colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rsJava colombo-deep-dive-into-jax-rs
Java colombo-deep-dive-into-jax-rs
 
Understanding ASP.NET Under The Cover - Miguel A. Castro
Understanding ASP.NET Under The Cover - Miguel A. CastroUnderstanding ASP.NET Under The Cover - Miguel A. Castro
Understanding ASP.NET Under The Cover - Miguel A. Castro
 
Spray
SpraySpray
Spray
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
 
Python WSGI introduction
Python WSGI introductionPython WSGI introduction
Python WSGI introduction
 
Building Asynchronous Microservices with Armeria
Building Asynchronous Microservices with ArmeriaBuilding Asynchronous Microservices with Armeria
Building Asynchronous Microservices with Armeria
 
Spray - Build RESTfull services in scala
Spray - Build RESTfull services in scalaSpray - Build RESTfull services in scala
Spray - Build RESTfull services in scala
 
Angular 4 The new Http Client Module
Angular 4 The new Http Client ModuleAngular 4 The new Http Client Module
Angular 4 The new Http Client Module
 
Hia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economyHia 1691-using iib-to_support_api_economy
Hia 1691-using iib-to_support_api_economy
 
KrakenD API Gateway
KrakenD API GatewayKrakenD API Gateway
KrakenD API Gateway
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
Where is my scalable api?
Where is my scalable api?Where is my scalable api?
Where is my scalable api?
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using Websockets
 
Asynchronous handlers in asp.net
Asynchronous handlers in asp.netAsynchronous handlers in asp.net
Asynchronous handlers in asp.net
 

Mais de Knoldus Inc.

Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxKnoldus Inc.
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxKnoldus Inc.
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxKnoldus Inc.
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxKnoldus Inc.
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationKnoldus Inc.
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationKnoldus Inc.
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIsKnoldus Inc.
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II PresentationKnoldus Inc.
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAKnoldus Inc.
 
Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Knoldus Inc.
 
Azure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptxAzure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptxKnoldus Inc.
 
The Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and KotlinThe Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and KotlinKnoldus Inc.
 
Data Engineering with Databricks Presentation
Data Engineering with Databricks PresentationData Engineering with Databricks Presentation
Data Engineering with Databricks PresentationKnoldus Inc.
 
Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)Knoldus Inc.
 
NoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptxNoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptxKnoldus Inc.
 
Mastering Distributed Performance Testing
Mastering Distributed Performance TestingMastering Distributed Performance Testing
Mastering Distributed Performance TestingKnoldus Inc.
 
MLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptxMLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptxKnoldus Inc.
 
Introduction to Ansible Tower Presentation
Introduction to Ansible Tower PresentationIntroduction to Ansible Tower Presentation
Introduction to Ansible Tower PresentationKnoldus Inc.
 
CQRS with dot net services presentation.
CQRS with dot net services presentation.CQRS with dot net services presentation.
CQRS with dot net services presentation.Knoldus Inc.
 

Mais de Knoldus Inc. (20)

Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics Presentation
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II Presentation
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRA
 
Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)Advanced Python (with dependency injection and hydra configuration packages)
Advanced Python (with dependency injection and hydra configuration packages)
 
Azure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptxAzure Databricks (For Data Analytics).pptx
Azure Databricks (For Data Analytics).pptx
 
The Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and KotlinThe Power of Dependency Injection with Dagger 2 and Kotlin
The Power of Dependency Injection with Dagger 2 and Kotlin
 
Data Engineering with Databricks Presentation
Data Engineering with Databricks PresentationData Engineering with Databricks Presentation
Data Engineering with Databricks Presentation
 
Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)Databricks for MLOps Presentation (AI/ML)
Databricks for MLOps Presentation (AI/ML)
 
NoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptxNoOps - (Automate Ops) Presentation.pptx
NoOps - (Automate Ops) Presentation.pptx
 
Mastering Distributed Performance Testing
Mastering Distributed Performance TestingMastering Distributed Performance Testing
Mastering Distributed Performance Testing
 
MLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptxMLops on Vertex AI Presentation (AI/ML).pptx
MLops on Vertex AI Presentation (AI/ML).pptx
 
Introduction to Ansible Tower Presentation
Introduction to Ansible Tower PresentationIntroduction to Ansible Tower Presentation
Introduction to Ansible Tower Presentation
 
CQRS with dot net services presentation.
CQRS with dot net services presentation.CQRS with dot net services presentation.
CQRS with dot net services presentation.
 

Último

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Call Us🔝>àŒ’+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>àŒ’+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>àŒ’+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>àŒ’+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
ćŠžç†ć­ŠäœèŻ(UQæ–‡ć‡­èŻäčŠ)æ˜†ćŁ«ć…°ć€§ć­ŠæŻ•äžšèŻæˆç»©ć•ćŽŸç‰ˆäž€æšĄäž€æ ·
ćŠžç†ć­ŠäœèŻ(UQæ–‡ć‡­èŻäčŠ)æ˜†ćŁ«ć…°ć€§ć­ŠæŻ•äžšèŻæˆç»©ć•ćŽŸç‰ˆäž€æšĄäž€æ ·ćŠžç†ć­ŠäœèŻ(UQæ–‡ć‡­èŻäčŠ)æ˜†ćŁ«ć…°ć€§ć­ŠæŻ•äžšèŻæˆç»©ć•ćŽŸç‰ˆäž€æšĄäž€æ ·
ćŠžç†ć­ŠäœèŻ(UQæ–‡ć‡­èŻäčŠ)æ˜†ćŁ«ć…°ć€§ć­ŠæŻ•äžšèŻæˆç»©ć•ćŽŸç‰ˆäž€æšĄäž€æ ·umasea
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesƁukasz Chruƛciel
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 

Último (20)

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Call Us🔝>àŒ’+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>àŒ’+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>àŒ’+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>àŒ’+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
ćŠžç†ć­ŠäœèŻ(UQæ–‡ć‡­èŻäčŠ)æ˜†ćŁ«ć…°ć€§ć­ŠæŻ•äžšèŻæˆç»©ć•ćŽŸç‰ˆäž€æšĄäž€æ ·
ćŠžç†ć­ŠäœèŻ(UQæ–‡ć‡­èŻäčŠ)æ˜†ćŁ«ć…°ć€§ć­ŠæŻ•äžšèŻæˆç»©ć•ćŽŸç‰ˆäž€æšĄäž€æ ·ćŠžç†ć­ŠäœèŻ(UQæ–‡ć‡­èŻäčŠ)æ˜†ćŁ«ć…°ć€§ć­ŠæŻ•äžšèŻæˆç»©ć•ćŽŸç‰ˆäž€æšĄäž€æ ·
ćŠžç†ć­ŠäœèŻ(UQæ–‡ć‡­èŻäčŠ)æ˜†ćŁ«ć…°ć€§ć­ŠæŻ•äžšèŻæˆç»©ć•ćŽŸç‰ˆäž€æšĄäž€æ ·
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 

Akka http

  • 1. Akka - HTTP Harshit Daga Software Consultant Knoldus Software LLP
  • 2. Agenda ● Overview of Akka Http ● Common Abstractions ● Low level API ● High level API ● Demo
  • 3. Overview of Akka-Http ● A library for providing HTTP based services. ● Used for building REST APIs. ● Build on the top of Akka- actors and Streams.
  • 4. Overview of Akka Http (Cont..) ● Akka Http contains following module: – Akka-http-core – Akka-http – Akka-http-testkit – Akka-http-spray-json – Akka-http-xml
  • 6. Common Abstractions ● HttpRequest ● HttpResponse ● HttpEntity ● HttpHeaders ● Marshalling & Unmarshalling
  • 7. Http Request ● Used to send a request to the server ● Akka-Http request consists of - – method (GET, POST, etc.) – A URI – Seq of headers – Entity (body data), and – Protocol HttpRequest (method, URI, List(headers), entity, protocol)
  • 8. Http Response ● Response is what server replies to its client. ● HttpResponse consists of – Status code – Seq of headers – Entity – Protocol HttpResponse(StatusCode, List(headers), entity, protocol)
  • 9. Http Entity ● Contains the data bytes of a message with content-type and length. ● Different kinds of entities: – Strict – Default – Chunked – ClosedDelimited – IndefiniteLength
  • 10. Marshalling ● To convert higher level objects into wire-format. ● Some pre-defined marshallers : – Array[Byte] – String – ByteString – Array[Char] – FormData
  • 11. Unmarshalling ● To convert lover level objects into higher level objects. ● Some pre-defined unmarshallers: – Byte, Boolean – Short, Int, Long , Float, Double – String – Array[String]
  • 12. Low Level API ● The implementation is in akka-http-core module. ● It provides support for : – Connection management – Parsing and rendering of messages and headers – Timeout management – Response ordering
  • 13. Low Level API (Cont...) Http().bindAndHandleSync(reqHandler, interface, portAddr) This method specifies the interface and port to bind for handling incoming Http requests.
  • 14. Low Level API (Cont...) Low Level API is based simply on mapping from request to response
  • 15. High Level API ● Low level API becomes uneasy to handle when we need to create large number of routes. ● For this we use should Higher Level APIs. ● Provides a flexible ways to create routes. ● These are located in akka-http module. ● Low level API becomes uneasy to handle when we need to create large number of routes. ● For this we use should Higher Level APIs. ● Provides a flexible ways to create routes. ● These are located in akka-http module.
  • 16. High Level API (Cont..) ● Directives ● Routing DSL (alternative to Low level API) ● Rejection & Exception Handling ● Path Matcher ● Case class extraction
  • 17. Directives ● A block used for creating route structure. ● Extract the requests from RequestContext to make it available for inner route.
  • 18. Path Matcher ● When request enters the structure, it has an unmatched path. ● The path matcher decides on which route it is supposed to hit. path(“foo” / “bar”) means path is foo / bar
  • 19. Case Class extraction ● Used to directly map request to the case class

Notas do Editor

  1. Actors are used when an application is to be distributed across different threads. And, when it is to be distributed over the network, we should use Akka-http
  2. Akka-http-core → provides support for low level implementation like Connection management Akka-http → for high level, like routing DSL Akka-http-testkit → testkit for testing routes Akka-http-spray-json → for data handling in json Akka-http-xml → for data handling in xml format
  3. Akka-http has large set of case-classes to work with. Some are on client side and some on server side. But there are some common classes that are not specific to client or server.
  4. Response codes are available in StatusCode
  5. Strict → Used for small data which is already available in memory Default → for data streaming Chunked → for data handling in chunks for unknown length ClosedDelimited → close connection after transmitting message IndefiniteLength → for data streaming for infinite length
  6. We can also create our custom marshal for our own types like case-classes All marshallers should be available implicitly.
  7. We can also have our custom unmarshallers for our own types like case-classes
  8. Directives extract the requests from RequestContext and make them available to its inner route