

ServiceStack: new REST API for .NET/Mono - mythz
https://github.com/ServiceStack/ServiceStack/wiki/New-Api

======
candl
Can anyone recommend a good setup for Mono? In my tests, mono-fascgi + nginx
has been extremely slow at handling requests. Wanted to give this a spin some
time ago, as well as ASP.NET MVC, but I couldn't get decent performance on
linux.

~~~
mythz
We outline the different ServiceStack + Linux deployment options over at:

[http://stackoverflow.com/questions/12188356/what-is-the-
best...](http://stackoverflow.com/questions/12188356/what-is-the-best-way-to-
run-servicestack-on-linux-mono)

Some instructions on how to run ServiceStack as a self-hosted daemon (or
behind an Nginx reverse proxy):

[https://github.com/ServiceStack/ServiceStack/wiki/Run-
Servic...](https://github.com/ServiceStack/ServiceStack/wiki/Run-ServiceStack-
as-a-daemon-on-Linux)

All of ServiceStack live demos runs on an Ubuntu vServer under
Nginx/MonoFastCGI including the Razor Rockstars live demos:

<http://razor.servicestack.net> \- ASP.NET Hosted live demo powered by Linux /
Nginx / MonoFastCGI

<http://razor-console.servicestack.net> \- Self-Hosted Console App hosted
behind Nginx Reverse Proxy

~~~
mythz
@7Digital also discuss their ServiceStack on Linux deployment strategies using
Nginx / FastCGI Mono + Capistrano which they describe in detail at:

[http://blogs.7digital.com/dev/2012/09/25/atomic-mono-
deploym...](http://blogs.7digital.com/dev/2012/09/25/atomic-mono-deployment-
with-capistrano-and-nginx-under-debian/)

They also discuss their experiences with ServiceStack, and how they've
customized it to their liking:
[http://blogs.7digital.com/dev/2012/09/20/lessons-learnt-
whil...](http://blogs.7digital.com/dev/2012/09/20/lessons-learnt-whilst-using-
servicestack-on-mono-and-debian/)

------
manuscreationis
This looks really cool...

I'd like to add that I've used various parts of the ServiceStack suite of
products before and I've always found them to be very easy to use, and
reliable. Also, the maintainer was always good about responding to bug
requests and following up about them.

Glad to see it's still moving forward.

------
davidarkemp2
Can someone amend this post to include the project name?

------
alexro
If I'm right, the ServiceStack creator is now working for StackOverflow. Do
they somehow use this framework and/or play a role in supporting it?

I think the framework is good as it is, but knowing about big names backing it
would give me more faith going forward.

~~~
mythz
Yes I've been working for StackOverflow for over a year...

We use ServiceStack to handle all of StackOverflow Careers BackOffice web
services. StackOverflow uses ServiceStack's JSON Serializer (.NET's fastest)
for all its JSON serialization needs:
[http://blog.stackoverflow.com/2012/02/stack-exchange-open-
so...](http://blog.stackoverflow.com/2012/02/stack-exchange-open-source-
projects/)

Whilst StackOverflow Careers makes uses the __entire __ServiceStack's
technology suite:

    
    
      - ServiceStack Web Service Framework to handle all BackOffice services
      - ServiceStack's JSON serializer
      - ServiceStack's C# Redis Client
      - ServiceStack OrmLite (along with Linq2Sql + Dapper)
      - Bundler: Our node.exe based - for all compilation and minifiying of less, css, js assets.
      - Built-in MQ support in ServiceStack which lets us re-use existing Web Services in a MQ Host
    

The Redis MQ Support is heavily utilized, where all offline tasks and sync
services go through, you can read more about it at:
[https://github.com/ServiceStack/ServiceStack/wiki/Messaging-...](https://github.com/ServiceStack/ServiceStack/wiki/Messaging-
and-redis)

Whilst I go into a bit more about our technical setup at:
[http://stackoverflow.com/questions/12537521/host-
application...](http://stackoverflow.com/questions/12537521/host-application-
server-in-windows-service-or-iis)

StackExchange is very supportive considering any enhancements I need to do to
make ServiceStack work better for our usage at work is done on Company time,
i.e. The newer Redis MQ Server implementation to support parallel processing
of MQ messages was mostly done at work. As well as any bug fixes, regressions
we run into.

------
icey
I've been using ServiceStack + AngularJS in a project for a couple of months
now, and it's been the bees knees. I'm excited to try out the new API style.

------
Avalaxy
How does this compare to the ASP.NET 4 Web API?

~~~
mythz
They hold different philosophies for building web services (and general
approach to C# development), I go into this in more detail at:

[http://stackoverflow.com/questions/9699083/servicestack-
vs-a...](http://stackoverflow.com/questions/9699083/servicestack-vs-asp-net-
web-api)

~~~
vyrotek
As someone who has been knee deep in WCF for years and now diving into WebAPI
I still don't understand the real differences between ServiceStack and WebAPI.
It seems like this answer was written well before WebAPI was released or fully
baked. Now that it's out is there anything new you can tell us?

So far, I've been able to achieve everything I need using just WebAPI and
Attribute Routing[1]. Is there something fundamentally different you can
demonstrate or describe for us? I did some research on ServiceStack and the
only thing that stuck was that you also had your own serialization libraries
too. (Although I still prefer JSON.Net) I guess what I'm looking for are the
_Can Dos_ and the _Can't Dos_ too. Not just 'we like this approach instead'.

[1] <https://github.com/mccalltd/AttributeRouting>

Edit - Reworded.

~~~
mythz
Check out the: Advantages of message-based web services
[https://github.com/ServiceStack/ServiceStack/wiki/Advantages...](https://github.com/ServiceStack/ServiceStack/wiki/Advantages-
of-message-based-web-services)

Which explains the natural benefits of the design ServiceStack promotes (no
other MS fx promotes this). We strongly believe that message-based services
promote the best practices for remote service development, something we've
benefitted from for years.

ServiceStack is different in that it can support the same service running on
SOAP, MQ endpoints (in addition to JSON, XML, JSV, CSV out-of-the-box) it even
can be re-used as the controller for HTML web pages, see:
<http://razor.servicestack.net>

~~~
vyrotek
Thanks! I'll do some deeper investigation today for sure.

------
DanielBMarkham
Wonder if this would work with F#

~~~
mythz
Sure, some F# + ServiceStack love :)

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

Async, Cached Twitter API Proxy in F# \-
<http://www.servicestack.net/mythz_blog/?p=811>

C# + F# Self Hosting Examples \-
[https://github.com/ServiceStack/ServiceStack/wiki/Self-
hosti...](https://github.com/ServiceStack/ServiceStack/wiki/Self-hosting)

