Recap: Mobile Services #AzureChat

Thank you to everyone who helped us kick off our first ever #AzureChatMobile Services and Notification Hubs are exciting services on the Windows Azure platform and it was great to hear the community’s voice in this live discussion. Below is a recap in case you missed the chat or want to explore the links for more in-depth content on the topics discussed.

We love your feedback – please do submit feature requests and comments on Mobile Services Uservoice – we literally use it for our weekly iteration planning.

Q1: Can I use data stored on-prem in a Mobile Services application without saving the data in Windows Azure?

A1: We have a number of customers that do this today, using our Custom API feature and the ServiceBus Relay. – @joshtwist

Resources: You can find more information on Service Bus Relay in this tutorial.  To see how Custom API in Mobile Services works, review this documentation. – @mlunes90

Q2: How can I use custom identity in a Mobile Services application?

A2: Absolutely, Mobile Services is very extensible. I have a post that shows how you can add custom identity here: http://qub.me/ydviBA@joshtwist

Q3: Is it possible to use node modules I add to my git repo in table scripts?

A3. Totally – enable source control and npm install your modules. More in this tutorial: http://qub.me/gxFp48. – @kirillg_msft

Resources: Once you enable source control via local git, you can npm install any node module—whether it’s the Azure module, Twilio module, or your own. – @mlunes90

Q4: When should I use push in Mobile Services vs push in Notification Hubs?

A4: Notification Hubs works with any backend, including Mobile Services, your custom backend in the cloud, or your on-premises backend. Use Notification Hubs with your custom backend (including on-premises), if your backend needs rich high scale personable push. Use Mobile Services direct push if your push needs in mobile services are direct. Use Mobile Services and Notification Hubs if you need richer push in your Mobile Services including broadcast & templating, etc. – @kirillg_msft

A4: Notification Hubs are optimized to broadcast millions of highly personalized push notifications within minutes.  Mobile Services is great for sending event-triggered push notifications.  In a two player game, for example, you would use push through Notification Hubs to broadcast special offers to everyone at once, but push through Mobile Services to notify Player B that Player A just completed his turn. – @mlunes90

Q5: Can I build Mac applications with Mobile Services?

A5: You can build Mac apps and we have a number in the store today, our SDK is currently iOS only but it’s open source so you can grab the code here http://qub.me/oKmhUO and switch out the dependency on UIKit very easily. You can vote here http://qub.me/jIq5R9  for the Mac SDK to be made available as a feature.  - @joshtwist

A5.1: Also – Mobile Services exposes all of its client functionality via REST endpoints; if a platform can do REST, it can do Mobile Services. – @dontnetgator (community member)

Q6: What’s the best way to save directly to blob storage without going through SQL?

A6: In my doto app http://qub.me/BqOnbB  I use a custom API to generate blob url and upload. You can get the code here: http://qub.me/0StZTb - @joshtwist

Resources: There are also samples available on saving images to blob storage from iOS, Android, and Windows clients.  For an overview of storing unstructured data in table storage, review this post.  – @mlunes90

Q7: Who is using Notification Hubs today?  Where can I see their architecture?

A7: A couple of public examples: NBC News http://qub.me/wMS0nq, Bing News http://qub.me/3uVDpE. Lots more coming! – @kirillg_msft

Community Questions:

Q: Can Mobile Services server scripts be used to generate dynamically images for mpns push notifications? – @gspyrou

A: You can pass images using mobile services mpns API. To generate pictures best bet is to add a worker or a Scheduler job. – @kirillg_msft

A part 2: Image processing tends to be CPU intensive operation, and is best to be offloaded to the background job. From Mobile Services scripts you can queue up the work/dequeue the results using azure module. In Mobile Services Scheduled script or a dedicated worker (if you intend to do a lot of compute) you can process the jobs/generate images and queue up the result back, so that mobile service script can send notification with an image. – @kirillg_msft

Q: Can we get the ability to trim logs? AFAIK, they are deleted after a certain number of days today. – @vlele

A: You can retrieve/stream down your logs locally using CLI from Windows Azure Mobile Services for custom processing. – @kirillg_msft

Resources: This page contains an overview of the CLI in Mobile Services.  To retrieve your logs locally, you would run azure mobile log download mobileServiceName. – @mlunes90

Q: Can I trigger a notification to be sent to a mobile device from inside a SPROC? – @ryanabr

A: You could use Mobile Services custom API, do the push notification from there and then call SPROC. – @kirillg_msft

Q: Is it possible to send push notifications to iOS, Android and Windows Phone devices from NodeJS using Windows Azure Mobile Services or Notification Hubs? – @oaleynik

A: Notification Hubs comes with a Node.js SDK. Mobile Services is built on Node.js! Both services are available via REST API. – @kirillg_msft

Q: Create scripts in C# is one of the most demanded requests in Voice. Is this going to be made possible soon? – @rafasermed

A: Yes! It is coming. – @kirillg_msft

Q: How can we remote debug custom script? Or can we create a local node.js environment to test?

A: I isolate my scripts and unit test them locally to do this, more information available here: http://qub.me/wI2QfX. - @joshtwist

Q: Currently we can write scripts only for CRUD operations on Virtual Studios 2013. Will it be possible to write both APIs as Scheduler jobs? – @rafasermed

A: You can use source control feature to author your custom APIs and scheduler scripts from Virtual Studios. http://qub.me/kMBG8v@kirillg_msft

Q: Is there a way to “deep” clone a mobile services instance (i.e. scripts, db, custom api, permissions) from the portal? -@vlele

A: You can clone most things by using git source control (table permissions, scripts etc) and the CLI can do everything else. – @joshtwist

Q: Any new features we should be looking for that you can share at this time? – @mikewo

A: We mentioned C# support today already, but you can watch @WindowsAzure’s activity for more J. – @joshtwist

Q: What is the reason to use Git as source control container and no Team Foundation Services? – @rafasermed

A: We use Git as a protocol. TFS supports Git first class, so you would use TFS and Mobile Services as two remotes. – @kirillg_msft

Let us know what topics and services you would like us to discuss in the future and stay tuned to @WindowsAzure for all Windows Azure related news and discussions.