A breaf introduction in Windows Azure Mobile Services. This presentation shows you how you can build a full cross-platform chat application ( social media providers auth, push notification). The server side code is written in node.js
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Building a chat app with windows azure mobile services
1. Building a chat app with
Windows Azure Mobile Services
1 march 2014, Timisoara
2. Flavius Radu Demian
Software developer, Avaelgo
I really like programming, like really love it
I love web and mobile
I won Excite 2 year ago
Please feel free to ask questions any time and don’t be shy because
Knowledge is power
flaviusdemian91@yahoo.com | flavius.demian@gmail.com | @slowarad
6. Overview
Clients for:
Windows Store
Windows Phone 8
iOS, Android, Javascript
You can add a cloud backend to your app in minutes without the
need for server code
All the SDK’s are open source click me
It’s integrated with GIT
You can use filters on you clients to manipulate easily data click me
Create Service, Download Free App and GIT ( add package) Demo click me
7. Storage
Windows Azure SQL Database
Dynamic schema on/off
REST API generated per table
Data centric platform
Access your data through :
Portal
Sql Management Studio
Rest API
9. Server side logic
It is written in
Node.js :
is a software platform for scalable server-side and
networking applications.
applications are written in JavaScript can be run within
the Node.js runtime on Windows, Mac OS X and Linux with no
changes.
10. “Data Centric” Server Logic
Backend runs Node js on small azure VM’s
“Interceptors” exposed for all CRUD requests to all tables
You only get access to a predefined set of node modules :
request, console, push.*, tables, statusCodes, azure, mssql
click me
Demo with interceptors and packages
11. Custom API
You can make your own api very quickly
Let’s see how: click me and after let’s look at the demo
12. Push notifications
The notification provider server mentains a "persistent IP connection"
with your Device in order to deliver notifications when the app needs to
'say' something to you.
Payload limited, specific to platform
The global push object is used to send push notifications
Success and Error callbacks are provided
13. Push notifications overview
Windows Phone case study
1) The app requests a channel from the
Notifications Provider
2) The app send the channel uri to
Azure Mobile Services which stores it
3) When a notification is sent Azure
Mobile Services executes something
like this:
push.mpns.send(channelUri….)
4. The notifications goes through the Notifications Provider which forwards it to the device
Demo
14. Athentication & Authorisation
You can make provide quick auth in your app with
Facebook
Twitter
Google
and Windows Azure Active Directory
Microsoft
15. Authorisation
Table level authorisation for CRUD operation
Everyone: any request by anyone is accepted
Anyone with Application Key: app key is sent on the request distributed
( default)
Authenticated Users: users authenticated with one of the mentioned identity
providers
Scripts and Admins: registers scripts or requests via the master key
The application key is not secure and should not be used to authenticate
users of your app
Demo
16. Scheduler
Run jobs on simple or complex recurring schedules
such as:
Send broadcast push notifications
Archiving old or duplicate data records
Processing or resizing stored images
Invoking a Web Service over HTTP/s
Post a message to a Windows Azure Storage Queue
Demo
17. Diagnostics and Logging
View diagnostics directly in the portal including
API calls, CPU time and Data Out
LoggingConsole.* operations like console.log and
console.error provide an easy means to debug
your server side scripts.
Demo
18. Scale
Compute - scale between shared and reserved mode,
Increase/decrease your instance count
Storage ability to scale out your mobile service tenant(s) to a
dedicated SQL DB
Ability to scale up your SQL DB from web through business to
150GB
21. Review of Azure Mobile Services
Create a scalable and secure backend for your Windows, Android, and iOS apps
Store data in the cloud
Easily authenticate users
Send push notifications
Consume your favorite services
Monitor, alert, and auto scale
Cheap and FREE in some cases -> click here
Preview: No availability Service Level Agreement
Paid: General Availability: 99.9%
22. Thanks
Good luck at Excite
I hope you will win and after that hold a presentation like I do
now
Let’s look more at the code, don’t worry the questions will come
inevitably