为 Web 服务器使用 Spark Streaming
Using Spark Streaming for Web Server
我正在尝试构建一个仅处理来自客户端的 http 请求(Twitter 数据)、处理它(一些计算)和 return 对客户端的响应的 Web 服务器。唯一的考虑是速度。
我正在考虑 spark streaming,但它似乎无法给出响应。有有效的解决方案吗?或者对于整个框架还有其他推荐吗?
其中一个解决方案可以使用 Kafka 消息队列和 apache spark 流。
Kafka 有两部分:
1] Producer => send messages across network and act as a buffer
2] Consumer => receives messages from producer
可能的设计可以是:
1] Write producer using javascript/node-js
2] Write consumer in spark streaming program which will consume all the twitter messages sent from front end. Then you can process these message in spaek.
Now to give response back -
3] Write second producer in spark program and send your processed data to consumer.
4] Now write second consumer in your front end program (javascript/node-js) which will consume processed messages sent by spark streaming.
如果您需要更多信息,请告诉我。
我正在尝试构建一个仅处理来自客户端的 http 请求(Twitter 数据)、处理它(一些计算)和 return 对客户端的响应的 Web 服务器。唯一的考虑是速度。
我正在考虑 spark streaming,但它似乎无法给出响应。有有效的解决方案吗?或者对于整个框架还有其他推荐吗?
其中一个解决方案可以使用 Kafka 消息队列和 apache spark 流。
Kafka 有两部分:
1] Producer => send messages across network and act as a buffer
2] Consumer => receives messages from producer
可能的设计可以是:
1] Write producer using javascript/node-js
2] Write consumer in spark streaming program which will consume all the twitter messages sent from front end. Then you can process these message in spaek.
Now to give response back -
3] Write second producer in spark program and send your processed data to consumer.
4] Now write second consumer in your front end program (javascript/node-js) which will consume processed messages sent by spark streaming.
如果您需要更多信息,请告诉我。