开发者

Windows Azure role is state full or not

According to MSDN, an azure service can conatins any number of worker roles. According to my knowledge a worker role can be recycled at any time by Windows Azure Fabric. If it is the true, then:

  1. Worker role sho开发者_开发问答uld be state less OR
  2. Worker role should persist its state to Windows Azure storage services.

But i want to make a service which conatains client data and do not want to use Azure storage service. How I can accomplish this?


The velocity (whatever it is called) component of AppFabric is a distributed cache and can be used in these situations.


Azure's web and compute roles are stateless means all its local data is volatile and if you want to maintain the state you need to use some external resource to maintain that state and logic in your app to handle that. For simplicity you can use Azure drive but again internally its a blob storage.


You can write to local storage on the worker role by using the standard file IO APIs - but this will be erased upon instance shutdown.

You could also use SQL Azure, or post your data off to another storage service by HTTP (e.g. Amazon S3, or your own server).

However, this is likely to have performance implications. Depending on how much data you'll be storing, how frequently, and how big it is, you might be better off with Azure Storage!

Why don't you want to use Azure Storage?


If the data could be stored in Azure you have a good number of choices: Azure distributed cache, SQL Azure, blob, table, queue, or Azure Drive. It sounds like you need persistence, but can't use any of these Azure storage mechanisms. If data security is the problem, could you encrypt/hashing the data? Understanding why would be useful.

One alternative might be not persist at all, by chaining/nesting synchronous web service calls together, thus achieving reliable messaging.

Another might be to use Azure Connect to domain join Azure compute resource to your local data centre (if you have one), and use you on-premise storage.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜