3 ms·
Are you using Javascript for that? I thought the API needed to have a server that's always running so the chats can be instant, but is it possible to do that wi
by LAMike 10y ago
Are you using Javascript for that? I thought the API needed to have a server that's always running so the chats can be instant, but is it possible to do that with Lambda?
I'm currently using Modulus and I think it will get pretty expensive if I keep making more bots, so a cheaper way to do it would be nice!
Edit:
Found a tutorial: https://medium.com/@igorkhomenko/run-facebook-messenger-chat-bot-on-aws-lambda-2fa800a67d76#.4v5va9iaz https://medium.com/@igorkhomenko/run-facebook-messenger-chat...
- happyslobro 10y agoLambda functions initialize in <10ms when warm, <100ms otherwise, in my experience. They seem to stay warm for 15 minutes or so after a cold start. The excellent Serverless framework is pure JS, but you can also deploy jars to Lambda, which lets you use any JVM language. Clojure Lambdas have a more extreme profile: ~500ms for a cold start, <1ms once warm. You could keep it warm with a timer event source, which could do double duty as a watchdog / heartbeat thing.