0

I need advice regarding architecture for the service I develop. What I develop is an app for mobile phones (in C#) that performs some image processing. Due to limitations of computational power of mobile devices, I've decided to use Azure. Now I'm busy with some sort of proof of concept. My initial architecture uses Service Bus, Blob storage and a Worker role.

  1. Client app uploads all the needed data(pictures) to the blob storage
  2. than the client app puts a message in the queue of the Service Bus
  3. The worker role is listening to the messages of the Service Bus queue
  4. The worker role receives a message
  5. The worker takes the data from the blob storage
  6. The worker performs some processing
  7. The worker role uploads the result of the processing back to the blob storage.

I have no idea how to get the following step right in order to get the result back on the client. I suppose that a push notification should be sent to the client app, but I have no idea how? It should be sent to a particular device.

Could you please give me some advice regarding the architecture? Maybe you cloud point at some samples?

3
  • I am not sure who the target of the mobil app is. But if its consumers i guess you will not have the clients storing your credentials to the service bus. SignalR would be a good solution to pushing messages to the phones if you are going with an application to leverage the service bus to the mobil phones. Feb 26, 2014 at 19:09
  • This is an ordinary wp app. SebastianStehle suggested to use a REST service to put the image to the blob storage. Clint app needs to get the result from the blob storage somehow. So there is no interaction between client app and the service bus. The question now is - how to get the result on the client? Notify where to download and download from the blob storage or send with the notification?
    – zavolokas
    Feb 27, 2014 at 9:31
  • the answer below gives 3 good cases for doing that then. I would go with signalr(it has a phone client). but the simplest thing to do is to just do polling on the phone. Feb 27, 2014 at 9:33

1 Answer 1

1

Your solution looks fine for me, but i think that no the cpu-performance is a problem but the lack of good libraries for image processing available for WP. I would also use a rest service for you app that puts the image to the blob storage. This decouples your windows-phone-app from your infrastructure, which might change.

I see several options here:

1) Use push notifications: http://www.windowsazure.com/en-us/documentation/articles/mobile-services-windows-phone-get-started-push/

2) Develop a service for your app and use signalr to notify the user. The background process sends a completed-event to the service bus, the service receives the message and forwards it to the server.

3) Use polling, you can use If-Modified-Since header http://msdn.microsoft.com/en-us/library/windowsazure/dd179371.aspx, so you will get a 304 without any content, when the image has not been processed yet (very cheap).

1
  • Didn't know about the 3d option. I think I need to dig in direction of the push notifications.
    – zavolokas
    Feb 26, 2014 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.