Wednesday 28 November 2018

Azure function Basic Information


    Supplements
    Azure function is same as Google Cloud function, Amazon lambda and auth0webtask.io.


    What is Azure Function?
    Is server-less architecture, server-less means not without server :-). Its means that we do not worry about servers and infra
    We can say is Nano services
    Being call
    • By web-hooks
    • By scheduling
    • By specific trigger
      • From storage
      • Form services

    Separate system into two flow:
    1: Command that point to a service (it alter the state)
    2: Query that provide response from service


    Is it cost effective?
    We only pay for what we consume through services. 

    Can develop into any language
    C#, Python, Java, JavaScript


    We can set binding and output for it.

    Where to use?: 
    Background application that can process data based on storage, IO, http trigger like 
    creating pdf and sending email once to all pending user once in a day. Process image and 
    copy in 4 different dimension just after uploading a profile pic etc.


    How to create?
    1. Go to azure Marketplace
    2. Search Function App
    1. Create
    1. Choose Subscription, Resource Group(Create new or Existing)
    2. Chose Hosting Plan 
      1. Dynamic: Independent billing/uses/monitoring or
      2.  App Service Plan: Your existing service plan
    1. Create
    2. New Function
    3. Choose a template - HttpTrigger-Csharp
    1. Name you function
    2. Choose Authorization level - Anonymous
    1. Create
    1. Change Code in to run.csx
    2. Take you Function URL
    3. Check your Function URL in any tools like Postman
    4. Verify Azure Log



How to Create a Simple Azure Function In Visual Studio?

Based on above instruction you may can easily develop and test you Azure Function locally in  Visual Studio.For it you must have installed either Data Storage and processing or Azure development components in Visual Studio. And flow below steps