Anil Maddala
Anil Maddala

Reputation: 908

TCP Worker Role to Web Role Communication

I am new to Azure platform.

I am able to connect with the webrole.

Now how can i send data from the Worker Role, to the Web Role to display on the Website?

And how can i display the continuous TCP data which the WebRole gets, without refreshing the page or starting over?

Thanks for your Help

Upvotes: 0

Views: 2667

Answers (3)

d.popov
d.popov

Reputation: 4255

It depends on the data you want to transfer.

For messaging between Worker and Web roles you can use Queues. the size of the messages is limited to 8k. if you need bigger data to be transferred, you should use Table/Blob Storage, and pass the address to the table storage via Queues.

Upvotes: 0

user152949
user152949

Reputation:

You can communicate directly between roles via their internal endpoints.

For more: http://msdn.microsoft.com/en-us/library/windowsazure/gg433033.aspx

When it comes to the worker role pushing notifications to the web role then I suggest you look into node.js for Azure.

For more: http://blogs.msdn.com/b/windowsazure/archive/2011/12/16/node-js-in-windows-azure-to-the-cloud-and-beyond.aspx

Upvotes: 1

RyanFishman
RyanFishman

Reputation: 695

The best way to send data from the worker role to the web role is to have the worker role write some data to table/blob storage and have the web role poll periodically for changes to this data.

What do you mean display continuous TCP data? Do you mean like streaming a video? Two methods for that are AJAX polling or to use flash.

Upvotes: 0

Related Questions