Python is 72x slower and uses 76x more energy than C

According to a recent study named “Ranking Programming Languages by Energy Efficiency” conducted by several institutions in Portugal, Python is incredibly energy wasteful. In addition, Python is also extremely slow when compared to the C programming language. See table below:

This comes to no surprise to me. Interpreted languages like Python, Perl, Lua, JavaScript, TypeScript etc. are by their very design, slow and energy wasteful because priority has been put on “ease of use” for programmers. This comes at a very heavy price: slow performance and energy wastefulness.

Compiled languages like C will always be outperforming and be much more energy efficient because C is much closer to the hardware and operating systems than interpreted languages.

Do people or organizations care of wasting energy and have lousy performance? They should. If organizations do not care, your customers eventually will see a difference in quality between scripted languages and taking the time to produce fast and energy efficient code. One can always see a difference between native applications and scripted/browser applications.

For example, let’s say you are creating a cloud-based applications that uses AWS Lambda to execute your functions. If that Lambda is written in Python, you are wasting time and money. Since Python so incredibly slow, you are being charged in 100ms increments when you execute your Lambda function in AWS. Now, imagine your Lambda function is written in C? Your Lambda function will execute so much faster and you are being charged much less. It will be more cost efficient to execute in C rather than Python. So, it would be cheaper and you are contributing to a lower energy consumption.

The same idea can be applied when you create a Linux daemon service, a Windows service, or even a native Linux, MacOS, or Windows application. Have a look at NappGUI, a cross-platform C SDK that allows you to create super fast and beautiful C applications.

C is a really powerful language. Have a look at it and start using it in your next project.

Proposed book about Event Sourcing & CQRS

For years, I wish I had a source that I can direct people to learn more about Event Sourcing & CQRS. Greg Young never created a book, sadly. The difficulty in Event Sourcing & CQRS is not so much the technical side but, as usual, the people you need to convince and work with. Typically, Event Sourcing allows for capabilities in your software that are extremely hard or almost impossible to do with old style software development. It is fairly easy to convince executives, product, sales, etc. that these new capabilities and insights for your customers can easily beat competition. So, why is Event Sourcing not used in like 85% of all software projects? I believe that there are different reasons but at the core, where can people go to? The Web? The Web shows all sorts of different views and many of them show inexperience and brushing Event Sourcing off as “too difficult” or “increased complexity”. WTF? Software by it’s definition is hard to do properly if you stay aligned with the business and the vision your organization has. I argue that Event Sourcing makes this actually easier, not harder!!! The CRUD virus shows its ugly head again!

So, after years of not having a great source for people to direct to, I’ve been seriously thinking of writing a book about Event Sourcing and CQRS. I have not pulled the trigger because I know this a huge time commitment. However, I did create a six page table of contents and surprised myself of how much information can and should be shared on this topic. This book would be very comprehensive and covers Event Sourcing from every angle including the business and customers side and not just the technical side.

My question would be, are you interested in this type of book?

My new course on Udemy: Build an Event Store in C# .NET for CQRS and Event Sourcing

I’m excited to announce my new course “Build an Event Store in C# .NET for CQRS and Event Sourcing“.

Real-time communication and feedback to your customers are more important then ever. Customers have become used to immediate feedback on the actions they take in your software. It is very hard in create, read, update, and delete (CRUD) based applications to provide this sort of responsiveness that your customers are demanding. Event-based solutions that are based on CQRS, Event Sourcing, and Domain-Driven Design (DDD) can offer deep insights in real-time to your customers and to your business. More importantly, you won’t loose data in an event-sourced solution when compared to CRUD-based solutions because your solution will be able to provide the context on why changes happened and record changes into an immutable log, the event store.

In this course, you will learn about the importance of using domain events as your source of truth instead of pieces of data that are incomplete in CRUD-based applications. You will be able to tell stories on what happened when and why. You will be able to answer future questions by your customers and business even though you may not have all the requirements at hand when you design and build your event-sourced solution.

At the very heart of your solution will be the event store. The event store is the source of truth in your entire solution. We will be building an event store in C#. NET and utilizing AWS DynamoDB as the persistence mechanism. However, the provided C# source code can easily be converted to Java or other languages. For the actual persistence, you could also use MySQL, PostgreSQL, MongoDB, and others. The C# code is abstracted so that can you can re-use it for specific persistence implementations. The concepts and code can work for on-premise, cloud only, or hybrid models. For an example read model implementation, we will be creating a read model using MySQL in AWS.

Once you understand the power of event sourcing, you won’t go back.

Design things to be replaceable, not reusable!

I love this quote by Andy Hunt

I find aiming to make things “replaceable” far better than making things reusable. Reusable means you’re fortune-telling, trying to divine an unknowable future.

This is what I’m aiming for as well especially when you bring in the Sacrificial Architecture. Love it.

As you create your architecture, design all components to be replaceable, not reusable. This is a whole lot easier nowadays with AWS and Lambda creating serverless masterpieces, for example.

What are Projections in an Event Sourced Microservice Architecture?

In this video I will show you the different types of projections in an event-based microservice architecture and how you can use them.

Projections can be created in code in your microservice or in read-models when domain events are received and processed, for example, you process a published domain event and then store the result of the analysis in Oracle, MySQL, SQL Server, etc.

Microservices

I just finished uploading the final video on YouTube of the little mini-series “Microservices”. Take a look here:

1. Microservices – Part 1 of 4 – What Is A Microservice?
2. Microservices – Part 2 of 4 – DDD
3. Microservices – Part 3 of 4 – Big Ball of Mud
4. Microservices – Part 4 of 4 – Event Driven

These videos are all available on my YouTube channel at: Creating Great Software

 

Why you need serverless microservices, yesterday!

I have just published my FREE course: Why You Need Serverless Microservices, Yesterday“. Enroll for FREE!

WhyYouNeedServerlessMicroservices_960x520In this course I will walk you through the many benefits of creating serverless microservices instead of the traditional node / instance approach including the use of containers. There are more than enough things to worry about when you want to create a new cloud system or transform a legacy system to operate in the cloud.

From a business point of view, there are huge benefits in going serverless rather than instance based (including containers). A very large jump in business agility can be achieved through focusing on the problems and opportunities rather than the technical jungle of traditional computing solutions.

From a technical point of view, it is almost nirvana where you can eliminate many points of failures in the architecture.

Serverless Microservices Online Courses

Update 04/03/2019: I have completed the FREE course: “Why you need serverless microservices, yesterday!“. Enroll for FREE!
At the moment, I’m working on four online courses in the following order:

 

Why You Need Serverless Microservices, Yesterday, FREE Course

WhyYouNeedServerlessMicroservices_960x520

In this course I will walk you through the many benefits of creating serverless microservices instead of the traditional node / instance approach including the use of containers. There are more than enough things to worry about when you want to create a new cloud system or transform a legacy system to operate in the cloud.

From a business point of view, there are huge benefits in going serverless rather than instance based (including containers). A very large jump in business agility can be achieved through focusing on the problems and opportunities rather than the technical jungle of traditional computing solutions.

From a technical point of view, it is almost nirvana where you can eliminate many points of failures in the architecture.

 

“How To Build An Event Store”, Paid Course

eventstore_960_520_darker

Your event store is the heart of an event sourced system. The event store is the source of truth for all business events. It needs to be able capture and replay all domain events in your system reliably and with great performance.

In this course, I will walk you through building an event store that you can re-use in your own projects. In addition, I will walk you through building a read model that allows you to query domain events from the read model.

I will also go through why building your own event store has many more advantages over using a third-party event store.

We will be building the event store in AWS DynamoDB but you can apply the design to a traditional RDMS SQL storage just as well. I will go over the pros and cons in doing so.

 

“Architecting And Designing Event Based Microservices”, Paid Course

ArchitectAndDesign

Learn the details on how to design and architect event based microservices using Domain Driven Design (DDD), Event Storming, CQRS, and EventSourcing techniques. I will show you how best combine many principles, patterns, and techniques to create an architecture with as few points of failures as possible and still deliver a great solution.

What you will learn can be applied to cloud based systems but also to traditional, on-premise systems. The benefits are great in either environments.

Whether you are designing a new system in a greenfield environment or transforming a legacy system, I will show tips & tricks that you can use depending which type of project you are in.

 

“Implementing A Serverless Microservice in AWS”, Paid Course

Code_960x520

Learn the details on how to implement a serverless microservice in AWS using Domain Driven Design (DDD), CQRS, and EventSourcing techniques.

We will build a fully functioning billing system in AWS using Visual Studio and C# .NET Core. Even if you are not familiar with C# and .NET Core, you will learn a lot of practical tips on using the different AWS services including building fully automated CI/CD pipelines.

 

I’m still working on these courses but I’m planning on publishing “Why You Need Serverless Microservices, Yesterday” and “How To Build An Event Store” first.