Re:Serverless Docker Beta
by stingraycharles on Tuesday August 14, 2018 @02:56PM
(#17760826)
Yes of course, or I could send it into Kafka instead (which makes more sense to me). The point is, how would a serverless process looks like which doesn’t have a REST API and does this long term polling of websockets?
Re:Serverless Docker Beta
by tlrobinson on Tuesday August 14, 2018 @03:18PM
(#17760999)
Some platforms like Amazon Lambda let you set up functions to consume data from a variety of event sources: https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda...
Re:Serverless Docker Beta
by stingraycharles on Tuesday August 14, 2018 @03:30PM
(#17761090)
How can I consume the Twitter stream API using that?
It depends what you're doing with that stream, most basically you would create a nano/micro EC2 instance that will just trigger Lambda events on every new tweet. Or you could create some more intricate script that does a lot of pre-processing and then stores it in RDS or S3, and with each new update to either of those sources kick off a Lambda.
Re:Serverless Docker Beta
by tlrobinson on Tuesday August 14, 2018 @03:53PM
(#17761295)
Unless the API can stream directly into one of those sources you'd probably need a long-running process, perhaps running on a CaaS like AWS Fargate.
I guess you could argue where to draw the "serverless" line, at functions or containers, but Zeit is calling this container service "serverless" so I think Fargate would fall into the same category. I think it would make sense for Zeit to eventually support long-running containers too (looks like the current max is 30 minutes, I'm not sure how they chose that number)
[0] https://aws.amazon.com/sqs/ [1] https://aws.amazon.com/kinesis/