How Should Microservice’s Communicate?

The Shade Tree Developer

We do quite a bit of distributed development and inter-service messaging at work. Some of this is done through exposing HTTP services. For asynchronous messaging between systems, my shop uses FubuMVC and its .Net Core replacement “Jasper” as a service bus (translate “Jasper” to “MassTransit” or “NServiceBus” when you read this). This blog post is a draft of our architectural team’s advice to our teams on choosing which option to use for their projects as part of our nascent microservice architecture approach. If any of my colleagues see this and disagree with me, don’t worry because one way or another this is going to be a living document and you’ll get to have input to this.

Microservices will generally need to send or process messages from other microservices or clients. To that end, it’s worth considering your options for inter-service communication.

We commonly use either HTTP services or the Jasper/FubuMVC…

View original post 722 more words

Advertisements

Authentication in .Net Core 2.0 : .Net Core 2.0 Identity step by step

Neel Bhatt

idn20Note – You can find the source code of my sample application here.

Whenever you start creating an application, one of the most important modules is the authentication.

In this article, I will explain how to add Login functionality to your .Net Core 2.0 application using .Net Core Identity,

Let us first see what is ASP .Net Core Identity?

ASP.NET Core Identity is a membership system which allows you to add login functionality to your application. Users can create an account and login with a user name and password or they can use an external login provider such as Facebook, Google, Microsoft Account, Twitter or others.

Let us create .Net Core 2.0 application with Core Identity step by step

First open Visual Studio 2017 -> Create New Project -> Select Core Web application

idn1

In next window, click on Change authentication link and select Individual User Accounts. By this, we…

View original post 821 more words

Introduction to Asp.net Core 1.0

The Diligent Geek

I had a privilege to be invited by Agile Testing Alliance , Vadodara chapter to talk about Asp.net Core 1.0 . It was very interactive sessions and the participants asked some really good questions.

Here is the synopsis of my talk

What is Asp.net Core ?

It is a lean stack from Microsoft to develop the modern web apps built from ground up and is most revolutionary version since asp.net first was released in 2002
Today it is available RC1 update 1 which comes with golive license so this means that this framework is production ready.

Cross platform

This is a game changer and USP about this framework.  It works seamlessly on Windows, OSX and Linux. The same code base runs directly on the metal, and remember this is different from the Mono Framework. In fact the CoreClr is around 11 meg and is shipped along with your application as…

View original post 540 more words

ASP.NET Core MVC API documentation using Swashbuckle Swagger

Software Engineering

This article shows how to document your ASP.NET Core 1.0 MVC API using Swagger with Swashbuckle. Per default, it does not use your xml comments in the code and this needs to be configured if required.

Code: https://github.com/damienbod/AspNet5GeoElasticsearch

2017.02.12 Updated to VS2017, msbuild and Swashbuckle.AspNetCore
2016.07.03 Updated to ASP.NET Core RTM
2016.06.04 Updated to ASP.NET Core RC2 dotnet

Step 1: Add the required NuGet packages to the dependencies in the project csproj file.

Step 2: Produce the .xml file which contains the xml comments when building. Click the produce outputs on build checkbox in your project file.

SwaggerProjectConfig

Or set the ProduceOutputsOnBuild property in the project csproj file.

Step 3: Configure Swashbuckle.SwaggerGen in the Startup class ConfigureServices method.

You need to define your path to the comments xml file, which can be found in the artifacts folder. This should be saved in a config file.

The ConfigureSwaggerDocument with OperationFilter method is…

View original post 51 more words

Connecting to the Azure IoT Hub using an AMQP stack

DEVEXPERIENCE

Accessing to the Azure IoT Hub service is so simple using all the available SDKs that Microsoft provides as open source on GitHub. We can laverage on more different languages for different platforms : from C# for .Net and UWP (Universal Windows Platform) applications to Java, from NodeJS (using JavaScript) to C. In this way, we are able to coverage different hardware from higher level devices like BeagleBoard, Raspberry Pi 2, Minnowboard Max to very low constrained devices like Kinetis K64F (Freescale) and CC3200 (Texas Instruments).

Of course, using directly HTTP and AMQP protocols, we can access to the IoT Hub from other platforms (not certified yet) and it could be the scenario of the .Net Micro Framework because up to now there isn’t an official SDK for it. The current C# client implementation uses Task and async/await programming model very heavily that isn’t supported (yet) by the “little” child in the .Net frameworks family. One choice to connect…

View original post 1,373 more words

RabbitMQ on Raspberry Pi

Tobias Abarbanell

Playing around with RabbitMQ lately, I was interested how it would perform on a very small box, a
Raspberry Pi.

Here is a short description how to get RabbitMQ running on a Raspberry Pi.

  1. get a Raspberry Pi installed with Raspbian – just follow the standard installation guide from http://www.raspberrypi.org/downloads/
  2. get the rabbit MQ package from here: http://www.rabbitmq.com/install-debian.html
  3. I wanted to run a client in Node.js, so I got the latest node with these commands:

    wget http://node-arm.herokuapp.com/node_latest_armhf.deb
    sudo dpkg -i node_latest_armhf.deb
    node -v
  4. pick the node version of the RabbitMQ tutorials from here: https://github.com/squaremo/amqp.node/tree/master/examples/tutorials

Here is how this looks in pictures:

Raspberry Pi running RabbitMQ Raspberry Pi running RabbitMQ node.js client running with rabbitMQ on a Raspberry Pi node.js client running with rabbitMQ on a Raspberry Pi

And the results: If you let a publisher with a simple “hello world” message run in a loop for 1000 times and start a subscriber for this queue at the same time, you will see…

View original post 103 more words