Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Srs | 21,080 | a day ago | 93 | September 16, 2022 | 183 | mit | C++ | |||
SRS is a simple, high efficiency and realtime video server, supports RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH and GB28181. | ||||||||||
Node Fetch | 8,220 | 219,668 | 25,410 | a day ago | 86 | July 31, 2022 | 173 | mit | JavaScript | |
A light-weight module that brings the Fetch API to Node.js | ||||||||||
Node Spdy | 2,725 | 292,166 | 386 | 3 years ago | 212 | April 04, 2020 | 62 | JavaScript | ||
SPDY server on Node.js | ||||||||||
Piping Server | 2,671 | 2 | 3 days ago | 106 | September 04, 2022 | 17 | mit | TypeScript | ||
Infinitely transfer between every device over pure HTTP with pipes or browsers | ||||||||||
Cinatra | 1,503 | 4 days ago | 74 | mit | C++ | |||||
modern c++(c++20), cross-platform, header-only, easy to use http framework | ||||||||||
Squbs | 1,381 | 6 | a year ago | 12 | January 18, 2021 | 69 | apache-2.0 | Scala | ||
Akka Streams & Akka HTTP for Large-Scale Production Deployments | ||||||||||
Embedio | 1,301 | 33 | 26 | 3 months ago | 153 | March 11, 2020 | 40 | other | C# | |
A tiny, cross-platform, module based web server for .NET | ||||||||||
Ustreamer | 1,202 | 5 days ago | 19 | gpl-3.0 | C | |||||
µStreamer - Lightweight and fast MJPEG-HTTP streamer | ||||||||||
Download | 1,147 | 43,052 | 1,568 | a year ago | 73 | April 02, 2020 | 56 | mit | JavaScript | |
Download and extract files | ||||||||||
Ulfius | 915 | 2 months ago | 6 | lgpl-2.1 | C | |||||
Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services |
This application comes as Spark2.1-REST-Service-Provider using an embedded, Reactive-Streams-based, fully asynchronous HTTP server.
I wanted to build an interactive REST api service on top of my ApacheSpark application which serves use-cases like:
- Load the trained model in SparkSession and quickly do the prediction for user given query._
- Have your big-data cached in cluster and provide user an endpoint to query it.
- Run some recurrent spark queries with varying parameters.
As you can see that the core
of the application is not primarily a web-application OR browser-interaction but to have REST service performing big-data cluster-computation on ApacheSpark.
With Akka-Http, you normally don’t build your application on top of
Akka HTTP, but you build your application on top of whatever makes sense and use Akka HTTP merely for the HTTP integration needs. So, I found Akka-HTTP to be right fit for the usecases mentioned above.
Following picture illustrates the routing of a HttpRequest:
It uses Scala 2.11, Spark 2.1 and Akka-Http
mvn clean install
We can start our application as stand-alone jar like this:
mvn exec:java
Optionally, you can provide configuration params like spark-master, akka-port etc from command line. To see the list of configurable params, just type:
mvn exec:java -Dexec.args="--help"
OR
mvn exec:java -Dexec.args=“-h"
Help content will look something like this:
This application comes as Spark2.1-REST-Service-Provider using an embedded,
Reactive-Streams-based, fully asynchronous HTTP server (i.e., using akka-http).
So, this application needs config params like AkkaWebPort to bind to, SparkMaster
and SparkAppName
Usage: spark-submit spark-as-service-using-embedded-server.jar [options]
Options:
-h, --help
-m, --master <master_url> spark://host:port, mesos://host:port, yarn, or local. Default: local
-n, --name <name> A name of your application. Default: SparkAsRestService
-p, --akkaHttpPort <portnumber> Port where akka-http is binded. Default: 8001
There are 2 ways to change the default param values:
src/main/resources/application.conf
file directly. Build and then Runmvn exec:java -Dexec.args="--master <master> --name <spark-app-name> --akkaHttpPort <port-to-which-akka-should-listen-to>"