Design Patterns: Facade Pattern

“Facade Pattern provides a unified interface that is easier to use for sets of interfaces in a subsytem.”

Photo by Yusuf Evli on Unsplash

Simple Example:
Suppose you are going to build a house and there are lots of steps to achieve this. You need to build walls and a roof, buy furnitures, paint the walls etc…
You may just want to paint the walls as standalone feature in the future,
but it would be good to have an all-in-one package for building a house, as we need a complete house right now.

Real-Life Example:
Suppose you are writing an app and you need to make HTTP…


Design Patterns: Adapter Pattern

“Adapter Pattern converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.”

Photo by Markus Winkler on Unsplash

Simple Example:
Suppose you are traveling from Europe to USA, since there are different outlets being used, you need an adapter/wrapper/converter for you to be able to use your devices.

Real-Life Example:
Suppose you are writing an app and you are using a Kafka client to consume messages from a topic.

This client has methods called consume and produce to read and write messages to a Kafka topic and the broker you are listening…


Design Patterns: Command Pattern

“Command Pattern encapsulates a request as an object, helping us to use it with different requests and support undo operation.”

Photo by Daniel Bradley on Unsplash

Command Pattern is like ordering at a restaurant.

Chef does not hear orders from the client itself, he/she uses a helper.
(like a waiter/waitress)


A journey of scaling for high write throughput

“Technology is the driver, ecommerce is the outcome.”

As Recommendation & Personalization team, we lately have been working very hard to improve our scaling for Recommendations in Trendyol.

We’ve stopped using relational database and transformed our datasource to NoSQL (Couchbase) without losing essential features. We wanted to share our experiences and tell you why and how we did it.

Let’s first start with our legacy design:


A quick guide to releasing resources properly

Go is widely being used for backend programming and its community is growing larger each day. Personally I love coding in Go.
I wanted to show a quick guide on how to gracefully shutdown our Go applications, which is actually a very easy process.

This story is about how to implement graceful shutdown in Go with a
step-by-step guide.
So this story considers you already know why we need to gracefully shutdown our applications from other programming languages.

Signals

A signal is an event generated from UNIX and Linux systems in response to some condition and Go can listen to these…


A quick guide to omitempty, default values and nil

Go is widely being used for backend programming and its community is growing larger each day. Personally I love coding in Go.

Lately I was working on a project that has optional fields in its datasource and needed to manipulate the response based on business needs.
I thought it’d be a good idea to make a small tutorial about it.

Let’s create a simple struct and see the response:


A quick guide to goroutines & channels

Go is widely being used for backend programming and its community is growing larger each day. Most people choose Go because of its easy-to-implement concurrency abilities.

This story is about how to implement concurrency in Go with a step-by-step guide. So this story considers you already know the basics of concurrency from other programming languages.

Why Go?

Lightweight: Creating a goroutine requires only 2 KB of heap space. They grow by allocating and freeing up space as needed. For comparison, Threads get created with 1 MB. A server that processes incoming requests can easily create a goroutine per request.

Doesn’t use OS…


The story of migrating a 1 million throughput domain

“Technology is the driver, ecommerce is the outcome.”

Favorites in Trendyol, most people in Turkey have either used it or heard it.

We’ve stopped using GraphDB and transformed our datasource to NoSQL (Couchbase) without losing essential features. We wanted to share our experiences and tell you why and how we did it.

Let’s first start with our legacy design:


Lately, in our team in Trendyol, we’ve slowly adapted Quarkus for our Java projects, due to its high performance (and we definitely recommend it!).

In this particular API, we wanted to send messages to a topic and we were pretty used to doing it in Spring, but it was our first try in Quarkus.

We’ve spent lots of time getting the hang of it. So I wanted to share how you can implement it and save you the trouble.

Eclipse Microprofile Reactive Messaging (the Reactive Messaging Client which Quarkus’ official documentation uses) didn’t support what we wanted to accomplish.

It…

Emre Tanriverdi

Software Engineer @Trendyol

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store