You can write pure functional programs in F# but the F# compiler offers no guarteen that your programs are pure. It's quite easy to pick up a dependancy on a library that has side effects and its up the programmer to manual check that this has happen.

However if your building a server application I'm not entirely sure that it would need to be "entirely" pure. I think that all you need do is avoid storing state in server memory between request, as advocated by SOA architecture (and of course for along well before that buzzword became fasionable). I think writing to logs, reading and writing state to some kind of database would be okay.

There's certainly some scope for doing "Hot Code Deployment" this with F# but it doesn't have it out of the box. I can imagine writing some sort of plugin archtecture that allows "Hot Code Deployment", probably using AppDomains and dynamic loading of assembles, but it wouldn't be easy. However Microsoft have been doing work on this problem in at least two areas that I can think of:

- IIS 6.0 offered some "Hot Code Deployment" features and they were improved with IIS 7.0 (windows vista/ server 2008). Basically you should beable to over write the web sites source files and dll, and the server should finish off processing the old request with the old code and start processing new request with the new ones. I haven't tried it so I can say how well it works.
- The dynamic language runtime (DRL). This a layer built on top of the CLR to offer dynamic compilation and execution of code. Not exactly the same thing as "Hot Code Deployment" but you could see how it would be useful in building an application that did support.

Cheers,
Rob

By on 1/18/2008 12:08 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper