DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Core Badge
Avatar

Bartłomiej Żyliński

DZone Core CORE

Senior Software Engineer at BOX

Warsaw, PL

Joined May 2020

https://pasksoftware.com/

About

Hello, my name is Bartek, and I am a software engineer with industry experience in designing and implementing systems of various scales and complexity. I am a self-taught, hands-on learner, constantly expanding my knowledge. Currently, I am focused on how we can build simple and robust systems. Besides my expertise as a software engineer, I am also a speaker and blogger. I run a blog on software engineering—occasionally sharing Java-related posts—at pasksoftware.com, and I invite you to visit. I am always open to new collaborations, technical discussions, or a chat about the latest trends in software engineering.

Stats

Reputation: 2168
Pageviews: 602.4K
Articles: 41
Comments: 15

Expertise

Tools Expertise Icon

Tools

  • Articles
  • Comments

Articles

article thumbnail
ACID vs BASE: Transaction Models Explained
When it comes to handling transactions, its ACID vs BASE principles. I will cover their description, use cases, and in-depth comparison.
May 29, 2025
· 1,496 Views
article thumbnail
Caching 101: Theory, Algorithms, Tools, and Best Practices
Explore caching basics, common problems, eviction strategies, tools like Redis and Memcached, and best practices for optimizing system performance effectively.
May 27, 2025
· 1,588 Views · 1 Like
article thumbnail
Monolith: The Good, The Bad and The Ugly
Microservices are no longer considered a silver bullet for all software pitfalls. Let's then focus on the monolith in all its forms and flavors.
May 22, 2025
· 2,269 Views · 1 Like
article thumbnail
Scalability 101: How to Build, Measure, and Improve It
Scalability is probably one of the most crucial non-business features of every modern-day system and this post is a perfect intro to it.
April 25, 2025
· 3,511 Views · 1 Like
article thumbnail
CRDTs Explained: How Conflict-Free Replicated Data Types Work
Explore Conflict-free Replicated Data Types. Data structure designed to ensure that data on different replicas will eventually converge into a consistent state.
April 24, 2025
· 5,171 Views · 2 Likes
article thumbnail
A Modern Stack for Building Scalable Systems
Dive into modern stack recommendations for building robust and scalable systems. This stack is agnostic and can be integrated into all programming languages.
April 23, 2025
· 7,790 Views · 1 Like
article thumbnail
Distributed Systems 101
Learn the core challenges of distributed systems and how to address them with scalability, observability, and smart design choices.
April 18, 2025
· 6,133 Views · 2 Likes
article thumbnail
Benchmarking Java Streams
Take a deep dive into the performance characteristics of Java streams. With the help of JMH, learn how Java streams behave when put under pressure.
June 13, 2024
· 9,410 Views · 7 Likes
article thumbnail
SSE vs WebSockets
In this comprehensive comparison between SSE and WebSockets, explore their similarities and differences as well as highlight when and where they shine.
April 12, 2024
· 1,235 Views · 1 Like
article thumbnail
Threads, ThreadPools, and Executors: Multi-Thread Processing In Java
This detailed description of how implementations of the Java Executor interface work focuses on relations between all of the Executors and their use cases.
February 13, 2024
· 6,056 Views · 11 Likes
article thumbnail
Functional Containers Summary: Functor vs Applicative vs Monad
In this comprehensive guide through basic functional containers Functor, Applicative, and Monad, explore possible applications and learn the math behind them.
January 8, 2024
· 4,721 Views · 1 Like
article thumbnail
Machine Learning Libraries For Any Project
There are many libraries out there that can be used in machine learning projects. Explore a comprehensive guide on which libraries to use in your projects.
August 22, 2023
· 6,834 Views · 6 Likes
article thumbnail
Best Plugins For JetBrains IDEs
Discover language-agnostic and -dependent plugins for IntelliJ IDEA that may be a great help in your daily fight with tasks that will make your work easier.
August 18, 2023
· 11,194 Views · 7 Likes
article thumbnail
The Journey Through Number Types
Positive and negative numbers are not the only number types in existence. There are others: Armstrong numbers, abundant numbers, perfect numbers, and more.
August 15, 2023
· 3,917 Views · 2 Likes
article thumbnail
gRPC vs REST: Comparing Approaches for Making APIs
gRPC and REST are commonly used approaches for creating APIs. Find the best fit for your application as you take a closer look at their characteristics.
July 19, 2023
· 4,741 Views · 1 Like
article thumbnail
Secure Spring Boot 3 Application With Keycloak
Are you an experienced Java developer but new to Keycloak? Read through this tutorial presenting step-by-step examples of how to secure your REST API.
July 17, 2023
· 29,811 Views · 9 Likes
article thumbnail
Core Machine Learning Metrics
All in one comprehensive guide through core machine learning model metrics—a few lessons learned from working with machine learning models.
January 23, 2023
· 3,467 Views · 3 Likes
article thumbnail
OpenID Connect Flows
Deep dive guide throughout processes of obtaining Access Token in OpenID Connect.
January 19, 2023
· 4,939 Views · 4 Likes
article thumbnail
OAuth Grant Types Guide
Deep dive guide throughout processes of obtaining Access Token in OAuth. Want to know how OAuth Grant Types works? This text is just for you.
January 12, 2023
· 3,538 Views · 2 Likes
article thumbnail
Math Behind Software and Queueing Theory
I will be taking a closer look at a branch of mathematics known as queueing theory and its potential applications in the world of software engineering.
December 29, 2022
· 4,983 Views · 3 Likes
article thumbnail
Snake-Based REST API (Python, Mamba, Hydra, and Fast API)
Using Python, Fast API, Hydra, and Mamba to build dockerized applications.
August 9, 2022
· 7,594 Views · 4 Likes
article thumbnail
Questions Developers Should Consider Asking Potential Employers
If you are looking for a guideline on how to find a good employer, these questions may be a good place to start.
July 18, 2022
· 4,260 Views · 2 Likes
article thumbnail
Writing a Chat With Akka
Do you want to know more about WebSockets? Here you will find some more information about them and learn how to create a simple chat application.
June 7, 2022
· 7,351 Views · 2 Likes
article thumbnail
What Is Sharding?
Sharding is a technique of splitting some arbitrary set of entities into smaller parts known as shards. It is used to achieve better consistency and reduce contention in our systems.
Updated May 31, 2022
· 11,169 Views · 9 Likes
article thumbnail
Database Migration tools: Flyway vs Liquibase
Learning and choosing a migration tool for yor project? Deepening your knowledge about Flyway and Liquibase will give you new insight for efficient workflow.
Updated May 11, 2022
· 66,950 Views · 14 Likes
article thumbnail
What Is Applicative? Basic Theory for Java Developers
Are you a Java developer who wants to know the theory behind Applicatives? Here you will find a step-by-step tutorial that will help you understand them.
January 20, 2022
· 11,392 Views · 13 Likes
article thumbnail
What Is a Functor? Basic Theory for Java Developers
Are you a Java developer who wants to know the theory behind Functors? Here you will find a step-by-step tutorial that will help you understand them.
Updated December 9, 2021
· 14,326 Views · 12 Likes
article thumbnail
What Is a Monad? Basic Theory for a Java Developer
Are you a Java developer who wants to know the theory behind Monads? Here you will find a step-by-step tutorial that will help you understand them.
Updated December 8, 2021
· 47,177 Views · 23 Likes
article thumbnail
Logic Behind Software — allMatch On Empty Stream
Have you ever wonder why all match on empty Stream will always return true ? Here you will get all information needed to understand why it works this way.
November 9, 2021
· 7,713 Views · 7 Likes
article thumbnail
Single Responsibility Principle: The Most Important Rule in the Software World
Do you want to know the most important singular rule in the world of software engineering? Here you can learn why it should matter to all engineers.
November 3, 2021
· 8,567 Views · 8 Likes

Comments

Benchmarking Java Streams

Jun 25, 2024 · Bartłomiej Żyliński

Hi,

I am using JMH to run benchmarks. The calculation of the final results is also done by JMH.

I just got the data I needed from the JMH results. You can see this operation in the following class: AggregatorsUtil.java.

If you would like to know more about the computation done, then I am afraid that you will have to dive into the JMH internals.

Hope this answers your question.


What Keycloak Is and What It Does

Mar 31, 2023 · Bartłomiej Żyliński

Hi,

Personally I will go with using LDAP only as a store for users and their authentication information. Then I would use Keycloak as an authentication tool.

Here is the documentation on how to configure Keycloak for usage with LDAP.

Single Responsibility Principle: The Most Important Rule in the Software World

Feb 21, 2022 · Bartłomiej Żyliński

Thanks!

What Is Applicative? Basic Theory for Java Developers

Jan 28, 2022 · Bartłomiej Żyliński

Thanks!

You are right A<T> is inconsistent with letter M<T>, I will fix it.

What Keycloak Is and What It Does

Dec 31, 2021 · Bartłomiej Żyliński

Thanks ! Great to hear that.

Good suggestion with Keycloak alternatives. I will cover it in one of my future articles.

What Is a Functor? Basic Theory for Java Developers

Dec 09, 2021 · Bartłomiej Żyliński

Fixed, thanks!

Single Responsibility Principle: The Most Important Rule in the Software World

Nov 07, 2021 · Bartłomiej Żyliński

Firstly, sorry for not making it clear enough but the definition is not mine, it is quoted from Robert C. Martin's Book "Clean Architecture" - I am not brave enough for trying to redefine SRP.

Yes, you are right, “Joe” can be an actor, according to the book actors are entities whose decisions can result in changes inside the system. Such entities can be users, stakeholder, developers working on the code or even some other parts of the system.

If "Joe" is the only person whose decisions may end up in changes inside “Account” class, the class itself is not impacted in any way by the rest of the system and changes inside the class are being done by a single developer then as far as I understand this definition Account is in line with SRP.

On the other hand if there is another user "Bill" who is "Some High manager in transfers division" and needs some changes being done in transfer logic and he does not know about “Joe” existence (or simply “forgets” to inform him about such change). Then “Joe” still uses the "transfer" method not knowing about changes made.

Another example can be when “Joe” needs to make some changes in UI and in transfer logic. UI task goes to a developer (from front-end team) and back-end task goes to another (from transfers team) then we have two actors (developers) whose actions result in changes inside a class. Despite the fact that “Joe” wanted both changes.

Single Responsibility Principle: The Most Important Rule in the Software World

Nov 04, 2021 · Bartłomiej Żyliński

Hi Robert, thanks for your comment !

In general you are right according to the presented definition. Unfortunately there is a catch in all of this. I mentioned it in the paragraph with the database example.

Here the situation is quite similar - the frontend which relies on the HTML display method from Account is just another actor which may affect the class.

So in such a case one have two actors: a group of people interested in the functionalities of the transfer method and a group of people who use data prepared by display method.

In theory one can build the class in such a manner to make it immune to changes requested by frontend actor but if it is really possible is quite a different thing.

Void Methods Considered Anti-Pattern

Jul 26, 2021 · Bartłomiej Żyliński

1. It depends, in some use cases, I mentioned them in the article, voids are must have and "fighting" with them may not be profitable.

2. About how to replace them again it depends - each case should be decided separately.

For long running jobs returning true/false or some enum gives us little more information then using void while on the other hand when we want to update a property of an object it may be better idea to create a new object with this property updated than using setter.

3. About Kotlin - there is a Void type in Java which is responsible for doing exactly that, representing void as a type, but what is really handy here is the Kotlin way of declaring methods.

In my opinion Kotlin way:

fun doSth(...args): Unit

is more descriptive (slightly but still) than Java way:

void doSth(...args)
Void Methods Considered Anti-Pattern

Jul 26, 2021 · Bartłomiej Żyliński

1. Sorry that it took me so long to answer your comment.

2. In my opinion it is very hard to separate void methods from side effects, because side effects are the only reason why void exists. On the other hand side effects are not tight to void methods. Every method can perform any kind of side effect, if it should is another topic.

3. By lack of contract I have meant we have input and output, which holds true for normal methods, while void methods only have input and you have to reason about exact output.

4. I agree with your argument about bad design, but the less "typefull" your API is the easier it is to make it bad.

5. About the tests - as I said in point 2 there are no void methods without side effects so if side effects are harder to test void methods by extension are also harder to test.

6. Now I can see that the code sample may have added more clarity to my arguments.

Sending SMS With Scala

May 24, 2021 · Bartłomiej Żyliński

From what I understand about HIPAA it is more legal matter then code itself.
You have to check what exactly is allowed for such entities while integrating with 3rd party service providers. For sure you will have to add some security checks while implementing some way to interact with outside world.

Beginner's Guide to Compilation in Java

May 18, 2021 · Bartłomiej Żyliński

Thanks. With this "for beginners" it depends, for sure not for people with zero Java knowledge but if you know some basics it can be a good point to start your adventure with JVM.

Beginner's Guide to Compilation in Java

May 07, 2021 · Bartłomiej Żyliński

Thanks

What Is a Monad? Basic Theory for a Java Developer

Jun 24, 2020 · Bartłomiej Żyliński

There are no funny or bad questions. We are here to share knowledge.

In case of monads and functors this explanation sounds very nice.

Functors apply a function to a wrapped value while Monads apply a function that returns a wrapped value to a wrapped value.

Additionally monad require only three things parameterized type M<T> and two functions 'bind' and 'unit' which must have certain signatures.

In case of function signatures monadic ‘bind’ function should return value already wrapped in monad. If you change the signature of functions passed to monad for ‘T->U’ will get compilation error somewhere in ‘bind’ implementation and you will have to implicitly call ‘unit’ function to wrap value in monad.

Secondly, if you decide to change 'bind' signature to ‘(T-> U) = U’ you will lose the possibility to chain function calls and your implementation will no longer be able to satisfy monad laws.


As an example, you can try to use non-monadic hashCode function in the Stream::flatMap ('bind') method you should get a compilation error pointing that hashCode function has an inappropriate signature.

What Is a Monad? Basic Theory for a Java Developer

Jun 23, 2020 · Bartłomiej Żyliński

Hi,

I have never heard of any official naming convention for monadic function names other then unit and bind. I think that the combination of 'of' for 'unit' and 'flatMap' for 'bind' is such standard in case of Java.

I decided to name my function 'map' instead of 'flatMap' because it is more widely use and I thought that 'flatMap' can be misunderstood as the combination of 'map' and 'flatten' operations what is not exactly equivalent of 'bind' function.

In my LogMonad 'map' function is an equivalent of monadic 'bind' which has the following signature (T -> M<U>) = M<U> that is why I decided to implement functions from an ‘Example’ class in such a way.

Bartek

Are you sure?

User has been successfully modified

Failed to modify user

Reputation

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: