Using F# script replace powershell in production environment? -


i've been using powershell script automate tasks on production servers. however, reaches limitation when try async , parallel processing, etc.

is f# script replace powershell script? (guess more cumbersome when access file system , other other os objects, easy in powershell). servers don't have visual studio installed. ok copy fsi.exe server run fsx files?

a use case,

  1. download big zip files slow ftp server
  2. unzip files
  3. execute executable files process unzipped files

each steps take while want following hard in powershell

//limit download 3 files @ same time maximum. async {   let! zip = getfromftp ...   let! file = unzip zip   do! ... //run exe parse file } 

f# script not choice replace powershell altogether - mentioned, f# lower-level language, need write ton more code basic system automation stuff. f# isn't well-integrated other windows server technologies, uphill battle. if want go route, should install f# 3.1.2 bundle on server, deploy fsharp.core runtime , fsc/fsi.

since both powershell , f# based on .net, option write more algorithmic, computationally intensive code in f# dll, load powershell. can write powershell cmdlets directly in f#. i've used approach in past.

if specific question related parallel/async execution of code, powershell background jobs might relevant.

edit: on topic of powershell/f# interoperability, powershell type provider might worth investigating.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -