AZure storage & soluto

AZURE Services

Cloud Services
Websites
VMs
Storage
Cache
HdInsight
ServiceBus
Management
Automation
Analytics

Azure storage - accounts

Different storage accounts for different environment.
Most QA environment use single storage account
for each environment.


Azure storage - accounts

Production Environments have several accounts
  • Raw
  • Analytics
  • RawExt
  • Web
  • HDInsight
  • ....
Azureview reads data from all accounts related to enviornment

Blob storage

  • Distributed FS in the cloud
  • Useful for storing unstructured data, test/binary
  • Support for Page Blobs & Block blobs  

BLOB storage - STRUCTURE

Account -> Container -> blob uri

Example:
Container:AndroidAppsReportLatestByClient
Uri: 0a2d-2abced-50a231-abcd/00-220410/31a-fabc.json

It's possible to list blob by Uri prefix, giving us
a folders like functionality.

BLOB STORAGE - REST API

  • Get blob
    • GET https://myaccount.blob.core.windows.net/mycontainer/myblob
  • Put blob
    • PUT https://myaccount.blob.core.windows.net/mycontainer/myblob
  • Delete blob
    • DELETE https://myaccount.blob.core.windows.net/mycontainer/myblob
  • List blobs
    • GET https://myaccount.blob.core.windows.net/mycontainer?restype=container&comp=list
    • params - prefix, marker
  • Put block/list block/properties/acl and more
  • https://msdn.microsoft.com/library/azure/dd135733.aspx

soluto Usage - API

IBlobContext, IBlobContext<T>
  • List[Async]
  • GetOne[Async]
    • GetOneAsByteArray
    • GetOneAsString
  • Create[Async]
  • Delete[Async] 
  • Append
  • Prepend
Full documentation at IBlobContext.cs 

ILatestByClientContext - used for getting latest by client reports

SOLUTO USAGE

Storing telemetry reports
Storing hive results
Storing raw data
Use for message passing (along with queue)
Use for writing to Hdinsight (before hbase)
Static content (web/images)
Conversation Messages (html)


Table storage

  • Used for flat structured data
  • Data is schema free 
  • Each table row has
    • PartitionKey
    • RowKey
    • Set of properties - fields + values
  • Tables Rows are mapped to CLR Entities

Table storage - structure

Account -> Table -> Row
Row Structure
PartitionKey - string value for partitioning the data
RowKey - string value for indexing and ordering the data
Timestamp - Property the specify the time the row was updated (or created)

PK+ RK = Unique identifier for the row/entity

Cells/Properties - Set of fields and values for the row/entity 

Table storage - rest api

https://msdn.microsoft.com/en-us/library/dd179423.aspx

TABLE STORAGE - Soluto

ITableContext<T> interface
  • GetOne(query) - get single entity
  • Get (query)- retrieve a list of entities
  • UpdateOne(query, update)- update an entity
  • MergeOrInsert(query, entityInitalizer, update)- update an entity
  • Delete(query) - delete entity/ies
  • Insert(entity) - insert new entity

Check ITableContext.cs

Table storage - soluto usage

User properties
Machine properties
Analytics
Configurations
Conversation Messages
Device Activity
Mobile Apps definition
And more...

check azureview - tables
https://prodenv6azureview.mysoluto.com/

Queue storage

Used for passing messages between roles
IQueueContext.cs

Factory

Build Contexts based on reflection:
EntityMap attribute
example: [EntityMap(StorageType.Table, "Web", "Machines")]

AZure storage & soluto

By yshayy

AZure storage & soluto

  • 1,294