Windows API behind "virtual files" in OneDrive - winapi

OneDrive folder can show files as-if present, but they are not on disk.
https://support.microsoft.com/en-us/office/save-disk-space-with-onedrive-files-on-demand-for-windows-10-0e6860d3-d9f3-4971-b321-7092438fb38e
I'd like to create a similar folder programmatically.
What API does OneDrive client use?

From official documentation: Build a Cloud Sync Engine that Supports Placeholder Files
Windows 10 version 1709 introduced the cloud files API. This API is a
new platform that formalizes support for sync engines. The cloud files
API provides support for sync engines in a way that offers many new
benefits to developers and end users.
The cloud files API contains the following native Win32 APIs and
Windows Runtime (WinRT) APIs:
Cloud Filter API: This native Win32 API provides functionality at the
boundary between the user mode and the file system. This API handles
the creation and management of placeholder files and directories.
Windows.Storage.Provider namespace: This WinRT API enables
applications to configure the cloud storage provider and register the
sync root with the operating system. Note
The cloud files API does not currently support implementing cloud sync
engines in UWP apps. Cloud sync engines must be implemented in desktop
apps.
Note that the Cloud Filter API provides you the API to manipulate Windows 10 1709's NTFS placeholders, but it will not help you build a "sync engine" at all... There's no notion of "synchronization" in this API.

Related

Firebase Admin SDK - How lacking is the Java release compared to the Node.JS?

I am looking to create a microservice in the backend of my android and iOS app that sends push notification requests to firebase (using maven to organize project). I would like to use the Java admin SDK for this as I am looking to make this call in the backend in this app server rather than right from the android or iOS side. I have been exploring this API and the Java version is missing two APIs that the Node.JS one currently has. I read up on what the two APIs do but I was wondering if anyone who has been working with the admin SDK know how the two Java APIs missing will handicap me in terms of features?
As of today, you won't find the following 2 APIs in the Java Admin SDK:
Firebase Cloud Messaging (FCM)
User management
User management API for Java is currently being developed. FCM will be added in the near future too.

How to copy existing Blob into Azure Media Services using the CLI

I'm looking for a way to copy an existing Blob from an Azure "Storage account" to an Azure "Media Services account" using the CLI or the portal.
There seems to be plenty of documentation for Windows centric platforms- but nothing for 'nix or Mac users.
Side note: Why is there an assumption that I would want to do this via code? (which btw also seems to require a Windows platform)? I've got a large video (e.g., larger then the 200MB limit for portal upload) - I want to load it into media service - why is that so difficult?
I'm not an expert on this, but from a quick glance at the portal and testing it, it seems like you can just upload your video to the (classic) Storage Account created with Azure Media Services, using any tool that can handle Azure Blob Storage, such as the cross platform Cyberduck. After that you can simply select that video in the portal under upload content > from storage. Note that it only works with classic storage accounts.
You can upload you media to any blob storage account
Then when you want to create a media services asset you can copy it to the Media Services blob storage and create an asset using the blob you moved.
Unfortunately at the moment Azure Media Service is not supported VIA Azure Cli
But there is a power shell support
See this article
You can write some code and do everything using the SDK
There are SDKs for .Net , Java, Python, Node, Php and more...
To be visible in the Azure Media Service storage explorer UI, your files need to add a valid extension, as answered here : Azure not displaying blobs within container in Storage Account
Hope this helps,
Julien

What all services can be configured via Azure SDK for ruby

I was looking at Azure SDK for ruby and after comparing the API available there with the list of Azure's services, I noticed that the SDK does not have API for achieving many of the tasks related to various services. Are the API mentioned on SDK's github homepage the only API available ?
Eg: It has API to create a virtual machine, but no API to add DNS server.
The SDK has API to create Virtual network which can take params or XML file.
I also want to know whether we can configure other services using XML files and if yes, where can I find the XML data structure to configure those services.
The azure documentation is huge and I am unable to find proper reference for the XML data structure and list of services which can be configured using Ruby SDK.
FYI : I am on Ubuntu machine and cannot use Azure's other tools which are specific to only Windows.
I wrote an Azure API client (that despite my best efforts, has remained closed source) in ruby that my company uses, and I can relate to how much of a beast their API can be. You will find the best resources here, which will document all of the XML that can be configured. It might also be relevant to note that the official cross platform SDK is actually their Node.js client, which is available at github, which will definitely work on Ubuntu, better than the Ruby SDK.
Following is the list of services configurable by the azure-sdk-for-ruby
Base Management Service (creating affinity group, listing locations)
Cloud Service
Storage Management Service (Blob, Queue, Table)
Service Bus Service (Queue, Topic) - Could not make it work.
SQL Database Management Service
Virtual Machine Management Service
Virtual Image & Disk Management Service
Virtual Network Management Service
I have created a quick reference of available methods and short description of various Azure entities.

Windows 8 Application Packaging

I am working on creating a Windows 8 application. UI is using HTML5. Using WinJs I am calling a WCF service that returns a datatable used to build out the UI. All that is good.
I would also like to create a Window Service that gets packaged up with the application, so when someone download/installs it gets unpackaged and the windows service is started/executed. Is this type of configuration possible?
The WCF service today is a web service, but I would like to make it a windows service. The idea is to make everything self contained. This would allow me to make it available in the Microsoft Online store - if I wanted to go that route.
Windows 8 Applications don't support installing services. The best you can do is install a service separately.
Your WCF service should be decoupled from your app and most probably running on a different machine! I am pretty sure that the they are not going to allow you to install or run services in context of a Windows Store App.
Installing a windows service is not an ideal approach for any Windows 8 application. I understand that you want to make everythig self contained but, why as a WCF local service then? Why don't you consider having it has a data access layer in your app itself? Just a thought.
REGARDING CLIENT SIDE
Web services are separate projects and separate deployment models. You can have one Visual Studio project for the Windows 8 client app and one project for the Web Services side.
Windows 8 apps have several options for saving persistent data, such as endpoints for consuming web services.
There are several consideration when storing Windows 8 application data, such as the location of web services to be consumed.
Windows 8 Application data also includes session state, user preferences, and other settings. It is created, read, updated, and deleted when the app is running.
There are 3 types of dimensions to consider. The system manages these data stores for your app:
(1) local: Persistent data that exists only on the current device
(2) roaming: Data that exists on all devices on which the user has installed the app
(3) temporary: Data that could be removed by the system any time the app isn't running
As a developer, you concern yourself with a couple of objects to persist application data:
The first container object is ApplicationDataContainer. The other is ApplicationData. You can use these objects to store your local, roaming, or temporary data.
REGARDING SERVER SIDE
Your Windows 8 Client app will consume http-based web services.
Most developers deploy web services to the cloud to be consumed by iOS, Android, Windows, and other server side services.
Windows Azure is a cloud offering that makes exposing services to clients very simple.
You can leverage either cloud services for robust solutions or the lighter weight Azure Web Sites.
You can typically choose either of these two project types to create web services:
(1) Windows Communication Foundation WCF; or
(2) ASP.NET Web API, which is included with MVC version 4.
WCF has been around longer and has historically been the primary choice for developers when it comes to exposing services.
Microsoft's more modern concepts about web services relate to the ASP.NET Web API, which truly embracing HTTP concepts (URIs and verbs). Also, the ASP.NET Web API can be used to create services that leverage request/response headers, hypermedia, etc.

Azure + Windows phone 7

I am planning on a photo app, and want to know how I could upload/ download images from windows phone 7 to the blob storage as well as access the table storage. I don't mind placing the access key on the application, since the app is planned to be distributed internally only.
Since the Azure API is not available can somebody tell me how I can do the same ?
You can:
use Azure BLOB API directly (including key on the phone)
Abstract Blob operations behind a server-side web service
I also recommend to check out article by Steve Marx on accessing Azure Blob from Silverlight. It covers a wide range of topics including Shared Access Signatures and how to actually work with Azure Blob API.
I would not place the Access key into any client device. You should think about creating a webservice which can handle the upload for you. That way your phone has not to know about the Azure API.
Try to decouple your Phone 7 application from the backend implementation. Windows Phone 7 supports XNA and Silverlight applications so I guess you're going for the latter. That implies that you need to connect to a service anyway. I would suggest that you put all the backend and Azure specific logic behind a WCF service and call that from within your application.

Resources