Queues, Notifications, Email, CDN, Logging, Caching, Background Tasks, MapReduce, … Svetlin Nakov Telerik Software Academy academy.telerik.com.

Slides:



Advertisements
Similar presentations
Windows Basic and Dynamic Disk Borislav Varadinov Telerik Software Academy academy.telerik.com System Administrator Marian Marinov CEO of 1H Ltd.
Advertisements

Hybrid or Native?! Doncho Minkov Telerik Software Academy Senior Technical Trainer
HTML Forms, GET, POST Methods Tran Anh Tuan Edit from Telerik Academy
Make swiftly iOS development Telerik Academy Telerik Academy Plus.
Cloud Services Cloud Services
Amazon S 3, App Engine Blobstore, Google Cloud Storage, Azure Blobs Svetlin Nakov Telerik Software Academy academy.telerik.com.
RPN and Shunting-yard algorithm Ivaylo Kenov Telerik Software Academy academy.telerik.com Technical Assistant
Shortest paths in edge-weighted digraph Krasin Georgiev Technical University of Sofia g.krasin at gmail com Assistant Professor.
Telerik Software Academy Telerik School Academy.
Asynchronous Programming with C# and WinRT
Unleash the Power of JavaScript Tooling Telerik Software Academy End-to-end JavaScript Applications.
Touch and Gestures with Xamarin Forms
Telerik School Academy ASP.NET MVC.
Character sequences, C-strings and the C++ String class, Working with Strings Learning & Development Team Telerik Software Academy.
Hybrid or Native?! Doncho Minkov Telerik Software Academy Senior Technical Trainer
Done already for your convenience! Telerik School Academy Unity 2D Game Development.
C# Fundamentals – Part I
Welcome to the JSON-stores world Telerik Software Academy Databases.
NoSQL Concepts, Redis, MongoDB, CouchDB
The Business Plan and the Business Model Margarita Antonova Volunteer Telerik Academy academy.telerik.com Business System Analyst Telerik Corporation.
What are ADTs, STL Intro, vector, list, queue, stack Learning & Development Team Telerik Software Academy.
Making JavaScript code by template! Learning & Development Team Telerik Software Academy.
Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training Who, What, Why?
Svetlin Nakov Telerik Software Academy Manager Technical Training
Marketing Mix, SWOT Analysis and Stages of Developing an Idea Margarita Antonova Volunteer Telerik Academy academy.telerik.com Business System.
Access to known folders, using pickers, writing to and reading from files, caching files for future access George Georgiev Telerik Software Academy academy.telerik.com.
Accessing SQL Server and MySQL – Live Demo Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
Learning & Development Telerik Software Academy.
Reading and Writing Text Files Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Telerik Software Academy ASP.NET Web Forms.
Classical OOP in JavaScript Classes and stuff Telerik Software Academy
Optimization problems, Greedy Algorithms, Optimal Substructure and Greedy choice Learning & Development Team Telerik Software.
Using Selenium for Mobile Web Testing Powered by KendoUI Telerik QA Academy Atanas Georgiev Senior QA Engineer KendoUI Team.
NoSQL Concepts, Redis, MongoDB, CouchDB Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
New features: classes, generators, iterators, etc. Telerik Academy Plus JavaScript.Next.
Throwing and Catching Exceptions Tran Anh Tuan Edit from Telerik Software Academy
Loops, Conditional Statements, Functions Tran Anh Tuan Edit from Telerik Academy
Telerik Software Academy ASP.NET Web Forms.
Private/Public fields, Module, Revealing Module Learning & Development Team Telerik Software Academy.
Building Data-Driven ASP.NET Web Forms Apps Telerik Software Academy ASP.NET Web Forms.
Course Introduction Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
Telerik Software Academy End-to-end JavaScript Applications.
Planning and Tracking Software Quality Yordan Dimitrov Telerik Corporation Team Leader, Team Pulse, Team Leader, Team Pulse, Telerik Corporation,
What you need to know Ivaylo Kenov Telerik Corporation Telerik Academy Student.
Data binding concepts, Bindings in WinJS George Georgiev Telerik Software Academy academy.telerik.com Technical Trainer itgeorge.net.
Pavel Kolev Telerik Software Academy Senior.Net Developer and Trainer
Objects, Properties, Primitive and Reference Types Learning & Development Team Telerik Software Academy.
When and How to Refactor? Refactoring Patterns Alexander Vakrilov Telerik Corporation Senior Developer and Team Leader.
Free Training and Job for Software Engineers Svetlin Nakov, PhD Manager Technical Training Telerik Corp. Telerik Software Academy.
Free Training and Job for Software Engineers Svetlin Nakov, PhD Manager Technical Training Telerik Corp. Telerik Software Academy.
Access to known folders, using pickers, writing to and reading from files, caching files for future access George Georgiev Telerik Software Academy academy.telerik.com.
Doing the Canvas the "easy way"! Learning & Development Telerik Software Academy.
.NET Cloud Development Made Easy George Georgiev Telerik Software Academy academy.telerik.com Technical Trainer 1.
Creating and Running Your First C# Program Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical Training
The past, the present, the future Learning & Development Team Telerik Software Academy.
Learn to Design Error Steady Code Svetlin Nakov Telerik Software Academy academy.telerik.com Technical Trainer
Connecting, Queries, Best Practices Tran Anh Tuan Edit from Telerik Software Academy
Processing Sequences of Elements Telerik Software Academy C# Fundamentals – Part 2.
Telerik JavaScript Framework Telerik Software Academy Hybrid Mobile Applications.
Telerik Software Academy Databases.
Things start to get serious Telerik Software Academy JavaScript OOP.
Learning & Development Mobile apps for iPhone & iPad.
Processing Matrices and Multidimensional Tables Telerik Software Academy C# Fundamentals – Part 2.
Nikolay Kostov Telerik Software Academy academy.telerik.com Team Lead, Senior Developer and Trainer
Functions and Function Expressions Closures, Function Scope, Nested Functions Telerik Software Academy
Implementing Control Logic in C# Svetlin Nakov Telerik Software Academy academy.telerik.com Manager Technical trainer
Mocking tools for easier unit testing Telerik Software Academy High Quality Code.
What why and how? Telerik School Academy Unity 2D Game Development.
Windows Security Model Borislav Varadinov Telerik Software Academy academy.telerik.com System Administrator
Presentation transcript:

Queues, Notifications, , CDN, Logging, Caching, Background Tasks, MapReduce, … Svetlin Nakov Telerik Software Academy academy.telerik.com

 Message Queues  Notification Services  Delivery  Content Delivery Networks (CDN)  Logging Services  Caching Services  Background Tasks  MapReduce Calculations  Other Cloud Services 2

Message Queues, Publish-Subscribe Model, Asynchronous Messaging

 Message queues are mechanism for asynchronous message delivery  Publish-subscribe model  Topics are available for subscription  Also known as message channels  Publishers send messages to some topic  Subscribers receive messages asynchronously 4

 Many public cloud platforms provide message queue services in the cloud  IronMQ – iron.io/products/mq iron.io/products/mq  Has free and paid plans (no credit card required)  Supports all major languages (C#, Java, PHP, …)  CloudAMQP – cloudamqp.com cloudamqp.com  RabbitMQ as a service (has free and paid plans)  Supports all major languages (C#, Java, PHP, …)  Amazon SQS – paid service (free trial)  Azure Queue Service – paid service (free trial) 5

Live Demo

Push Notifications in the Cloud Notification Service Client Device Server Application

8  What does "push notifications" mean?  Push notifications are a mechanism to instantly deliver asynchronously messages  To subscribed client applications or devices  E.g. iPhone app / Android app / Windows 8 app / JavaScript Web app (HTML 5 ) Notification Service Client Device Server Application

 Apple Push Notification Service (APNS)  Delivers push notifications for iOS (iPhone / iPad)  A free public service hosted by Apple in their cloud  Accessed through TCP socket to gateway.push.apple.com:2195 (over TLS)  Windows Push Notification Services (WNS)  Delivers push notifications for Windows 8 devices  A free public service hosted by MS in their cloud  Accessed though HTTPS connection to 9

 Android Cloud to Device Messaging Framework ( C2DM )  Push notification service for Android devices  Similar to iOS APNS and Win8 WNS  Hosted by Google in their cloud, free  Google AppEngine Channel API  Push notifications to JavaScript applications  Standard service in Google AppEngine (GAE)  Has Java and Python API (no C# / PHP / Ruby) 10

 Cross-platform push notification clouds unify the push messaging across platforms and devices  Send push messages through any language (like C#, Java and PHP)  Receive the messages in any device / app  iOS, Android, WP7, Windows 8, JavaScript  PubNub –  Has free and paid subscriptions  SDK for C# / Java / PHP / …  Client for iOS, Android, WP7, HTML5, Flash 11

Live Demo

Send / Receive Services for Cloud Apps

 Many delivery cloud services are provided as add-ons in most public clouds  Mailgun  Send / receive s (POP3 and IMAP inboxes)  Free 300 s per day + paid plans  SendGrid  delivery + analytics  Free 200 s per day + paid plans  CloudMailIn  Incoming s to HTTP hook 14

Fast Deliver Content from Multiple Geo-Locations

 Content Delivery Networks (CDN) are content- storage and distribution networks  Speed-up access to files / images / videos  Reduce the load of a central server  Mirror the content across many nodes in different geo-locations (e.g. one per region)  Each node keeps a cached copy of the most- requested files  Could host public and private files  Usually provides SCP / FTP file access + API 16

 Akamai CDN –  The largest and most mature CDN (leader)  Pricing  ~ $0.40 /GB, less for high volume  Rackspace Cloud Files  Cloud storage + CND (based on Akamai)  Pricing (as of June 2012)  ~ $0.10 /GB/month for the storage  ~ $0.40 /GB for the traffic in the CDN 17

 Amazon CloudFront CDN  Used as extra to Amazon S 3 and EC 2  Costs ~ $0.12 /GB – $0.25 /GB for the traffic  Windows Azure CDN  Used as extra for the Windows Azure Storage  Charges ~ $0.12 /GB for US to Europe transfers  MaxCDN –  Seems less expensive  ~ $0.02 /GB- $0.07 /GB (min 1 TB traffic for $40 ) 18

Log Management, Analytics, Alerts, Etc.

 Logging is chronological and systematic record of data processing events in a program  E.g. the Windows Event Log, Apache access log  Logs can be saved to a persistent medium (locally or in the cloud) to be analyzed later  Cloud logging services usually provide:  Storage of logs messages  Analytics (find / explore / visualize)  Alerts (e.g. send / SMS on certain errors) 20

 Logentries – logentries.com logentries.com  Real-time logging service  Log analysis & visualization, events tracking  Free plan: 1 GB log / month, 1 week analytics  Loggly – loggly.com loggly.com  System monitoring and alerting  Application intelligence (analytics)  RESTful API + libraries for Java, C#, PHP, …  Free plan: 200 MB log + 1 week analytics 21

Caching Data for Faster Subsequent Access

 Caching means to store data in memory or in other fast storage for faster later access  E.g. instead of building a Web page (3-4 SQL queries + some processing), get it from the cache  The cache holds data objects (key-value pairs)  Cached data has expiration (e.g. 5 minutes)  Usually runs locally in the cloud provider  AppHarbor runs Membase Memcached Server  Heroku runs Memcached Server (Couchbase)  Free plans ( 5 MB) + paid plans 23

 AppHarbor Memcacher  Accessed through Enyim MemcachedClient Enyim MemcachedClientEnyim MemcachedClient  5 MB free cache storage + paid plans  Heroku Memcache  Accessed through client libraries: MemcachedClient for Java / Python / Ruby  5 MB free cache storage + paid plans  MemCachier for Heroku – memcachier.com memcachier.com  25 MB free cache + paid plans 24

Run Background Server-Side Logic

 Google AppEngine Task Queue API  Perform work as background processing  Based on URL invocation with parameters  GAE asynchronously executes HTTP post to a preconfigured URL for each task in the task queue  Heroku Scheduler  Runs tasks on certain time (e.g. 10 minutes)  Heroku Cron  Daily Cron – runs a task once daily (free)  Hourly Cron – runs a task every hour (paid) 26

Distributing Large Calculations on Multiple Machines

 MapReduce is distributed calculation paradigm  Splits a long calculation to multiple nodes  The results is calculated many times faster  The consumed resources are many times more  Application of "map reduce"  For time-consuming computational tasks  E.g. encoding a video, data compression, generating a very complex report  MapReduce infrastructure is provided as service in many public clouds 28

 Amazon Elastic MapReduce (Amazon EMR)  MapReduce API running in the AWS infrastructure – uses EC 2 and S 3  Cost = EMR price + EC 2 price + S 3 price  Google AppEngine MapReduce Service  Has Python and Java APIs  Priced like usual GAE computing instances 29

 The best way to learn about the other public cloud services is to explore the  Add-Ons Directory on Heroku   A really large list of cloud add-ons 31

форум програмиране, форум уеб дизайн курсове и уроци по програмиране, уеб дизайн – безплатно програмиране за деца – безплатни курсове и уроци безплатен SEO курс - оптимизация за търсачки уроци по уеб дизайн, HTML, CSS, JavaScript, Photoshop уроци по програмиране и уеб дизайн за ученици ASP.NET MVC курс – HTML, SQL, C#,.NET, ASP.NET MVC безплатен курс "Разработка на софтуер в cloud среда" BG Coder - онлайн състезателна система - online judge курсове и уроци по програмиране, книги – безплатно от Наков безплатен курс "Качествен програмен код" алго академия – състезателно програмиране, състезания ASP.NET курс - уеб програмиране, бази данни, C#,.NET, ASP.NET курсове и уроци по програмиране – Телерик академия курс мобилни приложения с iPhone, Android, WP7, PhoneGap free C# book, безплатна книга C#, книга Java, книга C# Николай Костов - блог за програмиране

1. Implement a very simple chat application based on some message queue service:  Users can send message into a common channel.  Messages are displayed in the format {IP:message_text}. Use a language, cloud and message queue service of your choice (e.g. C# + AppHarbor + IronMQ). Your application can be console, GUI or Web-based. 2. Re-implement the application using the PubNub API.

 "Software Development in the Cloud" Telerik Software Academy  clouddevcourse.telerik.com clouddevcourse.telerik.com  Telerik Software Academy  academy.telerik.com academy.telerik.com  Telerik Facebook  facebook.com/TelerikAcademy facebook.com/TelerikAcademy  Telerik Software Academy Forums  forums.academy.telerik.com forums.academy.telerik.com