English Article · Software

Locust as a modern load testing framework

The Locust is an alternate tool to the JMeter. Locust allow you to write load tests in python, this tutorial describes how from scratch make a simple load testing and see results. Let’s do the following steps:

  1. Install python on your system.
  2. Install Pip (package manager).
  3. Install Locust: pip install locust.
  4. Simple locust script.
  5. Run script: you can already execute the loadttesting.sh and see the next console window:
The console window after the run loadtesting.sh window.

Please pay attention to the output url: http://0.0.0.0:8089, please adjust the address to the next: http://localhost:8089, (as the IP-format may not work) and paste to the browser, you should see the next:

Continue reading “Locust as a modern load testing framework”
English Article · Software

How to get and put files under Kubernetes pod

1. Copy a file from the App_Data/logs/ path of the default/cm-5c57dbd5d5-pqwh9 pod into the local C:/myf/log.txt file:

kubectl cp default/cm-5c57dbd5d5-pqwh9:App_Data/logs/log.20201215.092051.txt /myf/log.txt

2. Copy the Sitecore.ContentTesting.dll file from the local machine into the pod with path bin/Sitecore.ContentTesting.dll

kubectl cp C:\Work\Solutions\CT\code\Sitecore.ContentTesting\bin\Debug\Sitecore.ContentTesting.dll  default/cm-5c57dbd5d5-pqwh9:.\bin\Sitecore.ContentTesting.dll

3. Copy all the files from the App_Data/logs/ path into the local C:/myf/:

kubectl cp default/cm-5c57dbd5d5-pqwh9:App_Data/logs/ /myf/

Note for the #3: please check that all the files are copied, in my case some of them were missed somehow, if you know why it may happens please let me know, thank you in advance!

English Article · Software

Netlify Split Testing

The Netlify service allows you not only to deploy Jamstack apps, but also do split testing, meaning that can show to users different variations of the same page. The approach they provide is quite interesting and different from common software practices. I would say it’s even more related to configuration.

Let’s say we have simple JAMstack website. To use the split-testing approach we should have the source code in Bitbucket, Github or Gitlab. Make sure your latest changes is in the master branch.

Then login to the Netlify account, go to the Team overview tab and click the New site from Git.

Then do 3 simple steps which take less than a minute and you should have connected repository to the Netlify.

Continue reading “Netlify Split Testing”
English Article · Software

How to resolve Java heap space exception in Solr

For the last few days I’ve noticed weird behavior in Sitecore instances which are related to Solr, for example:

  • indexes are rebuilding with exceptions;
  • sitecore instance is being slow;
  • lost connection to Solr;
  • not able to restart the Solr service, it’s just take an infinity time to stop.

For all of this things I haven’t pay much attention to start troubleshooting, because I’m working in another area which not related to indexes, the behaviour is quite new for me and just simple reboot has helped.

Lost connection to Solr
Continue reading “How to resolve Java heap space exception in Solr”
English Article · Software

“Entourage” anti-pattern and “Stairway” pattern

The Entourage anti-pattern brings no needed dependency. In this example if we build project with Controllers in isolation, the bin folder going to have the NHibirnate assembly as implicit dependency. With the current implementation the services, domain, NHibernate, etc. classes must be public, hence developer able to create any of them manually with constructor usage and this is unwilling situation.

The Entourage anti-pattern

The Stairway pattern is fix the entourage anti-pattern. The interface and implementation should be separated from each other in different assemblies. Hence, with this approach we easily can replace implementations.

The Stairway pattern
English Article · Software

Good Code (in short)

Good code is following 3 main concepts:

  • Readability – code is generally clean, others understand your code.
  • Scalability – can the code perform good with small amount of elements compared to big amount of elements? Can the code be easily scaled horizontally? In general it covers different areas, from algorithm prospective where developer should care about Big O notation to high level architectural things.
  • Evolutionary architecture – code must be easy changeable/evolving over new requirements.
Continue reading “Good Code (in short)”
English Article · Software

Personalization

Personalization provides the right content to the right audience.

What does it mean? – For example, you are a customer of http://www.myGrocceryShop.com and usually, you buy vegetables and fruits online. Maybe you are not aware, but the grocery shop already know your behavior. Next time in the main page of the website you will see a bunch of fresh vegetables instead of meat or potato chips. You will see more targeted offers personalized for you.

Continue reading “Personalization”