Seamos “Hipster” Pensemos en ServerLess Manu Delgado Díaz Responsable Web&Cloud en Pasiona Microsoft Azure MVP @MDelgadoDiaz83 [email protected] [email protected] MAD · NOV 24-25 · 2017
Seamos “Hipster”Pensemos en ServerLess
Manu Delgado DíazResponsable Web&Cloud en Pasiona
Microsoft Azure MVP
@MDelgadoDiaz83
MAD · NOV 24-25 · 2017
Manu Delgado· @MDelgadoDiaz83
Conceptos importantes
Manu Delgado· @MDelgadoDiaz83
Conceptos importantes
Abstracción de la infraestructura
Administrado
Provisionado
Event Driven
Cloud-First
Manu Delgado· @MDelgadoDiaz83
¿Por qué Serverless?
Focalizar en el desarrollo y no en la infra estructura
Flexibilidad y escalabilidad
Pago por uso – control de costes
Productividad en el desarrollo
Manu Delgado· @MDelgadoDiaz83
Servicios Serverless
Cognitive Services
Azure Storage
Azure Cosmos DB
Service Bus
Azure Functions
Manu Delgado· @MDelgadoDiaz83
Azure Functions
Solución fácil , flexible y compatible que nos permite
implementar y ejecutar pequeños trozos de lógica de
manera escalable y fácil
Manu Delgado· @MDelgadoDiaz83
Azure Functions – Conceptos
Hosting Plans
Triggers and Bindings
Languages
Functions Runtime
Manu Delgado· @MDelgadoDiaz83
Azure Functions – Hosting plans
Consumption plan
Azure App Service Plan
Manu Delgado· @MDelgadoDiaz83
Azure Functions – Triggers and Bindings
Triggers (cómo reacciona nuestra Function)
Bindings (cómo conectamos los datos a nuestra Function)
Manu Delgado· @MDelgadoDiaz83
Azure Functions – Triggers and Bindings{
"bindings": [
{
"name": "order",
"type": "queueTrigger",
"direction": "in",
"queueName": "myqueue-items",
"connection": "MY_STORAGE_ACCT_APP_SETTING"
},
{
"name": "$return",
"type": "table",
"direction": "out",
"tableName": "outTable",
"connection": "MY_TABLE_STORAGE_ACCT_APP_SETTING"
}
]
}
module.exports = function (context, order) {
order.PartitionKey = "Orders";
order.RowKey = generateRandomId();
context.done(null, order);
};
function generateRandomId() {
return Math.random().toString(36).substring(2, 15) +
Math.random().toString(36).substring(2, 15);
}
Manu Delgado· @MDelgadoDiaz83
Azure Functions – LanguagesLanguage 1.x 2.x
C# GA Preview
JavaScript GA Preview
F# GA
Java Preview
Python Experimental
PHP Experimental
TypeScript Experimental
Batch (.cmd, .bat) Experimental
Bash Experimental
PowerShell Experimental
Manu Delgado· @MDelgadoDiaz83
Azure Functions – Functions Runtime
+
Manu Delgado· @MDelgadoDiaz83
Azure Functions – IntegrationsType Service Trigger* Input Output
Schedule Azure Functions ✔
HTTP (REST or webhook) Azure Functions ✔ ✔**
Blob Storage Azure Storage ✔ ✔ ✔
Events Azure Event Hubs ✔ ✔
Queues Azure Storage ✔ ✔
Queues and topics Azure Service Bus ✔ ✔
Storage tables Azure Storage ✔ ✔
SQL tables Azure Mobile Apps ✔ ✔
NoSQL DB Azure Cosmos DB ✔ ✔ ✔
Push Notifications Azure Notification Hubs ✔
Twilio SMS Text Twilio ✔
SendGrid email SendGrid ✔
Excel tables Microsoft Graph ✔ ✔
OneDrive files Microsoft Graph ✔ ✔
Outlook email Microsoft Graph ✔
Microsoft Graph events Microsoft Graph ✔ ✔ ✔
Auth tokens Microsoft Graph ✔
Manu Delgado· @MDelgadoDiaz83
Let’s Code
Manu Delgado· @MDelgadoDiaz83
FAQs
Manu Delgado DíazResponsable Web&Cloud en Pasiona
Microsoft Azure MVP
@MDelgadoDiaz83
MAD · NOV 24-25 · 2017