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,
- download big zip files slow ftp server
- unzip files
- 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
Post a Comment