api's People
api's Issues
Reasoning toward response cycle, async processing, websockets, Elixir
With external processing, the traditional HTTP request/response cycle is broken; alternatives:
HTTP:
- hijack nginx session... seems horrible
- find Streams ask... circumstantial fix, and seems absent
WS: - mimic request-response tracking/matching + CRUD interface
Shifts the problem: how to pass the websocket around?
options:
- have the original sink subscribe to relevant results (Akka HTTP)
- passing around a functional copy of the websocket for pushing (not Akka HTTP; not Play WebSocket?; Play Channel?)
^ since websockets are TCP-based I don't think you can really pass them around like this, same issue as for HTTP.
Akka HTTP:
- UpgradeToWebsocket.handleMessages (request-response)
- UpgradeToWebsocket.handleMessageWithSinkSource (not necessarily connected)
- handleWebsocketMessages(flow): use with above
^ make Sink per websocket connection, monitoring results from queues/whatever to sort them into the right result sink?
http://doc.akka.io/api/akka-stream-and-http-experimental/1.0/index.html#akka.http.scaladsl.model.ws.UpgradeToWebsocket
serialization... I don't think copying the Sink would be useful - extra sinks bit unfortunate for scaling
- ^ use Erlang/Elixir?
- ^ Node.js can also handle 600k websocket connections, but bit less scalable (esp. more effort for clusters):
Play:
- play.api.mvc.WebSocket
- https://www.playframework.com/documentation/2.3.0/api/scala/index.html#play.api.mvc.WebSocket
- ^ serializable, but no push()
- play.api.libs.iteratee.Concurrent$$Channel
- used in play-akka-angular-websocket
- ^ pass around and use to push?
- ^ Trait yet used by itself rather than implemented
- ^ also something about Enumerator[JsValue]? I don't get it.
- https://github.com/playframework/playframework/blob/master/framework/src/iteratees/src/main/scala/* play/api/libs/iteratee/Concurrent.scala
- Iteratee interface, implementing cancellation and state (Cont/Error/Done)
- https://www.playframework.com/documentation/2.2.x/Iteratees
- bit inelegant since I just tried to shift away from Play
- I don't super understand this...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.