
Microsoft Azure: Functions - bpierre
https://azure.microsoft.com/en-us/services/functions/
======
crandycodes
I mentioned this in the other thread
([https://news.ycombinator.com/item?id=11398402](https://news.ycombinator.com/item?id=11398402)),
I'm Chris from the Azure Functions team. Feel free to AMA. :)

~~~
existencebox
Hey! Love this work, this is a model I've been very fond of for some time now.
However, as a Python koolaid drinker, I do have to ask, is Python on your
roadmap? (and if not, whyso?)

Edit: realized in hindsight that many of the posts in this thread are/may be
about "do you support X" (as for any shiny new feature like this), I imagine
you guys may have a doc to describe this so feel free to just drop a link and
not waste time explaining (to me at least) if I missed it when reviewing the
primary docs. :)

~~~
crandycodes
It absolutely is on our roadmap. You can actually try out an early
experimental version via the portal, but it will change DRASTICALLY before we
announce "full support" for Python. It's definitely high on our list.

Check out this article for a good overview: [https://azure.microsoft.com/en-
us/documentation/articles/fun...](https://azure.microsoft.com/en-
us/documentation/articles/functions-overview/)

~~~
jonny1090231
I second Python!

------
aaronbrethorst
I'd love to use Lambda, but the cold start issue[1] makes it a nonstarter for
me. Anyone know if Azure Functions works around/solves this problem?

[1] documented here, e.g.
[https://forums.aws.amazon.com/thread.jspa?threadID=181348](https://forums.aws.amazon.com/thread.jspa?threadID=181348)

~~~
narrowrail
I have to admit that I don't get it either for most of these offerings (as
mentioned elsewhere, there are offering from all the big tech giants incl.
IBM). However, it seems to me that one could just use a $10/mo Linode that is
always running and predictably costs $120/yr. There could be data transfer
costs into/out of these cloud services that make Lambda-like offerings more
competitive from a TCO perspective, but that seems unlikely and project
specific. I would like to hear a valid use-case from an actual user.

Edit: typos/ punctuation

~~~
RussianCow
Not an actual user, but I know people who have used Lambda with success. I
think the main use case is APIs for which traffic is extremely variable. It's
less about cost and more about the ability to seamlessly scale up with
traffic. For instance, if your site gets featured on Hacker News, services
like Lambda and S3 allow your site to scale almost infinitely and handle all
that traffic with ease, and yet they're super cheap when you don't get much
traffic, so in those cases you get the best of both worlds. The equivalent
using a traditional VPS is either to have a really beefy machine running 24/7
(expensive), or to build an architecture that allows you to spin up more
instances at will and scale that way (really time-consuming and difficult to
get right).

~~~
ddorian43
I think you need a cdn to scale s3. So probably s3 is not enough. The
equivalent if your api is mostly for reading is to put varnish in front of it.

~~~
RussianCow
S3 can scale with traffic all by itself, so you don't necessarily need a CDN.
The CDN just distributes your assets around the world, and also does a few
other things like caching to help those assets load more quickly.

------
gagege
F#, Microsoft's FUNCTIONAL programming language, can not be used to write
Azure FUNCTIONS? You can even see them borrowing from F# with the .csx files
for writing C# functions. I'm a constantly dumbfounded at the way Microsoft
neglects this wonderful language.

~~~
crandycodes
We had to make some tough scoping calls, but we are actively working on full
F# support, based on our C# implementation. You _can_ use F#, but right now it
is pretty basic. Check out this sample which you can also deploy via the
portal (experimental category): [https://github.com/Azure/azure-webjobs-sdk-
templates/tree/ma...](https://github.com/Azure/azure-webjobs-sdk-
templates/tree/master/Templates/QueueTrigger-FSharp)

Thanks for the feedback!

~~~
paulbatum
Slight correction, F# support is broken right now. But its being fixed as we
speak :) [https://github.com/Azure/azure-webjobs-sdk-
script/pull/203](https://github.com/Azure/azure-webjobs-sdk-script/pull/203)

------
devy
Google Cloud Platform (GCP) had released similar offering in alpha called
"Google Cloud Functions"[1] two months ago[2] as well.

[1]
[https://cloud.google.com/functions/docs](https://cloud.google.com/functions/docs)

[2]
[https://news.ycombinator.com/item?id=11066718](https://news.ycombinator.com/item?id=11066718)

~~~
psuter
...and IBM announced OpenWhisk in February (and it's open source!):

[https://developer.ibm.com/openwhisk/](https://developer.ibm.com/openwhisk/)

------
andrewstuart
A more distinctive name would have made it easier to search for.

Hopefully everyone who ever writes anything on the Internet about this refers
to it as "Azure functions", which will make it possible to find information.
This seems unlikely however.

Microsoft would have helped out everyone-with-a-question by giving it a
slightly more distinctive name to search by, such as PureFunctions or
something.

Search Bing for:

"problem with functions"

"functions won't initialize"

"how to write functions with functions"

"what sort of language can I use functions with"

"getting started with functions"

"error with functions"

"how to write lambda functions with functions"

"my functions function is not functioning"

The pain begins instantly.

~~~
crandycodes
The time I spent in meeting discussing this name... :)

Honestly, you're right that we're going to run into fun search engine issues,
but Stack Overflow tags should hopefully help.

We opted for making it obvious what our product was doing and Functions was an
logical evolution of our WebJobs SDK Functions concept, which is essentially
what our product is - this is just a WebJobs SDK-as-a-Service.

Time will tell; I hope we don't have to rebrand someday just to show up in the
search engines, but we'll do what we hope is best for the customer.

~~~
raghava
At work, we were guessing the name of AWS Lambda/Google Functions competitor
by Azure and we were guessing Omicron, which comes after Lambda in the Greek
alphabet and also has 'micro' in it.

[https://en.wikipedia.org/wiki/Omicron](https://en.wikipedia.org/wiki/Omicron)

Alright, any opensource lambda/functions clone can now take this name I guess!

------
swalsh
2 questions. Does this work with Service Bus? Right now I have a console app
sitting on a linux VM (written in C#) that connects to Service Bus, waits for
messages, and handles it.

A lot of what I do in my app is write file to the local system, and upload it
via FTP to somewhere else. Now, there's no requirement to write the file to
anywhere locally (i do it more as a backup, and I could back it up in a
database table i suppose), but its super convenient... how does the file
system work in a system like this? Would it require Azure Storage?

~~~
crandycodes
1\. We should have Service Bus support in the next month or so. You can see a
sample of it in progress here: [https://github.com/Azure/azure-webjobs-sdk-
script/tree/maste...](https://github.com/Azure/azure-webjobs-sdk-
script/tree/master/sample/ServiceBusQueueTrigger)

2\. You can access the file system and all your functions share the same files
because we're using a network file share.

~~~
Delphiza
And event hubs? Based on [https://github.com/Azure/azure-webjobs-sdk-
script/tree/maste...](https://github.com/Azure/azure-webjobs-sdk-
script/tree/master/sample/EventHubTrigger) I assume it's also coming soon?

~~~
paulbatum
Event Hubs support is already in there and we have a couple of basic
templates. Make a new function and check the "Data Processing" scenario
category.

~~~
crandycodes
We'll have some more templates and end to end samples out soon, as well.

------
IanCal
Looks really interesting, I've been waiting for on-demand python since picloud
shut down.

Is there any information on pricing? Links in various places say to visit the
pricing page but the pricing page just says what's free and how it's billed
with no actual prices.

What are the limitations? I assume there's some limit to the size of what I
upload (data/code/dependencies). Is there a maximum runtime?

Edit - Given this is in the early stages, I'd love to request a manageable
runtime limit. I understand why you don't want to have people complaining that
they started 10k infinite loops, but I'd like to be able to limit things to
either short periods for things I know really should complete in < 10s or
longer ones as I've got a bunch of stuff that might take 10 minutes or more
I'd also like to do.

This might be an issue on your side though, I can see it being an issue
starting 10k long running requests rather than knowing you just need to
schedule 10k 1 minute requests.

~~~
crandycodes
Our pricing is either the dedicate App Service pricing which is GA'd already
or the new Dynamic tier which is FREE (as in beer) until beginning of May.
We'll have pricing come out sometime this month.

You should have at least a GB of disk space to work with.

We don't have a maximum runtime, yet, but we're likely add a "timeout" feature
in the near future so you can optionally time it out.

~~~
IanCal
Thanks for the reply.

> Our pricing is either the dedicate App Service pricing which is GA'd already
> or the new Dynamic tier which is FREE (as in beer) until beginning of May.
> We'll have pricing come out sometime this month.

Sounds good, I'll keep an eye out for it. After seeing somewhere else in the
thread that this took you < 3 months I would have been very surprised if you'd
also settled on pricing already!

> You should have at least a GB of disk space to work with.

That's fantastic, a huge step up from lambda.

> We don't have a maximum runtime, yet, but we're likely add a "timeout"
> feature in the near future so you can optionally time it out.

 _Very_ nice. These two bits of information make functions useful for far more
tasks, thank you!

------
eb0la
Good timing. I was about to reccomend starting a project on AWS because Azure
didn't have something like aws lambda.

Great job guys

------
curiousDog
Surprised they didn't call it Delegates, haha.

~~~
hyperliner
More surprised they did not call it "Lambda for Azure, Cloud Edition"!

------
nailer
> Azure Functions allows developers to take action by connecting to data
> sources

Could I connect to a database on a socket, or is this for 'pure' functions
without side effects?

~~~
hardwaresofton
From their page ([https://azure.microsoft.com/en-
us/documentation/articles/fun...](https://azure.microsoft.com/en-
us/documentation/articles/functions-overview/)):

> Write any function under a minute - either when you need a simple job to
> cleanse a database or to build functionality that processes millions of
> messages from connected devices. Use your development language of choice
> (C#, Node.JS, Python and more). Pay only for the time your code runs and
> trust Azure to scale as needed.

Sounds like you'll be able to connect to other stuff.

IMO functions without side-effects are useless in many contexts, I'd guess
that this is one of them, as you probably want to use the results of your
computation somehow.

~~~
crandycodes
Yup. You are sandboxed for certain activities, but you can certainly create
outbound requests for talking to databases or APIs

------
crandycodes
I'm Chris from the Azure Functions team. Feel free to AMA.

~~~
Analemma_
Are there any significant differences between this and AWS Lambda? I know this
sounds accusative and I swear I don't mean it that way: Lambda is awesome and
if this is more-or-less the same thing, this will be too. I just want to make
sure I'm understanding correctly what the service is :)

~~~
crandycodes
You can see our full list of features here: [https://azure.microsoft.com/en-
us/documentation/articles/fun...](https://azure.microsoft.com/en-
us/documentation/articles/functions-overview/#features)

One feature I'm particularly proud of is our code-less integration that lets
you output to various services without writing against their SDK, saving lots
of boilerplate code.

------
adopo
Can you give some pros and cons of using Azure Functions vs Azure Service
Fabric? What are some of the reasons you would use Azure Service Fabric over
Azure Functions?

~~~
itaysk
Those are completely unrelated products. Functions is a server-less philosophy
kind of thing. SF is a cluster management and orchestration technology so
obviously very server oriented (It manages servers)

~~~
adopo
When you look at stateless Microservices vs azure functions which you run all
the time in app service, they both appear to overlap. My question was more
focused here

~~~
crandycodes
So Functions could be treated as an opinionated, lightweight microservice
framework, and thus you could compare it to other microservice frameworks like
Service Fabric. Service Fabric is great for so many reasons. It can handle
large, heavy duty applications. Functions is great for the opposite reasons,
small & lightweight. You should be writing Functions like you'd write a unix
tool; it should to one thing and do it well.

Cory is in the middle of a great talk where he helps "demystify" these
services. (Which I can't find a link to right now...)

------
nivertech
@crandycodes I have two questions:

1\. How does Windows sandboxing implemented in WebJobs?

2\. Do I understand correctly that all functions of the same Azure a/c may run
in the same sandbox. I.e. you only sandbox users, but not individual
Functions?

------
base
Very interesting. Seems a lot easier to setup than in AWS (Lambda + API
gateway). Now you just need support for more languages like Ruby :)

------
luisrudge
is there a separate runtime that I can install locally (or in another cloud)?

~~~
crandycodes
It's possible today and we'll make it easier over the next two months.
[https://github.com/Azure/azure-webjobs-sdk-
script/wiki](https://github.com/Azure/azure-webjobs-sdk-script/wiki)

------
sciurus
See
[https://news.ycombinator.com/item?id=11398323](https://news.ycombinator.com/item?id=11398323)

~~~
dang
We merged them.

