<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on </title>
    <link>/posts/</link>
    <description>Recent content in Posts on </description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Fri, 27 Apr 2018 19:23:31 +0000</lastBuildDate><atom:link href="/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Undertow REST API</title>
      <link>/undertow-rest-api/</link>
      <pubDate>Fri, 27 Apr 2018 19:23:31 +0000</pubDate>
      
      <guid>/undertow-rest-api/</guid>
      <description>Part of my daily routine is to consume, design and deliver services built for HTTP clients. This might manifest in something special like WebSocket, Protobuf but most often a plain JSON REST API. In any case, the performance is key, and an Undertow REST API with JAX-RS can deliver a stable performance under consistent load.
In this article, I will cover some basics for setting up and deploying a REST API with Undertow, in Docker.</description>
    </item>
    
    <item>
      <title>Golang flyweight pattern</title>
      <link>/golang-flyweight-pattern/</link>
      <pubDate>Sat, 16 Dec 2017 09:06:31 +0000</pubDate>
      
      <guid>/golang-flyweight-pattern/</guid>
      <description>The flyweight pattern is a design pattern I am not seeing that often in code bases but can be a good design pattern to reduce memory. The core idea is to initialize objects an share them as often as possible for reuse. Mostly the flyweight pattern can be seen in desktop UI implementation (GUI). In Java Swing, for instance, the JTable rendering uses this pattern, to reduce the computation needed for painting.</description>
    </item>
    
    <item>
      <title>Golang singleton pattern</title>
      <link>/golang-singleton-pattern/</link>
      <pubDate>Sun, 15 Oct 2017 17:47:18 +0000</pubDate>
      
      <guid>/golang-singleton-pattern/</guid>
      <description>There are a number of design patterns I am using on daily bases, and one of them is the Singleton pattern. In Golang penalties in performance are not so harsh as in other languages, if the application is not designed and written to perform with minimal CPU and memory footprint. I’m trying to keep my implementations as performing as possible, but sometimes explicit benchmarks can revile the details.
The singleton pattern is widely used in Object Oriented languages, and it is well worth to use it in golang.</description>
    </item>
    
    <item>
      <title>Web Services in Docker with Golang</title>
      <link>/web-services-in-docker-with-golang/</link>
      <pubDate>Tue, 18 Jul 2017 20:26:55 +0000</pubDate>
      
      <guid>/web-services-in-docker-with-golang/</guid>
      <description>This post is a walkthrough on my approach to develop and deploy Golang web service in Docker container. There are many reasons for integrating Docker into the daily routine as a developer, one being the simplification of setting up a separated runtime environment. Using containers in production has, even more, advantages from simplified release to better performance. Kubernetes and Docker Swarm is gaining more and more space, which I think is partly because of the simplified management on IBM Cloud and Google Cloud Platform.</description>
    </item>
    
    <item>
      <title>HTTP load testing strategies and tools</title>
      <link>/http-load-testing-strategies-tools/</link>
      <pubDate>Sat, 18 Feb 2017 10:02:50 +0000</pubDate>
      
      <guid>/http-load-testing-strategies-tools/</guid>
      <description>&lt;p&gt;In most cases web applications are well covered with unit tests, to covert a functional requirements and acceptance tests. Unit tests combined with Continuous Integration can improve the deviling rate of a team/company. At the same time it can remove the need of manual testing, which is error prone. Tools for CI are widely available in self hosted solutions like Jenkins or cloud based like CircleCi or Travis, if the project source does not need to be secured as much. In any case these tools offer a wide variety of build and test scheduling to automated deployment and configuration. I think for most Software Engineers these are familiar concepts and possible part of daily work routines.&lt;/p&gt;
&lt;p&gt;One important part of most web based application is not covered with these tools, the benchmark or load test of new features and the application in general. It is obvious that CI tools are not meant for this task, but to have good understanding where the application bottlenecks and limitations are is crucial. In most cases this is an SRE or DevOps task clearly, but I think it is good for all Engineers to understand they changes and the consequences of them (if any). There is also another important factor which is the price of keeping one system up. Many times I heard, read that “…the application is not busy, so it does not matter…”. I believe that it does, even in not busy apps, because the development time/cost is a small percentage of the system all over lifetime cost. There is a really good breakdown of this idea in the &lt;a href=&#34;http://shop.oreilly.com/product/0636920041528.do&#34;&gt;Site Reliability Engineering – How Google Runs Production Systems&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For a developer there are many tools to benchmark new features, in a standalone setup in most modern stacks. The tricky part I think is to being able to measure and understand the capabilities of an application as a whole. For this post I will stick to the HTTP load testing tools I found useful and use on regular bases.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Heapsort algorithm (Java)</title>
      <link>/heapsort-algorithm-java/</link>
      <pubDate>Thu, 01 Dec 2016 19:33:49 +0000</pubDate>
      
      <guid>/heapsort-algorithm-java/</guid>
      <description>Heapsort algorithm details: Worst-case Time Complexity: O(n log(n))
Space Complexity: O(1)
The algorithm The heapsort algorithm is an in-place, comparison based sorting algorithm. In the core of the algorithm (as the name suggest), the use of the heap data structure is improving the time complexity. In a nutshell, heap is a special type of tree, where the elements in the tree are in a certain order to each other. This allows to find the minimum or maximum of binary heap in O(1) and insertion/deletion in O(log(n)).</description>
    </item>
    
    <item>
      <title>Merge sort algorithm (Java)</title>
      <link>/merge-sort-algorithm-java/</link>
      <pubDate>Wed, 16 Nov 2016 19:39:52 +0000</pubDate>
      
      <guid>/merge-sort-algorithm-java/</guid>
      <description>Merge sort algorithm details: Worst-case Time Complexity: O(n log(n))
Space Complexity: O()
The algorithm Merge sort is comparison based algorithm, from the efficient sorting category. The algorithm is based on “Divide and conquer” (John Van Neumann), which means in this case, that the original collection is divided into smaller chunks. This idea can be implemented in a recursive fashion, so that the collection is divided into single elements and then re-constructed into a sorted collection.</description>
    </item>
    
    <item>
      <title>Bubble sort algorithm (Java)</title>
      <link>/bubble-sort-algorithm-java/</link>
      <pubDate>Mon, 14 Nov 2016 19:45:58 +0000</pubDate>
      
      <guid>/bubble-sort-algorithm-java/</guid>
      <description>Algorithm details: Worst-case Time Complexity: O(n^2)
Space Complexity: O(1)
The algorithm Bubble sort is a very simple sorting algorithm, with straight forward implementation. The algorithm is based on comparison of all elements to each other. The compared element positions are switched on the comparison result, and the element is shifted to the correct location. This implies, that each element has to be checked against each other. This results in n*n comparisons, even if the collection is in order.</description>
    </item>
    
    <item>
      <title>CqlSh connection issues on Ubuntu 16.04 – Cassandra</title>
      <link>/cqlsh-issues-ubuntu-16-04-cassandra/</link>
      <pubDate>Thu, 22 Sep 2016 10:06:52 +0000</pubDate>
      
      <guid>/cqlsh-issues-ubuntu-16-04-cassandra/</guid>
      <description>I upgraded my Ubuntu 14.04 development system to 16.04 in August with the first point release. I have to say the upgrade process when really smooth. There where small issues with PHP and Python. The only painful issue I had was with Cassandra and CqlSh. The python version which is shipped with Ubuntu 16.04 is 2.7.12 and the version CqlSh is targeted is 2.7.11.
When I tried to connect to CqlSh I got the following error:</description>
    </item>
    
    <item>
      <title>Golang – how I approached Go – books, video tutorials</title>
      <link>/begining-golang/</link>
      <pubDate>Sun, 18 Sep 2016 11:23:07 +0000</pubDate>
      
      <guid>/begining-golang/</guid>
      <description>I am always really excited reading peoples notes about new languages and technologies, and this was not different with Golang. I read about the language and an implementation roughly 4 years ago. After reading the article I looked around to find more details about the background of the language, and I was quiet surprised how much effort Google did put into this language. For this very reason the language was always on my “look into if I can” list.</description>
    </item>
    
    <item>
      <title>Neo4j adventures</title>
      <link>/neo4j-adventures/</link>
      <pubDate>Sat, 25 Jun 2016 21:03:29 +0000</pubDate>
      
      <guid>/neo4j-adventures/</guid>
      <description>In the past decade I focused mainly on relational databases. I had the chance to design, work with and optimize databases from small(MB) to medium(TB) highly available enterprise clusters. In the past years, I turned to NoSql databases with couple projects, with Cassandra and MongoDb. NoSql is really cool to move onto, if you are not too used to having all the “fancy” logic available, based on the structure and the Sql engine itself like searching, ordering or data connection.</description>
    </item>
    
    <item>
      <title>CAP API – php rest application</title>
      <link>/cap-api-php-rest-application/</link>
      <pubDate>Fri, 24 Jun 2016 23:57:08 +0000</pubDate>
      
      <guid>/cap-api-php-rest-application/</guid>
      <description>Cap crawler is a simple python crawler with multi threaded execution and shared execution queue, with cli execution options. This project is a wrapper(API) around cap crawler implemented in Php Zend Framework 2 and Cassanadra.
The project is available on Github, clone it 🙂
Features
Private/public key or password based authentication Hmac(sha256) based request authentication (similar to AWS authentication) Chained validation(Auth&amp;lt;&amp;gt;identity&amp;lt;&amp;gt;endpoint&amp;lt;&amp;gt;request etc.) Json/Csv/zip response options Stateless &amp;amp; scalable Custom error handling Dependencies</description>
    </item>
    
    <item>
      <title>CAP crawler – python crawler</title>
      <link>/cap-crawler-python-crawler/</link>
      <pubDate>Fri, 24 Jun 2016 22:34:13 +0000</pubDate>
      
      <guid>/cap-crawler-python-crawler/</guid>
      <description>The project was created for research purposes to collect structured and unstructured data from the web. Collected data is stored in Cassandra for scaling purposes and to increase IO.
The project is available on Github, clone it 🙂
Features
Shared crawl execution queue with MongoDb Link &amp;amp; content scraping options Robot.txt checking, to avoid unwanted crawling Download error checking and retry Cli execution Dependencies
Python 2.7 is the version the application is written in.</description>
    </item>
    
    <item>
      <title>C pointers – introduction</title>
      <link>/pointer-in-c/</link>
      <pubDate>Tue, 01 Oct 2013 20:31:38 +0000</pubDate>
      
      <guid>/pointer-in-c/</guid>
      <description>There are certain tasks in C programming and other languages like PHP, what can only be done with pointers, like reading from a file requires a file pointer. Also to have a good understanding of pointers can give a great confidence to start improving the memory usage with decreasing the value duplication in programs.
A pointer is an address of a memory location where an actual value is stored. Every variables memory location can be accessed by using the ‘&amp;amp;’ am-percent.</description>
    </item>
    
    <item>
      <title>Array in c</title>
      <link>/array-in-c/</link>
      <pubDate>Wed, 18 Sep 2013 20:41:14 +0000</pubDate>
      
      <guid>/array-in-c/</guid>
      <description>Arrays in any programming language is one of the “power tools” you can use to organize data of same type. On the positive side elements of an array can be accessed in constant time because of the maintained indexes. On the downside array is fixed size and taking space after each other in memory which is not to efficient.
Array declaration and accessing elements works as in other languages, with an example:</description>
    </item>
    
    <item>
      <title>Structures in c – basics</title>
      <link>/structures-c-basics/</link>
      <pubDate>Thu, 12 Sep 2013 20:43:23 +0000</pubDate>
      
      <guid>/structures-c-basics/</guid>
      <description>Structures in c are used to represent data what have connections to each other in a single variable. This could be a record from a database.
Structures can be declared outside the functions to give access for all the function in the program. Other options for declaration is in the main header file(good idea), or inside main or other function which would make it available only for local use. A good practice is to not only declare the structure by create a type of that structure.</description>
    </item>
    
    <item>
      <title>C programming – where to start</title>
      <link>/c-programming-start/</link>
      <pubDate>Fri, 06 Sep 2013 20:46:01 +0000</pubDate>
      
      <guid>/c-programming-start/</guid>
      <description>I think to have a decent understanding of c, or start learning c programming is really good even if somebody is not planning to work with the language itself. Most of the languages are based on c or are in some way related to it. Most of the currently used popular languages have at least the syntax related to c.
This book can give a really great start on understanding and writing basic c functions.</description>
    </item>
    
    <item>
      <title>C typedef basics</title>
      <link>/c-typedef-basics/</link>
      <pubDate>Sun, 25 Aug 2013 20:51:14 +0000</pubDate>
      
      <guid>/c-typedef-basics/</guid>
      <description>If c is not your first language, you will really miss boolean primitive type. In other languages boolean is already defined, but in c there is no such type, it is actually using integer values instead.
It is really simple to implement a boolean value with typedef:
Other option is to include stdbool.h.
Using typedef as an alias makes code more readable.
The example above shows that accessing the values is along the same rules as using struct.</description>
    </item>
    
    <item>
      <title>C primitive data types</title>
      <link>/c-primitive-data-types/</link>
      <pubDate>Tue, 20 Aug 2013 20:48:23 +0000</pubDate>
      
      <guid>/c-primitive-data-types/</guid>
      <description>In the C programming language variables are declared before the program itself starts, before functionality. This applies to functions also.
With an example:
The following program declares c primitive data types and pointer data types and does print the size for them too.</description>
    </item>
    
    <item>
      <title>MySql function – how to create functions</title>
      <link>/mysql-function-create-functions/</link>
      <pubDate>Thu, 01 Aug 2013 21:34:59 +0000</pubDate>
      
      <guid>/mysql-function-create-functions/</guid>
      <description>Custom function in MySQL comes handy if we have some sort of calculation what to make, in order to get a value what can be stored. This implies that we want to push some logic into the database which is not a to popular idea among engineers.
A function always gives one value as a result like ‘select pi(); gives us 3.141593’.
To create a function the type of the input value(s) need to be specified as well as the output, result.</description>
    </item>
    
    <item>
      <title>MySql join – the basics</title>
      <link>/mysql-join-basics/</link>
      <pubDate>Wed, 24 Jul 2013 21:28:48 +0000</pubDate>
      
      <guid>/mysql-join-basics/</guid>
      <description>In a relational database with high level of normalization the data is stored in multiple tables. To retrieve the data from many tables joins can be used to connect data from multiple tables or itself(self join). Joins nowadays are considered to be a slow operation, and storage/memory is so cheap that de-normalization is one option in mostly NoSql and Graph databases. Joins can be slow as the database engine has to connect each record from one table to another record in another table with the columns we specify in each.</description>
    </item>
    
    <item>
      <title>MySql trigger</title>
      <link>/mysql-trigger/</link>
      <pubDate>Mon, 15 Jul 2013 21:37:57 +0000</pubDate>
      
      <guid>/mysql-trigger/</guid>
      <description>Trigger is a database object, associated with a table. Trigger does it’s specified function if an event occures such as insert/update/delete records.
Benefits of Triggers in MySQL:
triggers can change values before insert/update . If you set the trigger to listen on insert/update and the criteria is not met than value will be modifiade this will be applied with the insert. triggers can check values on row level insert or update and it’s able to determine what values where deleted or updated to.</description>
    </item>
    
    <item>
      <title>MySql start learning – install a sample database</title>
      <link>/mysql-start-learning-install-sample-database/</link>
      <pubDate>Wed, 10 Jul 2013 21:52:23 +0000</pubDate>
      
      <guid>/mysql-start-learning-install-sample-database/</guid>
      <description>On the dev.mysql.com site you can find few example databases, but for now I will use the world database (innodb). There is a really cool large data dump available from Stack Exchange for performance testing.
MySQL world database install guide can be found here, but you can also follow this:
Download the world_innodb.sql.zip file Start mysql command line and create the world database Extract the world_innodb.sql.zip to the drive root where mysql is running from on Windows c:/ Go back to mysql command prompt and use the world database created in 2.</description>
    </item>
    
    <item>
      <title>MySql books – where to start mysql</title>
      <link>/mysql-books-start-mysql/</link>
      <pubDate>Mon, 01 Jul 2013 21:55:14 +0000</pubDate>
      
      <guid>/mysql-books-start-mysql/</guid>
      <description>I was lucky and I had the chance to study MySQL (&amp;amp;PHP basics) on a 20 week full-time course, with a Tutor who had 15+years experience in web development. He really guided us if something was not clear. Unfortunately nowadays most people just start at home google the subject and start to pick it up. I do/did the same with couple of IT subject but the problem comes if you hurry to have something in your hand to work with and then you fly over things would be a MUST.</description>
    </item>
    
    <item>
      <title>MySQL insert with stored procedure</title>
      <link>/mysql-insert-stored-procedure/</link>
      <pubDate>Tue, 25 Jun 2013 21:14:15 +0000</pubDate>
      
      <guid>/mysql-insert-stored-procedure/</guid>
      <description>Stored procedures can be used to insert new values for more than one table. This could be handy if the data is stored in few tables as well as restricting the inputs coming from the application layer.
The following example will show how to create a stored procedure for insert values in MySQL database. This can give the general idea of how to create a stored procedure which contains even some calculation made ‘on the fly’.</description>
    </item>
    
    <item>
      <title>MySql auto increment re-jigged</title>
      <link>/mysql-auto-increment-re-jigged/</link>
      <pubDate>Mon, 24 Jun 2013 21:42:03 +0000</pubDate>
      
      <guid>/mysql-auto-increment-re-jigged/</guid>
      <description>Did you ever notice that MySQL auto increment used as default value to write in, if column value is null (or not specified). This is a really great feature, used I think in 80% of tables as id. If you delete the last row of a table eg. where id=5, time comes for inserting a new record with ‘null’ as id value, auto_increment gives id=6 as next to use. In other words if we delete a row auto increment can’t pick up the deleted values.</description>
    </item>
    
    <item>
      <title>MySql view – basics</title>
      <link>/mysql-view-basics/</link>
      <pubDate>Wed, 15 May 2013 21:10:00 +0000</pubDate>
      
      <guid>/mysql-view-basics/</guid>
      <description>The name of this database object, view in MySQL can give straight away an answer of the functionality. A view or “virtual table” can be created to retrieve data from tables actually hold the data or from other views. Update, delete, insert statements can be made on the base tables trough a view which can be really useful.
Views can be used to define a complicated query to give a specific set of data from tables which gives a good shortcut for later work.</description>
    </item>
    
    <item>
      <title>MySql stored procedures</title>
      <link>/mysql-stored-procedures/</link>
      <pubDate>Sun, 12 May 2013 21:06:52 +0000</pubDate>
      
      <guid>/mysql-stored-procedures/</guid>
      <description>Stored procedures in MySQL can encapsulate statements which can be used later. I think the real power of using stored procedures is in the amount of time can be saved by using one line against maybe dozens of insert, delete etc.
Benefits of Stored Procedures in MySQL:
Stored Routines can be created with error handlers. Code packaging and encapsulation Separation of the logic Reduction of network bandwidth Security by giving access to a specific routine handling the data.</description>
    </item>
    
  </channel>
</rss>
