Stream

Join this community to post or comment

Demis Bellot
owner

Announcements  - 
 
Hi Everyone,

Just wanted to make sure everyone knows of Scott Mackay's series of posts he's doing explaining how their Company uses ServiceStack and their ecosystem of OSS ServiceStack Plugins they're developing (https://github.com/MacLeanElectrical) to help them develop their system using Microservices:

http://www.wwwlicious.com/2016/05/03/servicestack-microservices-1/

It's a nice dive into the world of Microservices and highlights different things to watch out for and evaluates a number of different technologies that help when your system is split into multiple independent Services.

He's first few posts covers benefits of DTOs and Messaging, Event Sourcing, Scaling, Distributed Debugging, Logging, Service discovery, load balancing and Routing with a lot more topics planned for the future.

It's a great read and a good website to bookmark and watch out for as the series progresses!

This is part one of an in-depth series on implementing a microservices architecture using ServiceStack, Consul, EventStore and Redis. Context: the what and the why?
2
Scott Mackay's profile photoFranck Quintana's profile photo
2 comments
 
Thank you for sharing your experience in ServiceStack!
Add a comment...

Demis Bellot
owner

Announcements  - 
 
v4.0.56 Released!

This is another release jam-packed with some killer features, the release notes are unfortunately a bit longer than usual as the new features required more detail to describe what each does and understand how they work.

I'll list the big points below to provide a quick overview, but you can put aside the free time, checkout the v4.0.56 Release Notes: http://tinyurl.com/v4-0-56 for the finer details.

New AutoQuery Data

AutoQuery Data is an alternative implementation of AutoQuery for RDBMS but supports an Open Provider model which can be implemented to query multiple data source backends. The 3 data source
providers available include:

- MemorySource - for querying static or dynamic in-memory .NET collections, some of the included examples show querying a flat-file `.csv` file and a 3rd Party API that can also the throttled with configurable caching.
- ServiceSource - a step higher than MemorySource where you can decorate the response of existing Services with AutoQuery's rich querying capabilities.
- DynamoDbSource - adds rich querying capabilities over an AWS DynamoDB Table making it much more productive than if you had to construct the query manually.

AutoQuery DynamoDB queries are also self-optimizing where it will transparently construct the most optimal query possible by looking at any Hash Id's, Range Keys and Local Indexes populated in the Request to construct the most optimal DynamoDB QueryRequest or Scan Operation behind-the-scenes.

And since AutoQuery Services are just normal ServiceStack Services they get to take advantage of ServiceStack's rich ecosystem around Services so with just the single AutoQuery DynamoDB Request DTO below:

//C#
[Route("/rockstar-albums")]
[CacheResponse(Duration = 60, MaxAge = 30)]
public class QueryRockstarAlbums : QueryData<RockstarAlbum>
{
public int? Id { get; set; }
public int? RockstarId { get; set; }
public string Genre { get; set; }
public int[] IdBetween { get; set; }
}


We've declaratively created a fully-queryable DynamoDB AutoQuery Service that transparently executes the most ideal DynamoDB queries for each request, has it's optimal representation efficiently cached on both Server and clients, whose Typed DTO can be reused as-is on the client to call Services with an end-to-end Typed API using any .NET Service Client, that's also available to external developers in a clean typed API, natively in their preferred language of choice, accessible with just a right-click menu integrated inside VS.NET, Xcode, Android Studio, IntelliJ and Eclipse - serving both PCL Xamarin.iOS/Android as well as native iOS and Android developers by just Adding a ServiceStack Reference to the base URL of a remote ServiceStack Instance - all without needing to write any implementation!

HTTP Caching

HTTP Caching is another big feature we expect to prove extremely valuable which much improves story around HTTP Caching that transparently improves the behavior of existing ToOptimized Cached Responses, provides a typed API to to opt-in to HTTP Client features, introduces a simpler declarative API for enabling both Server and Client Caching of Services and also includes Cache-aware clients that are able to improve the performance and robustness of all existing .NET Service Clients - functionality that's especially valuable to bandwidth-constrained Xamarin.iOS / Xamarin.Android clients offering improved performance and greater resilience.

Cache-aware Service Clients

You can now create cache-aware versions of all .NET Service Clients that respects any caching directives returned by your Server using the `.WithCache()` extension methods, e.g:

//C#
IServiceClient client = new JsonServiceClient(baseUrl).WithCache();

IServiceClient client = new JsonHttpClient(baseUrl).WithCache();


Cache-aware Service Clients can dramatically improve performance by eliminating server requests entirely as well as reducing bandwidth for re-validated requests. They also offer an additional layer of resiliency as re-validated requests that result in Errors will transparently fallback to using pre-existing locally cached responses. For bandwidth-constrained environments like Mobile Apps they can dramatically improve the User Experience and as they're available in all supported PCL client platforms.

@jezzsantos also wrote a comprehensive overview about HTTP Caching in general and described out he developed an alternative caching solution in ServiceStack in his epic Caching Anyone post: http://www.mindkin.co.nz/blog/2016/1/5/caching-anyone

Service Gateway

is another valuable capability that despite being trivial to implement on top of ServiceStack's existing message-based architecture, opens up exciting new possibilities for development of loosely-coupled Modularized Service Architectures.

The Service Gateway is available from `base.Gateway` in both sync:

//C#
public object Any(GetCustomerOrders request)
{
return new GetCustomerOrders {
Customer = Gateway.Send(new GetCustomer { Id = request.Id }),
Orders = Gateway.Send(new QueryOrders { CustomerId = request.Id })
};
}


and async versions:

//C#
public async Task<GetCustomerOrdersResponse> Any(GetCustomerOrders request)
{
return new GetCustomerOrdersResponse {
Customer = await Gateway.SendAsync(new GetCustomer { Id = request.Id }),
Orders = await Gateway.SendAsync(new QueryOrders { CustomerId = request.Id })
};
}


The benefit of the Gateway is that the same above code will continue to function even if you later decided to split out your Customer and Order subsystems out into different Micro Services.

The Service Gateway also allows plugging in a Discovery Service for your Micro Services where you can happily just send Request DTO's to call Services and the Discovery Service will transparently route it to the most available Service.

We're extremely fortunate to have @Mac and @rsafier both jump in with Service Discovery solutions straight out-of-the-gate which you can find more about in their GitHub Project home pages:

- https://github.com/MacLeanElectrical/servicestack-discovery-consul
- https://github.com/rsafier/ServiceStack.Discovery.Redis

Super CSV Support

We've now implemented CSV deserialization support so now all your Services can accept CSV payloads in addition to serializing to .csv. As a tabular data format it's especially useful when your Service accepts Lists of POCO's such as in Auto Batched Requests where it's now the most compact text data format to send them with using either the new `CsvServiceClient` or `.PostCsvToUrl()` HTTP Utils extension method.

A feature that sets ServiceStack's CSV support apart is that it's built on the compact and very fast JSV Format which not only can deserialize a tabular flat file of scalar values at high-speed, it also supports deeply nested object graphs which are encoded in JSV and escaped in a CSV field.

Which opens a number of interesting use-cases as you can now maintain rich code or system data in .csv flat-files to easily query them in AutoQuery Services, making it a great option for structured logging as they're now easily parsable, queryable with AutoQuery Data, analyzed with your favorite Spreadsheet or imported using CSV features or data migration tooling for your preferred RDBMS.

Given these useful properties we've developed a CSV Request Logger that can be registered with:

//C#
Plugins.Add(new RequestLogsFeature {
RequestLogger = new CsvRequestLogger(),
});


To store request and error logs into daily logs to the following overridable locations:

- `requestlogs/{year}-{month}/{year}-{month}-{day}.csv`
- `requestlogs/{year}-{month}/{year}-{month}-{day}-errors.csv`

Error logs are also written out into a separate log file as it can be useful to view them in isolation.

Virtual FileSystem

To efficiently support Appending to existing files as needed by the CsvRequestLogger we've added new `AppendFile` API's and implementations for Memory and FileSystem Virtual File Providers:

//C#
interface IVirtualFiles
{
void AppendFile(string filePath, string textContents);
void AppendFile(string filePath, Stream stream);
}


OrmLite

New `UpdateAdd` API's provides several Typed API's for updating existing values:

//C#
/Increase everyone's Score by 3 points
db.UpdateAdd(new Person { Score = 3 }, fields: x => x.Score);

//Remove 5 points from Jackson Score
db.UpdateAdd(new Person { Score = -5 }, x => x.Score, x =>
where: x.LastName == "Jackson");

//Graduate everyone and increase everyone's Score by 2 points
var q = db.From<Person>().Update(x => new { x.Points, x.Graduated });
db.UpdateAdd(new Person { Points = 2, Graduated = true }, q);


Deprecating Legacy OrmLite API's

We're going to gracefully deprecate OrmLite's legacy API's by first deprecating them in this release to notify which API's are earmarked to move, then in a future release we'll move the extension methods under the `ServiceStack.OrmLite.Legacy` namespace to move them out of OrmLite's default namespace.

The deprecated API's include those ending with `Fmt` which uses C#'s old-style string formatting, e.g:

//C#
var tracks = db.SelectFmt<Track>("Artist = {0} AND Album = {1}",
"Nirvana",
"Nevermind");


Ideally they should be replaced with the parameterized API's below:

//C#
var tracks = db.Select<Track>(x => x.Artist == "Nirvana" && x.Album == "Nevermind");

var tracks = db.Select<Track>("Artist = @artist AND Album = @album",
new { artist = "Nirvana", album = "Nevermind" });

var tracks = db.SqlList<Track>(
"SELECT * FROM Track WHERE Artist = @artist AND Album = @album",
new { artist = "Nirvana", album = "Nevermind" });


The other API's that have been deprecated are those that inject an `SqlExpression<T>` e.g:

//C#
var tracks = db.Select<Track>(q =>
q.Where(x => x.Artist == "Nirvana" && x.Album == "Nevermind"));


Which should be changed to passing in the `SqlExpression<T>` by calling `db.From<T>`, e.g:

//C#
var tracks = db.Select(db.From<Track>()
.Where(x => x.Artist == "Nirvana" && x.Album == "Nevermind"));


PocoDynamo

ServiceStack's POCO-friendly DynamoDB client has added support for DynamoDB's UpdateItem which lets you modify existing attributes. The easiest API to use is to pass in a partially populated POCO with containing any non-default values you want updated:

//C#
db.UpdateItemNonDefaults(new Customer { Id = customer.Id, Age = 42 });


There's also a more flexible API to support each of DynamoDB UpdateItem operations, e.g:

//C#
db.UpdateItem(customer.Id,
put: () => new Customer {
Nationality = "Australian"
},
add: () => new Customer {
Age = -1
},
delete: x => new { x.Name, x.Orders });


ServiceStack.Redis

Additional resiliency was added in ServiceStack.Redis which can now handle re-connections for broken TCP connections happening in the middle of processing a Redis Operation.

New API's were added to remove multiple values from a Sorted Set:

//C#
interface IRedisClient {
long RemoveItemsFromSortedSet(string setId, List<string> values);
}

interface IRedisNativeClient {
long ZRem(string setId, byte[][] values);
}


ServiceStack IDEA

The ServiceStack IDEA Android Studio plugin was updated to support Android Studio 2.0.

Community

There were a number of community plugins published in this release, check out their GitHub projects for
more info:

- [ServiceStack.Discovery.Redis](https://github.com/MacLeanElectrical/servicestack-eventstore)
- [ServiceStack.SimpleCloudControl](https://github.com/rsafier/ServiceStack.SimpleCloudControl)
- [ServiceStack.Funq.Quartz](https://github.com/CodeRevver/ServiceStackWithQuartz)
- [ServiceStack.Discovery.Consul](https://github.com/MacLeanElectrical/servicestack-discovery-consul)
- [ServiceStack.Discovery.Redis](https://github.com/rsafier/ServiceStack.Discovery.Redis)

Other Features

- Changed ServiceStack.Interfaces to Profile 328 adding support Windows Phone 8.1
- New `IHasStatusDescription` can be added on Exceptions to customize their StatusDescription
- New `IHasErrorCode` can be used to customize the ErrorCode used, instead of its Exception Type
- New `AppHost.OnLogError` can be used to override and suppress service error logging


3
2
Rob Schoenaker's profile photoDemis Bellot's profile photoDarren Reid's profile photo
3 comments
 
Done.
Add a comment...

Brandon G

Discussion  - 
 
I am wanting to use the T4 template against an ERP database. However it has 1000's of tables that I don't at this time want POCO's for and would like to exclude. Is there any way to denote which tables you want, rather than mark all the tables to ignore?
1
Brandon G's profile photoPeter Bromberg (Wrong is Right)'s profile photo
3 comments
 
you can also pass parameters to a T4 template
Add a comment...

Demis Bellot
owner

Announcements  - 
 
Hey All, buried at the end of the last release notes is a notice that we intend on discontinuing providing .NET 4.0 builds for releases after August 1st now that Microsoft has ended support for .NET 4, 4.5 and 4.5.1 on January 12th: https://blogs.msdn.microsoft.com/dotnet/2015/12/09/support-ending-for-the-net-framework-4-4-5-and-4-5-1/

We hope that all your ServiceStack projects are already on .NET 4.5 or if not, have already planned to convert to .NET 4.5 now that MS has stopped supporting .NET 4.0. If you absolutely need .NET 4.0 builds beyond this date please leave feedback of your use-case requiring .NET 4.0 and expected time lines at:

https://servicestack.uservoice.com/forums/176786-feature-requests/suggestions/12528912-continue-supporting-net-4-0-projects

.NET 4.0 will continue to be available for releases before August 1st but will no longer be providing any .NET 4.0 builds for any new releases after. We'll create v4 branches in all our repos just before we upgrade projects to .NET 4.5 so you can add fixes or create custom .NET 4.0 builds if needed, but we wont be maintaining the legacy v4 branches after August 1.

1
1
Jose Delgado's profile photo
Add a comment...
 
I would like to know , if possible, about  any plans to support  Net.Core and Asp.Net core  and OWIN compatibility  for self-hosted services. 
thank you.
5
Demis Bellot's profile photo
 
You can vote for the feature request to get notified on any updates: http://servicestack.uservoice.com/forums/176786-feature-requests/suggestions/10286952-support-dnx

There's no change, we'll look at supporting DNX after it's been officially released.
Add a comment...

David Rothmann

Discussion  - 
 
Hi,

we are using a old version of ServiceStack 3.9.71 in a very big project. We are looking to upgrade to the latest version with a license subscription for a few devs. 

First a few questions:

Is it worth the upgrade? Where are the big differences?

What would be the best way to upgrade? To do it in one steps should be impossible! We thought about a solutions to use both versions in parallel, but maybe there is an easier solution. Are there people with the same problem?

Regards,
David
1
Franck Quintana's profile photoDavid Rothmann's profile photo
3 comments
 
Hi Demis,

thank you for your great and detailed answer! I have started a big project and paused the ServiceStack migration for now. I will answer again when I have more time. Sorry! But just want to let you know, we will check every hint you mentioned.

Thank you,
David

Add a comment...

Shlomo Shs

Discussion  - 
 
Hi All,

Can anyone point to a post/documentation developing micro service with Servicestack?
1
Add a comment...

Matt Cowan

Discussion  - 
 
Quick trick, on a couple projects where I use ServiceStack; I use a Mac along with a couple other javascript developers for my SPA development in Webstorm for a client, and I jump to Windows for the server-side API development with ServiceStack

It's a simple setup with express.js and node-http-proxy to proxy the api calls.

For those that haven't done this before, I did a quick and dirty test on the AngularJS template shipped with the VS ServiceStack extensions.

Here's the gist: https://gist.github.com/mattjcowan/bd7a0bd66951c894a745

Basically, after you create a new app with the AngularJS template:
- Copy the server.js file from the gist and change the URL to your ServiceStack api
- Copy default.cshtml to index.html (it's a SPA, there is no Razor in the template from what I saw)
- Npm install express, nodemon and http-proxy (gets added to your package.json)
- Run: node server.js and open a browser to localhost:3000

Really easy way to develop APIs, and SPAs and it works nicely with basic auth, and Server Sent Events (enable CORS in ServiceStack) ... Nice way also to build your web client and test it against multiple versions of your API (dev, staging, prod) with one line in the server.js. Maybe of interest to someone.

7
1
Diego Terzano's profile photo
Add a comment...

Demis Bellot
owner

Announcements  - 
 
v4.0.48 Released!

https://servicestack.net/release-notes

We have another exciting release for anyone already on or are looking to use AWS in future.

ServiceStack.Aws
All of ServiceStack's support for AWS is encapsulated within the single ServiceStack.Aws NuGet package 
which references the latest AWSSDK v3.1x dependencies for .NET 4.5+ projects, containing:

 - PocoDynamo - Exciting new declarative, code-first POCO client for DynamoDB with LINQ support
 - SqsMqServer - A new MQ Server for invoking ServiceStack Services via Amazon SQS MQ Service
 - S3VirtualPathProvider - A read/write Virtual FileSystem around Amazon's S3 Simple Storage Service
 - DynamoDbAuthRepository - A new UserAuth repository storing UserAuth info in DynamoDB
 - DynamoDbAppSettings - An AppSettings provider storing App configuration in DynamoDB
 - DynamoDbCacheClient - A new Caching Provider for DynamoDB

PocoDynamo - https://github.com/ServiceStack/PocoDynamo
is a highly productive, feature-rich, typed .NET client which extends ServiceStack's Simple code-first POCO approach 
and re-use of your code-first data models with Amazon's industrial strength and highly-scalable NoSQL DynamoDB.

There's comprehensive docs available on the project site: https://github.com/ServiceStack/PocoDynamo

AWS Apps - http://awsapps.servicestack.net/
To demonstrate the ease of which you can build AWS-powered solutions with ServiceStack we've rewritten 
6 of our existing Live Demos to use a pure AWS managed backend using:

 - Amazon DynamoDB for data persistance
 - Amazon S3 for file storage
 - Amazon SQS for background processing of MQ requests
 - Amazon SES for sending emails
 
AWS Razor Rockstars
An interesting feature with AWS RazorRockstars is that all the content for the App is not contained 
within project as all its Razor Views, Markdown Content, imgs, js, css, etc. are instead being 
served directly from an S3 Bucket :)

Live Reload Demo

One nice feature of having all content maintained in an S3 Bucket is that you can just change 
files in the S3 Bucket directly and have all App Servers immediately reload the Razor Views, 
Markdown content and static resources without redeploying.

You can test live reloading of the above Service with the routes below which modify Markdown 
and Razor views with the current time:

 - /updateS3 - Update Markdown Content
 - /updateS3?razor=true - Update Razor View
 - /updateS3?razor=true&clear=true - Revert changes
 
AWS Imgur and AWS REST Files
are good examples showcasing how you can easily change which file storage backend uploaded files get 
saved to by overriding the new VirtualFiles property with your preferred file storage provider:

var s3Client = new AmazonS3Client(AwsConfig.AwsAccessKey, AwsConfig.AwsSecretKey, RegionEndpoint.USEast1);
VirtualFiles = new S3VirtualPathProvider(s3Client, AwsConfig.S3BucketName, this);

If we comment out the above configuration any saved files are instead written to the local FileSystem (default).

AWS Email Contacts
The AWS Email Contacts example shows the same long-running EmailContact Service being executed 
from both HTTP and MQ Server by just changing which url the HTML Form is posted to.

AWS Auth
AWS Auth is an example showing how easy it is to enable multiple Auth Providers within the same App and
have all User Auth info stored in DynamoDB using the new DynamoDbAuthRepository.

AWS Todos
is a good illustration of the clean and minimal code it takes to build a simple CRUD Service using the new PocoDynamo client:

public class TodoService : Service
{
    public IPocoDynamo Dynamo { get; set; }

    public object Get(Todo todo)
    {
        if (todo.Id != default(long))
            return Dynamo.GetItem<Todo>(todo.Id);

        return Dynamo.GetAll<Todo>();
    }

    public Todo Post(Todo todo)
    {
        Dynamo.PutItem(todo);
        return todo;
    }

    public Todo Put(Todo todo)
    {
        return Post(todo);
    }

    public void Delete(Todo todo)
    {
        Dynamo.DeleteItem<Todo>(todo.Id);
    }
}

AWS Getting started with Guides - https://github.com/ServiceStackApps/AwsApps
We've provided a number of guides to walk through setting up AWS services starting from your AWS account 
and connect to them with ServiceStack libs.

Mastering ServiceStack
Andreas Niedermair's (https://twitter.com/dittodhole) new book on Mastering ServiceStack is now available, check it out!
https://www.packtpub.com/application-development/mastering-servicestack

TypeScript
We've extended our existing TypeScript support for generating interface definitions for your DTO's 
with the new `ExportAsTypes=true` option for generating non-ambient concrete TypeScript Types. 

All urls returned in the default HTML5 pages are now auto-hyperlinked which we can preview in the new 
`/types` route which returns links to the different languages Add ServiceStack Reference supports:
http://techstacks.io/types

New License Key Registration option
To simplify license key registration when developing and maintaining multiple ServiceStack solutions 
we've added a new option where you can now just register your License Key once in 
`SERVICESTACK_LICENSE` Environment Variable. 

Virtual File System
There's a new read/write Virtual FileSystem interface with local FileSystem, In Memory and S3 file storage providers.

HttpResult
You can customize JSON serialization for adhoc services with the new ResultScope:

return new HttpResult(dto) {
    ResultScope = () => JsConfig.With(includeNullValues:true)
};

Which enables custom serialization behavior by performing the serialization within the custom scope, equivalent to:

using (JsConfig.With(includeNullValues:true))
{
    var customSerializedResponse = Serialize(dto);
}

 - New cookies can be added to HttpResult’s new IHttpResult.Cookies collection
 - New constructor for returning VirtualFile downloads: new HttpResult(VirtualFiles.GetFile(targetPath), asAttachment: true);
 
AutoQuery
new `%!` and `%NotEqualTo` implicit query convention available on all Auto queries:

 - /rockstars?age!=27
 - /rockstars?AgeNotEqualTo=27
 
Improved support for Xamarin.Mac
The ServiceStack.Client PCL provider for Xamarin.Mac now has an explicit reference Xamarin.Mac.dll 
which allows it to work in projects with the Link SDK Assemblies Only.

Redis
 - Behavior of `Redis.StoreAsHash` can be modified with `RedisClient.ConvertToHashFn`
 - RedisReact Browser updates https://github.com/ServiceStackApps/RedisReact#update---27-october-2015
 
OrmLite
New System Variables allow declaring column with the default value of RDBMS UTC Time:

public class Poco
{
    [Default(OrmLiteVariables.SystemUtc)]  //= {SYSTEM_UTC}
    public DateTime CreatedTimeUtc { get; set; }
}

Preview of a new parameterized SqlExpression provider that's now available for SQL Server and Oracle, opt-in with:

OrmLiteConfig.UseParameterizeSqlExpressions = true;

Johann Klemmack added support for selectively specifying which references you want to load, e.g:

var customerWithAddress = db.LoadSingleById<Customer>(customer.Id, include: new[] { "PrimaryAddress" });

//Alternative
var customerWithAddress = db.LoadSingleById<Customer>(customer.Id, include: x => new { x.PrimaryAddress });

OrmLite's T4 templates for generating POCO types from an existing database schema has improved 
support for generating stored procedures thanks to Richard Safier.

ServiceStack.Text
new ConvertTo<T> on JsonObject helps dynamically parsing JSON into typed POCO.

Minor Features
 - Server Events /event-subscribers route now returns all channel subscribers
 - PATCH method is allowed in CORS Feature by default
 - Swagger Summary for all servies under a particular route can be specified in SwaggerFeature.RouteSummary Dictionary
 - New requested FacebookAuthProvider.Fields can be customized with oauth.facebook.Fields
 - Added Swift support for TreatTypesAsStrings for returning specific .NET Types as Strings
 - New IAppSettings.GetAll() added on all AppSetting sources fetches all App config in a single call
 - ServiceStackVS updated with ATS exception for React Desktop OSX Apps
 - External NuGet packages updated to their latest stable version

Apologies for the long TL;DR - please see the https://servicestack.net/release-notes for an even longer version :)

Enjoy!
8
2
Darren Reid's profile photoSergej Loch's profile photo
Add a comment...

Demis Bellot
owner

Discussion  - 
 
I've published my first YouTube Video! Showing how you can use the new React Desktop Apps and ServiceStack Server Events to control multiple native Window Applications:

https://youtu.be/-9kVqdPbqOM

I'd normally use animated gifs for this which is embeddable in the page but none of them came out so I went with a screen capture instead. Hopefully it illustrates the potential for ServiceStack's new React Desktop Apps!
3
1
Demis Bellot's profile photoHenrik Elkjær Hagen's profile photoDarren Reid's profile photo
5 comments
 
I guess if you take a screenshot of the video playing and showing the youtube controls, people might be more inclined to click it. If you take the screenshot right after you click play on the video, you even get the play arrow in the middle of the image.  Ok, time for me to actually watch this thing :)
Add a comment...

About this community

ServiceStack is a services framework providing a simpler alternative to WCF, MVC and WebApi, with Web, REST, SOAP and MQ services for .NET. This group lets you get in touch with the wider ServiceStack community and share relevant news, announcements and discussion. To keep things relevant to members, and for this group to retain a high quality ratio of meaningful and interesting content - please keep all support questions on StackOverflow or inside Customer Forums. Customer support options are available at: https://servicestack.net/account/support

Demis Bellot
owner

Announcements  - 
 
ServiceStack VS Templates Update

We've just published an update to ServiceStackVS VS .NET Templates - the update release notes are available at: https://github.com/ServiceStack/ServiceStack/blob/master/docs/2016/servicestackvs/v1.0.22.md

React Desktop Apps received a major update with much faster Startup times on Windows that now features autoupdating support built-in courtesy of Squirrel Windows integration! The OSX App can now also be built using Xamarin's free Community Edition :)

We're now all-in with React and TypeScript with both our VS.NET SPA React Templates modernized with TypeScript + JSPM stack. If you're new to both, please checkout the comprehensive TypeScript + Redux walk through to get started quickly: https://github.com/ServiceStackApps/typescript-redux
2
1
Steven Song's profile photoDemis Bellot's profile photoDarren Reid's profile photo
2 comments
 
+Steven Song we're very aware of this and are keenly waiting for Angular2 to get out of beta
Add a comment...

Shlomo Shs

Discussion  - 
 
Anyone used servicestack redis client for service discovery?
Is servicestack redis support it?
1
Shlomo Shs's profile photoDemis Bellot's profile photo
3 comments
 
It's trivial to configure with ServiceStack.Redis, just initialize it with a sentinel host. Docs are here: https://github.com/ServiceStack/ServiceStack.Redis#redis-sentinel

Whilst the redis-config project shows an example inc multiple redis config instances: https://github.com/ServiceStack/redis-config
Add a comment...

Shlomo Shs

Discussion  - 
 
Where I can find docs of migrating servicstack.net 3 to 4?
Since even  client 4 version not working with servicestack 3 api version because of dependency on interfaces.
1
Demis Bellot's profile photo
 
v4 is a major upgrade from v3, the best source of info is the first release notes which details many of the changes: https://github.com/ServiceStack/ServiceStack/blob/master/docs/2014/release-notes.md#upgrading-from-v3

All the release notes since then include all the features/changes that are now in v4.
Add a comment...

Demis Bellot
owner

Announcements  - 
 
v4.0.54 released!
http://servicestack.net/release-notes

v4.0.54 is another jam-packed release with a lot of features across the board, the release notes is longer than normal which I'll do my best to summarize:

AutoQuery Viewer

An exciting new plugin available from the ServiceStack.Admin NuGet package which provides an instant automatic UI for all your AutoQuery services. As it's super quick to add we've enabled it on a number of existing live demos which you can try out:

- http://github.servicestack.net/ss_admin/
- http://northwind.servicestack.net/ss_admin/
- http://stackapis.servicestack.net/ss_admin/
- http://techstacks.io/ss_admin/

It also ships with a number of productive features out-of-the-box:

- Marking up Services - Use `[AutoQueryViewer]` attribute to mark up look and default behavior of Services
- Filter Services - If you have a lot of Services, this will help quickly find the service you want
- Authorized Only Services - Users only see the AQ Services they're authorized to, which lets you customize the UI for what each user sees
- Multiple Conditions - The UI makes it easy to create complex queries with multiple conditions
- Updated in Real-Time - AQ Services are refreshed and App State is saved as-you-type
- Change Content Type - The short-cut links can be used to access results in your desired format
- Customize Columns - Customize results to only return the columns you're interested in
- Sorting and Paging - Results can be sorted by any column and paged with nav links

A quick showcase of some of these features are available on YouTube: https://youtu.be/YejYkCvKsuQ

AutoQuery Enhancements

A number of new Enhancements were also added to AutoQuery Services:

- Parameterized AutoQuery - AQ Services are now parameterized with Convention Templates converted to use db params
- Customizable Fields - You can now customize which fields you want returned using new Fields property
- Named Connection - As part of our new Multitenancy features AQ Services can be easily configured to run on multiple db's
- T4 Templates - OrmLite's T4 templates now have options for generating AutoQuery Services and named connections

Server Events

We've added a couple of demos showing how easy it is to create rich, interactive mobile and web apps with Server Events:

Xamarin.Android Chat

The new Xamarin.Android demo shows how to use the .NET PCL typed Server Events Client to connect to an existing chat.servicestack.net back-end and communicate with existing Ajax web clients. It also shows how to use Xamarin.Auth to authenticate with ServiceStack using Twitter and OAuth.

A quick demo is available from: https://www.youtube.com/watch?v=tImAm2LURu0

Networked Time Traveller Shape Creator

We've given the existing Time Traveller Shape Creator networking capabilities which now let you "Remote Desktop" into and watch other users view the app. This was surprisingly simple to do with Redux, just 1 React Component and 2x 1-line ServiceStack ServerEvent Services.

Live demo at: http://redux.servicestack.net

Update Channels on Live Subscriptions

You can now update the channels your active SSE subscription is connected to without re-connecting. This is enabled everywhere, in Memory + Redis SSE backends as well as typed API's for .NET and Ajax clients.

TypeScript React App (beta)

The new TypeScript + React VS.NET Tempalte captures what we believe is the best combination of technologies for developing rich JavaScript apps: TypeScript 1.8, React, JSPM, typings + Gulp - combined together within a single integrated, pre-configured VS.NET template. This tech suite represents our choice stack for developing rich Single Page Apps which we've used to build AutoQuery Viewer and Networked Shape Creator and currently our number #1 choice for new SPA Apps.

TypeScript Redux

To help developers familiarize themselves with these technologies we've also published an in-depth step-by-step guide for beginners that starts off building the simplest HelloWorld TypeScript React App from scratch then slowly growing with each example explaining how TypeScript, React and Redux can be used to easily create the more complex networked Time Travelling Shape Creator, available at: https://github.com/ServiceStackApps/typescript-redux

ss-utils

To make it easier to use ss-utils in JavaScript projects, we're maintaining copies of ss-utils in npm, JSPM and Definitely Typed registries. We've also added a few new common utils:

- $.ss.combinePaths
- $.ss.createPath
- $.ss.createUrl
- $.ss.normalizeKey
- $.ss.normalize
- $.ss.postJSON

Customize JSON Responses on-the-fly

The JSON/JSV responses for all your services can now be customized on-the-fly by your Service consumers so they're able to access your JSON responses in their preferred configuration using the `?jsconfig` modifier, e.g:

/service?jsconfig=EmitLowercaseUnderscoreNames,ExcludeDefaultValues

It also supports the much shorter Camel Humps notation:

/service?jsconfig=elun,edv

Most JsConfig config options are supported.

Improved support for Multitenancy

There are a number of new features and flexibile options available to make Multitenancy easier to support where you can easily change which DB is used at runtime based on an incoming request with a request filter.

We've added a number of examples in the release notes to show how this works.

ServiceClient URL Resolvers

You can use the new `TypedUrlResolver` and `UrlResolver` delegates available on every .NET Service Client to change which url each request is made with.

ServiceStack.Discovery.Consul

This feature makes it easy to enable high-level discovery and health/failover features as seen in the new ServiceStack.Discovery.Consul Community project which maintains an active list of available load-balanced ServiceStack Services as well as auto-registering the Services each instance supports taking care of managing the different endpoints for each Service where all Typed requests can be made with a single Service Client and Consul takes care of routing to the appropriate active endpoint.

Multiple File Uploads

The new PostFilesWithRequest API's on every ServiceClient for sending mutliple file uploads with a single Request.

Local MemoryCacheClient

The new `LocalCache` property gives your Services access to a Local Memory Cache in addition to your registered ICacheClient

OrmLite

- New `[EnumAsInt]` attribute can be used as an alternative to `[Flags]` for storing enums as ints in OrmLites but serialized as strings
- Free-text SQL Expressions are now converted to Parameterized Statements
- New SelectFields API provides an smart API to reference and return custom fields
- All `db.Exists()` API's have been optimized to return only a single scalar value
- Max String column definition on MySql now uses LONGTEXT

ServiceStack.Text

- New `JsConfig.SkipDateTimeConversion` to skip built-in Conversion of DateTime's.
- New `ISO8601DateOnly` and `ISO8601DateTime` DateHandler formats to emit only the Date or Date and Time

Stripe Gateway

Support added to support Stripe's unconventional object notation for complex Requests. This feature is used
in the new `CreateStripeAccount` API.

Minor ServiceStack Features

- Old Session removed and invalided when generating new session ids for a new AuthRequest
- New ResourcesResponseFilter, ApiDeclarationFilter and OperationFilter added to SwaggerFeature to modify response
- `Name` property added to `IHttpFiles` in Response.Files collection
- `HostType`, `RootDirectoryPath`, `RequestAttributes`, `Ipv4Addresses` and `Ipv6Addresses` added to [?debug=requestinfo](https://github.com/ServiceStack/ServiceStack/wiki/Debugging#request-info)
- `StaticFileHandler` now has `IVirtualFile` and `IVirtualDirectory` constructor overloads
- New `StaticContentHandler` for returning custom text or binary responses in `RawHttpHandlers`

WARNING .NET 4.0 builds will cease after August 1, 2016

We want to warn everyone that we will be upgrading all packages to .NET 4.5 and stop providing .NET 4.0 builds after August 1, 2016 now that Microsoft no longer supports them. If you absolutely need supported .NET 4.0 builds after this date please leave a comment on:
https://servicestack.uservoice.com/forums/176786-feature-requests/suggestions/12528912-continue-supporting-net-4-0-projects

And that's a wrap, apologies for the length of the TL;DR despite my best efforts to condense. For even more details on each feature please see the release notes: https://servicestack.net/release-notes

Enjoy!

12
2
Darren Reid's profile photoAlexander Beck's profile photo
Add a comment...

Pavan Kumar

Discussion  - 
 
Hi,
Does ServiceStack client for Redis support Sliding Expiration of keys?
1
Demis Bellot's profile photo
 
That's not a redis client feature, that's an application level feature where you'd need to reset the key expiration either by storing the key using `SetValue()` with an expiration or modifying the expiration of an existing key with ExpireEntryIn/ExpireEntryAt
Add a comment...

Eugene Safonov

Discussion  - 
 
Hi,

is it possible to use different dialect providers (MSSql, MySql etc.) at the same time in multi-threading app? Thanks!
1
Eugene Safonov's profile photo
5 comments
 
It's not working properly in v3 - sometimes I got sql statements with incorrect dialect. v4 - ok.
Add a comment...
 
Hi,

Is there any plan to support the new Redis Cluster specification that was added in Redis 3.0? We are moving part of our infrastructure to the new version and it would be great if we could continue to use ServiceStack.
1
Demis Bellot's profile photoChen Huoming's profile photo
4 comments
 
 +Demis Bellot  hi . i create a redis cluster(windows). how to use servicestack call the redis cluster. could you give me a sample ? Thanks
Add a comment...

Matt Cowan

Discussion  - 
 
Another quick trick, if you miss T4 templating when you're in the world of iOS and xcode, or Android Studio/Eclipse for Java/Android development, or WebStorm/VSCode (etc...), I've started to use gulp and it works great with the nunjucks templating framework for code-generating files ...

Here's a gist on how to do some code generation against the /types/metadata.json endpoint from ServiceStack to do some code generation of client-side code (i.e.: if you want to use a different serializer than Gson on Android for example and code-generate your own DTOs, to code-generate some SqLite ORM classes, and in my case a variety of client-side mobile APIs for different scenarios like pulling from cache, pull-to-refresh, etc ...). ServiceStack provides so much 'metadata' and makes it so easy to customize APIs for this purpose I'm finding that if I use all the annotations available, it's soo invaluable to use in a code-generation scenario and be creative, imo. Heck, why not just code-generate your entire application :-)

You can also setup a watcher then, so as you modify your templates, it automatically keeps your app code updated (gulp or nunjucks watch) ...

Anyway, maybe it'll be helpful to someone ...
A gulpfile with a 'codegen' task (from command line: gulp codegen) that you can use to code-generate files (in my case Android java files) against a ServiceStack /types/metadata.json endpoint ...
2
Matt Cowan's profile photo
3 comments
 
Side-comment on boilerplate code, there are some useful AOP types of libs in Java (compile time only) like https://projectlombok.org which let you do things like
@Getter @Setter(AccessLevel.PROTECTED) private String name;
Still gives you all the intellisense as usual in the IDEs, etc... Lombok has lots of other interesting annotations for thread locking, lazy properties, and more ... Not so much an IL weaver. Would be cool to see some stuff like this with Roslyn.
Add a comment...

Demis Bellot
owner

Announcements  - 
 
Hi all,

When you've got free time for some light reading, I've just added a detailed answer that I hope is useful in highlighting the simplicity focus and goals of ServiceStack, the friction-less development and re-use potential of using code-first POCOs, the goals of Service design as well as the important role of DTOs and the benefits they provide at: http://stackoverflow.com/a/32940275/85785
"Code-first POCO's Since it promotes clean, re-usable code, ServiceStack has always encouraged the use of code-first POCO's for just about everything. i.e. the same POCO can be used: In Request and
13
2
Shlomo Shs's profile photoDemis Bellot's profile photoD na's profile photoSteve Ellwood's profile photo
2 comments
 
Just expose and convert it to the DTO you want clients to have access. What internal models your Services use should be a transparent implementation detail.

The answer includes how youcan use AutoMapping to convert to a subset DTO:

var dto = dbPoco.ConvertTo<Poco>();

You can also select a subset of the fields in OrmLite from a POCO Data Model in OrmLite:

db.Select<Dto>(db.From<DbPoco>())

Likewise returning customized results in AutoQuery:

https://github.com/ServiceStack/ServiceStack/wiki/Auto-Query#returning-custom-results
Add a comment...

Demis Bellot
owner

Announcements  - 
 
v4.0.46 Released!

We have an exciting new ServiceStackVS VS.NET template this release which will add a lot of value and new possibilities for React Web Developers.

As always see the Release Notes for the full details: https://servicestack.net/release-notes

Redis Desktop Apps
React Desktop Apps is a new VS.NET Template which includes all the necessary tools to convert your React ASP.NET Web Application and package it into a native Winforms App, OSX Cocoa App or cross-platform Windows/OSX/Linux Console App which is in addition to the niceties provided by the existing React App template that includes the automated tasks to optimize, compile, bundle, package and deploy.

Since React is my weapon of choice these days this has become my new favorite template thanks to the added potential available, even if I don't end up packaging it in a Desktop App since it still provides everything I need to optimize and deploy my ASP.NET Web Apps.

React Chat Apps
We've also developed a couple of Apps ourselves to illustrate the potential.  React Chat Apps example wraps Chat into a native Desktop App and show cases how easy it is to communicate between C# <-> JavaScript where you can move around and change a Windows App by msging it from a chat box :)

Redis React
Redis React is more demonstrative of the types of Apps that's now possible from a React Desktop App which otherwise wouldn't be possible when running in a browser. Redis React should also be very useful for all ServiceStack.Redis developers which provides a simple, fast and human-friendly browser of your Redis Data which takes advantage of the conventions in the Redis Client to automatically show and navigate to related data.

Swift 2.0 / Xcode 7
Support for Apple's just released Swift 2.0 and Xcode 7 has just landed for all native iOS / OSX developers. The improvements in Swift 2.0 has had a positive impact to the Service Client which has a nicer and more familiar API with a lot less generated boilerplate required.

Java Client Improvements
A number of new features were also added to the Java Client bringing it closer to feature parity of .NET Service Clients.

HTTP Interface Markers
Request DTO's annotated with IGet, IPost, interfaces can now all use the same `send()` API which uses the info to send the Request DTO via the selected HTTP Method. This makes it easier to add high-level functionality since it can decouple the Request DTO to a specific Service Client implementation.

Async Stripe API's
Async API's are now available to all Stripe REST Services. Thanks to the StripeGateway's message-based design, this was extremely easy to add which took less than 1hr from initial feature request to deployment on MyGet pre-release packages. As it provides an abstraction for a non .NET 3rd Party API it's a good example to illustrate the advantages of a message-based API for remote services which provides a number of advantages over other much larger and more complex libraries using conventional RPC API's for each Stripe Service.

Debuggable Razor Views
There's now an option to allow debugging in Razor Views which is enabled by default in DEBUG builds.

ss-utils.js
A few new JavaScript utils were added which makes it easy to take advantage of the auto binding/validation  of FORM's outside of jQuery, e.g. in React

Enhanced Redis LUA Support
There are new API's which make it easier to execute LUA scripts on Redis Server, e.g. the high-level  ExecCachedLua() API's eliminates the bookkeeping around pre-loading, executing and re-creating missing LUA scripts which provides the best performance / bandwidth without the disadvantages of managing  server-side state in Redis. 

That's the summary of the major features, please see the Release Notes for the full details: 

https://servicestack.net/release-notes

Enjoy!
3
2
Darren Reid's profile photoMatt Cowan's profile photo
Add a comment...