<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Interesting..<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Where does the 8 second limit come from? (Rodeos and bull/bronc riding, where you only have to stay on for 8 seconds?) I’ve seen this 8 second thing in a bunch of places lately, and I wonder.. why not 7, or 10 or whatever?  I find it hard
 to believe that someone has a 3 bit counter in seconds (or worse, it’s a 33 bit counter counting nanoseconds or some such, and the limit is actually 8.589 seconds)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Beowulf <beowulf-bounces@beowulf.org> on behalf of John Hearns <hearnsj@gmail.com><br>
<b>Date: </b>Wednesday, November 25, 2020 at 2:42 AM<br>
<b>To: </b>Tim Cutts <tjrc@sanger.ac.uk><br>
<b>Cc: </b>"beowulf@beowulf.org" <beowulf@beowulf.org><br>
<b>Subject: </b>[EXTERNAL] Re: [Beowulf] Lambda and Alexa [EXT]<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Aha. I did not know about the 8 second limit. I use Alexa with a Philips smart lighting hub to control house lights. Sometimes nothing happens...
<o:p></o:p></p>
<div>
<p class="MsoNormal">I assumed this was Alexa not understanding a Scottish accent. I forgive Alexa now - she might have been having trouble talking to the Hue.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, 25 Nov 2020 at 10:21, Tim Cutts <<a href="mailto:tjrc@sanger.ac.uk">tjrc@sanger.ac.uk</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Indeed, my main personal experience with Lambda so far has been in writing an Alexa skill in my spare time.  It’s been quite fun, and very instructive in the benefits and pitfalls of lambda.
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">My main takehomes so far:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">1.  I love the fact that there’s basically no code at all other than that required to deliver the actual skill. Just handler functions for the incoming requests (Intents, as Amazon call them)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">2.  Debugging is awkward.  There is no interactive debugging, as far as I can tell.   Log inspection is about all you have, and some errors are obtuse (for example, some valid Node.js constructs produce syntax errors on Lambda, and it’s
 very hard to track down when it happens - unit tests all pass locally but then you get a syntax error in the LogWatch logs, with a useless stack trace that doesn’t tell you where the syntax error is).  Debugging and unit testing on your laptop is hard to do;
 many Alexa APIs rely on real hardware functions and the simulators don’t handle them.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">3.  Persistence of data is fairly straightforward using S3 buckets or DynamoDB, and I haven’t noticed latency issues with those (of course the interactions are on a human timescale, so latency isn’t really much of an issue)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">4.  Interaction with external services can be problematic; Alexa lambda functions must return within 8 seconds, which can be fun if your skill needs to fetch data from some other source (in my case a rather sluggish data service in Azure
 run by my local council), and there’s no clean way to handle the event if you hit the 8 second limit, the function just gets terminated and Alexa returns a rather meaningless error to the user.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Tim<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 25 Nov 2020, at 09:45, John Hearns <<a href="mailto:hearnsj@gmail.com" target="_blank">hearnsj@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Helvetica">BTW, I am sure everyone knows this but if you have a home assistant such as Alexa everytime you ask Alexa it is a lambda which is spun up <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- The Wellcome Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1
 2BE. <o:p></o:p></p>
</div>
</blockquote>
</div>
</div>
</body>
</html>