Introduction Notes below are kind of switching between .NET Core & .NET Standard & ASP.NET Core as it makes sense. Those are all closely related although perhaps not really… There is still some confusion on my part so some of the information below may not be fully accurate - I would hear back to learn. Lessons (re-)learned - ASP.NET Core is not .NET Core None of the ASP.

Read more →

Notes based on playing and researching the Event Sourcing & Command Sourcing. This is closely related to microservices if applied properly. Event sourcing and command sourcing Overview Good segregation of application logic in terms of data modification and querying This should simplify reasoning about the application logic Since all modifications are just a stream of events it avoids side-effects people tend to put into read logic Also allows to have optimal models for each of above Improved scalability - write part is append-only so it reduces locking complexity If read model is updated asynchronously then not very well suited for complex screens where user can edit many fields and assumes upon save to get refreshed data Well suited for task oriented UI Commands - requested actions to be performed on the model, should be named as verbs Commands are immutable - they live just for short time of transfer from caller to command handler Events - performed model state changes, should use past tense (something happened and it cannot be undone) Events are immutable - past cannot be changed Stored in a sequential log which can be later used for analysis of what happened in the system Can be used later to update for example querying model Fixing a state change should be done by adding another event which reverts the previous operation Dealing with concurrency Pretty simple: Event can contain ‘version’ of model which is being updated Event log then can have a unique constraint for each aggregate id and model version Assuming two or more concurrent actions updated the same aggregate on same version one of the updates will fail Command handler then can decide: Retry the same operation with some merge logic Fail the operation This constraint can be implemented in relation database as well as other services (like Google Firebase).

Read more →

Setting up a cloud builder task to commit back to a Github repository using Deploy keys. Intro Sometimes it is useful to be able perform write operations in github repositories (or access a private repository etc.) This requires setting up an account with permissions An alternative would be setting up a cloud builder with SSH key which will be authorized to access the repository Cloud builder task below generates an RSA key which will be part of the task and can be allowed to access repository

Read more →

Experience with setting up first cloud build for .NET Core & Angular. Intro Read manuals carefully - you can test your build locally using Google Cloud SDK but it doesn’t work on Windows. So if you want to give it a try setup a Linux machine for it. I strongly recommend to setup Google Cloud SDK on your Linux machine manually and not thru a package manager - this may save you a lot of time since gcloud components install will work for you and thus examples can be followed easily.

Read more →

Pár poznámek k cyklosezoně 2018 - jen osobní poznámky… Jídlo a pití Co nefungovalo Sladké Jakékoliv větší množství cukru mě vždycky poslalo do kolen cca na hodinu možná déle (Seč na jaře, sám kolem Sázavy, Jeseníky s Pavlem). Sladké je v pohodě, ale je potřeba to občas proložit něčím normálním - bageta, chleba s sebou apod. Tohle zahrnuje i cyklotyčky, ionťák - lepší malá láhav ionťáku a velká čisté vody.

Read more →