

F# Web Services on any platform in and out of a web server - cdl
http://www.servicestack.net/mythz_blog/?p=785

======
mythz
Cool! (Core member of ServiceStack here :)

For those interested I used F# on OSX/Mono for this post. Since F# is quite
terse, I prefer to use a POTE (Plain Old Text Editor) to develop with it on
OSX. You can configure Sublime Text to work with F# with these instructions
(inc REPL in comments): [http://onorioc.wordpress.com/2012/01/26/configuring-
sublime-...](http://onorioc.wordpress.com/2012/01/26/configuring-sublime-
text-2-to-work-with-fsharp/)

ServiceStack runs on .NET and Mono, even our <http://www.servicestack.net>
website (inc. all live demos) have always run on Linux/Nginx + Mono/FastCGI
for years.

We've got a wiki page on how you can run a self-hosted ServiceStack as a Linux
daemon here: [https://github.com/ServiceStack/ServiceStack/wiki/Run-
Servic...](https://github.com/ServiceStack/ServiceStack/wiki/Run-ServiceStack-
as-a-daemon-on-Linux). Also includes instructions on how to configure and run
it behind a Apache + Nginx reverse proxy.

You can also run ServiceStack inside an ASP.NET host which you can host in
Apache (with mod_proxy) or in Nginx (with Mono/FastCGI) - some configuration
on both of these configurations is here:
[https://groups.google.com/forum/#!msg/servicestack/04GQLsQ6Y...](https://groups.google.com/forum/#!msg/servicestack/04GQLsQ6YB4/M4CiESpYJI4J)

If it helps here are the Nginx Mono/FastCgi server conf files for
servicestack.net:
[https://groups.google.com/forum/#!msg/servicestack/kzfS88Rld...](https://groups.google.com/forum/#!msg/servicestack/kzfS88RldIU/Hz7asC4nA78J)

~~~
skrebbel
I've been wondering, is there any firm or organisation backing ServiceStack? I
guess that, maybe more than other ecosystems, many .NET developers are
slightly afraid to heavily depend on something of which the future is
uncertain (in a way, we're spoiled by MS's big spendings on all kinds of fancy
tools). I recognise that in a way, this situation hurts the ecosystem, because
people are afraid of using non-MS-tech, which limits commitment to decent
open-source projects. Nevertheless, I have to admit sharing the same worries.
Should I worry about that wrt ServiceStack?

~~~
mythz
I'm also not sure what is making you think its "future is uncertain"?

It has been around for 4+ years, has been actively developed since inception,
has never taken any funding and is a fairly popular OSS .NET project with a
strong and active community.

In that same time frame we've seen multiple generations of Web Service
Frameworks in .NET (Mostly from Microsoft), where many of which are now
deprecated: .asmx, CSF, WCF, WCF/REST, WSE, WCF DataServices, RIA, MVC
(escaping complexity of earlier options) and now WebApi.

We still think they continue to promote the wrong approach to web/remote
services, as there are more natural benefits of SOA-inspired message-based
designs:
[https://github.com/ServiceStack/ServiceStack/wiki/Advantages...](https://github.com/ServiceStack/ServiceStack/wiki/Advantages-
of-message-based-web-services)

ServiceStack's original IService<T> interface has remained unchanged for all
its lifetime and we believe its solid design insulates it from re-writes and
allows it to evolve naturally to adopt new features. It's simple and flexible
core allows it for any plugin to extend and enhance its core functionality:
[https://github.com/ServiceStack/ServiceStack/wiki/Architectu...](https://github.com/ServiceStack/ServiceStack/wiki/Architecture-
overview)

A number of the plugins we maintain ourselves can be seen at:
<https://github.com/ServiceStack/ServiceStack/wiki/Plugins>

OSS software is itself immortal, even if the commercial company behind it
collapses - the source will always be open. i.e. it can't be killed by
competition, you will always be able to take a fork of an OSS project fix bugs
and enhance it as much as you wish or simply contribute to someone else's
fork.

------
hizanberg
I don't use F# but ServiceStack has been a breath of fresh air for us - much
easier to get going and more productive than WebApi.

Only Found it when reading that StackOverflow uses it:
[http://blog.stackoverflow.com/2012/02/stack-exchange-open-
so...](http://blog.stackoverflow.com/2012/02/stack-exchange-open-source-
projects)

------
cdl
Because WCF is an "anti-pattern promoting, over architected abstraction"

------
waf
This article is kind of old (September 2011), and I notice that the last
stable release of F# was April 12, 2010. Is F# still a maintained project at
Microsoft, or are people moving to something else? I know a lot of the more
functional JVM languages (clojure, scala) also run on the .NET CLR.

~~~
cdl
Check out What's New for Visual F# in Visual Studio 2012

<http://msdn.microsoft.com/en-us/library/hh370982.aspx>

New features include:

Type Providers \- OData (Open Data) Services \- Database Connections such as
SQL \- Database Schema \- Data specified by the Entity Data Model format \-
Web services in the WSDL format.

Query Expressions

Auto-implemented properties

Parameter Help

Enhanced IntelliSense

Create applications that run against the following versions of the .NET
Framework: 2.0, 3.0, 3.5, 4, and 4.5

