Squadron – Next week of work

Operational_planning_for_the_2011_DRC_elections

Plan for next week

This post shares with you with insights from developing of  getsquadron.io

I managed to outline main feature that I want to have. Let’s kick off with something easy, those are main tasks to finish by the end of next week.

  1. Read simple Json configuration file that describe testing scenario
  2. Do a N requests against remote server, or you can specify frequency of requests
  3. Get time of all requests and dump into simple CSV file

My assumption for this week is that I should be able to perform very limited load test against one server. In future I am considering to add more servers. Of course if your application is load balanced you don’t need this feature.

Big believer of TDD

I am big believer of TDD especially in a projects that you start from scratch. It couldn’t be different in this project. If you are shadowing work and repository you will find more code in test solution than in normal project 😉

Abstract

As you might read in previous post I already outlined my requirements for that project, but finally I made clear abstract, what I want and that abstract will be always source of truth for my direction of work.

Test Web Application

Writing unit test is cool, but I want to have live organism to test against, that’s why I decided to write just simple web application that will help to emulate some of scenarios. You might already seen this project because I started series of blog posts about ASP.NET Core application.

Makefile and .NET Core

building-blocks-456616_1280

Overview

In this post you will learn what is build script or build tool, what products are out there and why it’s helpful during whole life cycle of you application.

It it a part of “Get Noticed!” series, check out how to create your first .NET Core application. If you already know, check out this repository

What is build script ?

Build script tools automate certain task that you have to do repeatedly with your
code, data store, application and other tools.
For example if you would like to get a clean run of our application (.NET Core).
You have to invoke four commands – dotnet clean, dotnet restore, dotnet build, dotnet run that is pretty irritating if you have to type that N times, over and over again.

What if you would like to get clean database each run ? Or let’s say that you would like to patch some meta data file with version every time when you publish new version of application or library, again very problematic.

You don’t really want to do it every time by hand, to be honest, sometimes you cant!
Like if your publishing or deploying process is handled by external machine, then it’s impossible to do such a step manually. That’s why we want to script it!

You will see later that you can automate various things, not only building your application but further steps in life cycle of your project

What is make ?

 

GNU Make is a tool which controls the generation of executables
and other non-source files of a program from the program’s source files.

(source)

In simple way, GNU Make allows you to describe to create executable file, but you will see that not only!

Where that can be useful ?

Project building

We mentioned above that getting a clean run, required from us a lot of commands typing, OK but hold on! Let’s create Makefile.

That way you can describe how to build all your projects. As you can see we just simply wrap up our well known .NET building tool commands with Make clean, restore, build, run .

Moreover we chained up those with one command run-clean, so now if you run make run-clean Make should run all other commands in order, at the end you should get running application, isn’t simpler ?

Make and Docker

I assume that you know what Docker is. If not there will be post coming in next few days, so stay tuned!

Let’s say that your application depend on PostgresSQL, for development you want to have clean database each time you run your application.

As you can see we added three new steps in our Makefile. run-with-db ,database-cleanup and  database-prep , again we just wrap up some well known docker commands, like stop and remove container or pull image and run container. At the end we chained up to run-with-db so that clean database will be prepared and then our application  will be run.

It’s not end!

Those two cases are just few where you can use Makefile to make your life easier. Stay tuned there will be more scenarios where you can use build tools.

Make is not just one tool out there, check out also FAKE, CAKE.

Setting up .NET Core project

Overview

This tutorial will work on most of OS, but I encourage you to get a Ubuntu, to go out of your comfort zone. It’s very easy to start with Linux. Working with console is very important to me, so that all work is done via command line.

Article is part of “Get Noticed!”, project squadron, so we will try to recreate what I have already done to Squadron.TestApplication repository

Install .NET Core

Installation of .NET Core is super easy, and I don’t want to copy what is already written so check out dotnet core website, and follow their steps. If you have any problems let me know in a comment below, I will try to help you.

Validating of installation

Once you installed framework, open command line and invoke

dotnet --version

you should get at least 1.0.1 (depend what time you are reading this article)

dotnetversionresult

Create folder structure

Main difference between standard .NET framework tooling and .NET Core. Previously you didn’t have to have folder structure, your projects could live in different places in your system. That information was stored in solution file.

.NET Core moved towards folder structure where you are not forced to have solution file that keep all information about your projects, so that you can open it in different IDEs or editors.
Let’s kick off with creating a directory structure, you can download full script here
cd ~/
mkdir Squadron.TestApplication
cd Squadron.TestApplication
mkdir src
cd src

Convention says that you should have two folders src and tests placed at the top folder of your project. For a now we just stick with src folder, because we are not going to create any test project yet

Initializing project

Make sure that you are inside src folder, then invoke in order.

mkdir Squadron.TestApplication
cd Squadron.TestApplication
dotnet new console

That will initialize your first project.

Base commands

There are 4 base commands that you have to know, for more commands just invoke dotnet --help in console.

  • dotnet new, initialize new project and create base files
  • dotnet restore, restore all packages
  • dotnet build, compile your project
  • dotnet run, run your project

After you initialized your new project run those commands in a order

  • dotnet restore
  • dotnet build
  • dotnet run

After last command you should get your first “Hello world”

What is next ?

Stay tuned in the next post will carry on this project and implement API based on ASP.NET Core

Squadron – First steps

Yesterday’s tasks

Those were my yesterday’s tasks, check out the outcome.

trello-kick-off

Measure people interest and start gathering information about customers

As you might have read in the previous blog post, I want to be very focused on building the product from the beginning. It means one thing, marketing and proper product building. I will try to use my “engineering” point of view to a minimum.

That means I have to deliver product features quickly and check if my potential customers like it, but how can I check if people like the product or a feature?

I am going to start with two tools, Google Analytics and MailChimp. For a now I will use just one main feature of google analytics, tracking how many users was on my website. That way I can simply know if people get interested in what I am doing or not.

MailChimp, that is simply to build up my database of potential users, I will share with them with some insights of my current work and they will get early access.

Those two basic tools will help you to kick off gathering very useful information and metrics. Every time you publish something or change, you will know if your changes or features drives more users or not.

The first iteration, make it simple!

The first iteration should be quick, it shouldn’t be perfect, it can be crap, it’s the internet you have many lives to launch a product, idea. If this time you will not be lucky you can try another time, and another time, and another time. IT’S FINE!

I took Amy’s advice to my heart, so that way I published getsquadron.io, in less than 2hrs. That includes:

  • Get a domain getsquadron.io
  • Setup repository
  • Setup & customise Jekyll website
  • Setup mail server & MailChimp mailing list

I keep most of my personal stuff on AWS, I know that tool well so I will stay there at least for a while. I got domain via Route53 and the mail server via WorkMail, I was kind of amazed how easy those tools are nowadays, especially mail server and domain it has always been a pain in the ass.

Outcomes

After 24hr from publishing getsquadron.io, I am able to say that I got some traffic and 3 new users at my mailing list!!

squadron-first-ga

mailchimp-first-ss

Books

Books that helped me a lot to understand what is actually a problem of product development and how you should do it if you build product or company that sell on the internet. Tech is not a problem at all, tech is just your toolbox.

Squadron take off – Get Noticed

Get Noticed

This is the time!

Unfortunately last year I didn’t take part in Get Noticed! If you don’t know what it is, checks this website, translate to English should do work.
In short, “Get Noticed” is a contest where for three months you have to work on
your personal project, that you come up and you write about it on your blog, how amazing idea is that?

The reason for that is simple Get Noticed! by other people, go out from your comfort zone!

Squadron as a tool for distributed load testing

The project that I am going to build is a tool for load testing. The main reason for that is I couldn’t find a tool or a product that would fit my needs. What I am looking for are those three main features: simple DSL that describe scenarios and endpoints under test, being distributed that works easily with major cloud providers, runnable in most of the OS and Linux distros

Technical goals are still in progress, mainly because I don’t want to be very rigid, currently, my trello board is in a big mess. I will try to share with you a draft of some goals. You will see how do I manage tasks, and goals.

On the other hand, my personal goals from this contest and project, are very different than usual tech person. I would like to that my main takeaway would be an experience in creating a product from scratch. That I could potentially make a profit. There will be a lot of knowledge not very technical but around that, like marketing-ish, SEO, customer tracking, OKRs. In general getting a first customer is much harder than coding, at least for me!

What technology?

Well technology is not really that important in this project, but we have to distinct here two different projects:

  • Core application that does load testing: it is going to be NET Core.
  • Website that allows you to manage your scenarios and work with cloud providers: that is going to be ReactJs and some free web templates

I chose “.NET Core” because it’s still my main platform that I work and it will be much simpler to create first iterations of that project. I strongly consider rewriting that into GoLang/C++ and some point.

Take off!

Good luck to everyone that take part in “Get Noticed!” you are amazing! I might show up at YouTube so stay tuned 😉