I need to encode video using ffmpeg in Service Fabric service when I receive new message from Service Bus queue. I can extract ffmpeg.exe from resources and run it but can I save input/output video files in internal file system?
Running Service Fabric Explorer from the cluster For developer workstation setup, you can launch Service Fabric Explorer on your local cluster by navigating to https://localhost:19080/Explorer.
Access the logs of a running container Container logs can be accessed using Service Fabric Explorer. In a web browser, open Service Fabric Explorer from the cluster's management endpoint by navigating to http://mycluster.region.cloudapp.azure.com:19080/Explorer .
Service Fabric is Microsoft's container orchestrator for deploying and managing microservices across a cluster of machines, benefiting from the lessons learned running Microsoft services at massive scale.
Azure Service Fabric is a Platform as a Service (PaaS) offering designed to facilitate the development, deployment and management of highly scalable and customizable applications for the Microsoft Azure cloud platform.
I tested it on local cluster by following code:
protected override async Task RunAsync(CancellationToken cancellationToken)
{
while (true)
{
cancellationToken.ThrowIfCancellationRequested();
string filename = "testFile.txt";
File.AppendAllText(filename, "test. ");
string content = File.ReadAllText(filename);
System.Diagnostics.Trace.WriteLine("Content:" + content);
System.Diagnostics.Trace.WriteLine(new FileInfo(filename).FullName);
await Task.Delay(TimeSpan.FromSeconds(1), cancellationToken);
}
}
The result output was:
Content:test.
C:\SfDevCluster\Data\_App\_Node_3\SampleAppType_App51\work\testFile.txt
Content:test. test.
C:\SfDevCluster\Data\_App\_Node_3\SampleAppType_App51\work\testFile.txt
Content:test. test. test.
C:\SfDevCluster\Data\_App\_Node_3\SampleAppType_App51\work\testFile.txt
But path was changed on the next run to C:\SfDevCluster\Data_App_Node_3\SampleAppType_App52\work\testFile.txt.
So I suppose the answer is:
It's possible to use local file system but only for temporary files. And I think it's a good practice to clean up the system at the end of iteration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With