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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library
Core Badge
Avatar

Hüseyin Akdoğan

DZone Core CORE

Software Craftsman

Istanbul, TR

Joined Jul 2013

https://linktr.ee/hakdogan

About

Backend engineer with 20+ years of enterprise Java experience. Since 2005, I have builtenterprise systems, led teams, and delivered training and consultancy on Java runtimessuch as Spring and Quarkus, as well as messaging, reactive and data technologies. Most recently, I have focused on Identity and Access Management built on Keycloak,working on authorization infrastructure, Java SDKs and large-scale identity migrations,and contributing upstream to the Keycloak project. Across all of this work, I care aboutsoftware craftsmanship: understanding complex systems, solving problems at scale andimproving engineering practices. I am one of the leaders of JUG İstanbul, a frequent conference speaker, and the author of Elasticsearch Indexing. I follow the evolution of the Java platform closely, includingOpenJDK projects Loom, Valhalla, Amber, Panama and Leyden.

Stats

Reputation: 873
Pageviews: 541.2K
Articles: 17
Comments: 2
  • Articles
  • Comments

Articles

article thumbnail
HTTP QUERY Method Explained: RFC 10008, Ecosystem Adoption, and a Quarkus Implementation
RFC 10008's new QUERY method is safe and cacheable like GET but carries content like POST. This article explains the spec and runs it on Quarkus today.
August 6, 2026
· 2,566 Views · 2 Likes
article thumbnail
DPoP: What It Is, How It Works, and Why Bearer Tokens Aren't Enough
Bearer tokens grant access to anyone who holds them. DPoP fixes this by binding each token to a cryptographic key pair: every request must include a signed proof.
March 12, 2026
· 3,800 Views
article thumbnail
Stream Gatherers: Intro to Intermediate Operations Modeler
Gatherers is a new and powerful API that enhances the Stream API by modeling intermediate operations and allowing the definition of custom intermediate operations.
March 19, 2025
· 10,001 Views · 3 Likes
article thumbnail
How to Keep Elasticsearch in Sync with Relational Databases?
Hibernate Search is a library that allows keeping your local Lucene indexes or ElasticSearch cluster in sync with your database
December 8, 2020
· 9,711 Views · 3 Likes
article thumbnail
How to Call the Next Handler in Vert.x
We quickly go over how to use Java and Vert.x to limit the amount of traffic handled by our application.
Updated June 5, 2019
· 7,442 Views · 4 Likes
article thumbnail
How to Create a Builder Image With S2I
For the eaiser crafting of Docker images from source code.
Updated November 20, 2018
· 18,628 Views · 2 Likes
article thumbnail
How to Share Data Between Threads in Vert.x
Want to learn more about how to share data between threads in Vert.x? Click here to learn more about multi-threading in Java.
October 31, 2018
· 15,397 Views · 6 Likes
article thumbnail
How to Run Blocking Code in Vert.x
Want to learn how to run blocking code in Vert.x? Check out this post to learn more about blocking code and synchronous APIs.
Updated October 8, 2018
· 24,322 Views · 3 Likes
article thumbnail
How to Run a Vert.x Cluster With Broadcasting Messaging
Learn how to work with multiples verticles in Vert.x clusters between multiple applications in a clustered environment.
August 7, 2018
· 9,738 Views · 2 Likes
article thumbnail
How to Work With Multiple Verticles and Communication in Vert.x
Want to learn more about working with multiple verticles and point-to-point messaging in Vert.x? Check out this tutorial to learn more!
July 25, 2018
· 17,997 Views · 1 Like
article thumbnail
An Introduction to Eclipse Vert.x
Want to learn more about Eclipse Vert.x? Check out this post on the Eclipse Vert.x toolkit for developing reactive applications on JVM.
July 17, 2018
· 19,795 Views · 7 Likes
article thumbnail
End-to-End Tutorial for Continuous Integration and Delivery by Dockerizing a Jenkins Pipeline
Learn how to implement container technologies with your Jenkins CI/CD workflows to make them easier to manage in this tutorial.
November 30, 2017
· 32,802 Views · 15 Likes
article thumbnail
How Does Elasticsearch Real-time Search?
Compared to other features, real-time search capability is undoubtedly one of the most important features in Elasticsearch. Today we’ll look closely how is provided real-time search by Elasticsearch. Real time First of all, if we need to explain the concept of real-time, in general, we can say that the delay between input and out time in the information is small at real-time systems. This means, data is taken without data accumulation, processed in real time. Today, the best solution Elasticsearch known for real-time search, when a record is added to it for storage makes it searchable in 1 second. How? As is known, the disks are able to create a risk of bottleneck for I/O operations at the data persistence step. Also some mechanisms used for prevent any loss of data increases cost of time. At this point Elasticsearch uses the file-system cache that sitting between itself and the disk for overcome the risk of bottleneck and ensure the a new document can be searched in real time. A new segment is written to the file-system cache first and only later it flushed to disk by Elasticsearch. This lightweight process of writing and opening a new segment is called a refresh in Elasticsearch. By default, all shards is refreshed automatically once every second. In this way, Elasticsearch support real-time search. Test time Above digression about the time of refresh of the shards you can bring to mind the following questions: What happens, when a new document is requested in less than 1 second time? Can be documents requested, without having to depend of the refresh period shards of managed by Elasticsearch? Short answers. Elasticsearch does not return the document. Yes. Now let’s get clarity on this issue is a simple example. hakdogan$ curl -XPUT localhost:9200/kodcucom/document/1 -d'{ > "title": "Document A" > }' We sent a document to Elasticsearch. The index name is kodcucom, type document, id value 1. The title field is only field in the document and the value of "Document A". Let’s take this document from Elasticsearch. hakdogan$ curl -XGET localhost:9200/kodcucom/document/1?pretty { "_index" : "kodcucom", "_type" : "document", "_id" : "1", "_version" : 1, "found" : true, "_source":{ "title": "Document A" } } As expected, the document was returned to us. Well, if we keep short the time between document recording and get request than default shard refresh time what will happen? Let’s see. hakdogan$ curl -XPUT localhost:9200/kodcucom/document/2 -d'{"title": "Document B"}'; curl -XGET localhost:9200/kodcucom/_search?pretty {"_index":"kodcucom","_type":"document","_id":"2","_version":1,"created":true}{ "took" : 38, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 1.0, "hits" : [ { "_index" : "kodcucom", "_type" : "document", "_id" : "1", "_score" : 1.0, "_source":{ "title": "Document A" } } ] } } As can be seen, only the previous document was returned to us by Elasticsearch when we do concurrently create and get request. Well, how can I get the document concurrently? Let’s see. hakdogan$ curl -XPUT localhost:9200/kodcucom/document/3 -d'{"title": "Document C"}'; curl -XGET localhost:9200/kodcucom/_refresh; curl -XGET localhost:9200/kodcucom/_search?pretty {"_index":"kodcucom","_type":"document","_id":"3","_version":1,"created":true}{"_shards":{"total":10,"successful":5,"failed":0}{ "took" : 3, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 3, "max_score" : 1.0, "hits" : [ { "_index" : "kodcucom", "_type" : "document", "_id" : "1", "_score" : 1.0, "_source":{ "title": "Document A" } }, { "_index" : "kodcucom", "_type" : "document", "_id" : "2", "_score" : 1.0, "_source":{"title": "Document B"} }, { "_index" : "kodcucom", "_type" : "document", "_id" : "3", "_score" : 1.0, "_source":{"title": "Document C"} } ] } } In this command, we perform to refresh operation on kodcucom index before the search request. In this way, the document was returned to us. Auto refresh time can be changed. By setting the index.refresh_interval parameter in the configuration file. Applies to all indices in the cluster. A per-index basis by updated index setting. In addition to these, you can turn off automatic refresh. An important point to keep in mind about the refresh time of the shards, the refresh operation is costly in terms of system resources. If you wished to make changes to the auto-refresh time, this situation should be taken into account. Extension of the automatic refresh time, enables faster indexing but new documents and changes made to the existing documents will not appear in searches during specified period of time.
November 25, 2014
· 17,653 Views
article thumbnail
How to Integrate Apache Shiro into a Web Application
Apache Shiro can be used in a wide range of applications as part of the Java Security Framework.
November 4, 2013
· 39,530 Views · 2 Likes
article thumbnail
ElasticSearch: Java API
ElasticSearch provides Java API, thus it executes all operations asynchronously by using client object.
September 30, 2013
· 137,756 Views · 4 Likes
article thumbnail
Introduction to ElasticSearch
Learn about ElasticSearch, an open source tool developed with Java. It is a Lucene-based, scalable, full-text search engine, and a data analysis tool.
September 17, 2013
· 12,113 Views · 5 Likes
article thumbnail
NoSQL with JPA
EclipseLink, reference implementation of JPA, has JPA support for NoSQL databases (MongoDB and Oracle NoSQL) as of the version 2.4. In this tutorial we will discuss the use of MongoDB database with the JPA support of EclipseLink. The transaction previously done using the console and native java driver will be done in a web application with the help of EclipseLink. Tools and technologies used in the sample application are as follows: MongoDB version 2.4.1 MongoDB Java Driver version 2.11.1 JSF version 2.2 PrimeFaces version 3.5 EclipseLink version 2.4 Jetty 7.x Maven Plugin JDK version 1.7 Maven 3.0.4 Project Dependencies org.glassfish javax.faces 2.2.0-SNAPSHOT org.primefaces primefaces 3.5 org.primefaces.themes bootstrap 1.0.10 org.eclipse.persistence org.eclipse.persistence.jpa 2.4.0-SNAPSHOT org.eclipse.persistence org.eclipse.persistence.nosql 2.4.0-SNAPSHOT jboss jboss-j2ee 4.2.2.GA org.mongodb mongo-java-driver 2.11.1 commons-fileupload commons-fileupload 1.3 Entity Class @Entity @NoSql(dataFormat=DataFormatType.MAPPED) public class Article implements Serializable { public Article() { } @Id @GeneratedValue @Field(name="_id") private String id; @ElementCollection private List categoryLists = new ArrayList(); @Basic private String title; @Basic private String content; @Basic @Temporal(javax.persistence.TemporalType.DATE) private Date date; @Basic private String author; @ElementCollection private List tagLists = new ArrayList(); @NoSQL notation sets the data format and type and maps the NoSQL data. Because of using MongoDB in our sample application and documents in MongoDB stored in BSON format, MAP is used as data type. @ElementCollection notation maps the embedded collection into the parent document. Because more than one category and tag associated with an article would be a matter in our sample application, we map them as an element collection. Embedded Objects @Embeddable @NoSql(dataFormat=DataFormatType.MAPPED) public class Categories implements Serializable { @Basic private String category; @Embeddable @NoSql(dataFormat=DataFormatType.MAPPED) public class Tags implements Serializable { @Basic private String tag; We see @Embeddable notation at the top of the Categories and Tags’ class unlike Article entity class. The documents stored in the parent document are mapped with this notation. Please note that embedded objects do not need unique field. persistence.xml com.kodcu.entity.Article com.com.kodcu.entity.Categories com.kodcu.entity.Tags CRUD Operations index.xhtml MyBean.java public void saveArticle() { em.getTransaction().begin(); if(null == article.getId()) em.persist(article); else em.merge(article); em.getTransaction().commit(); } public void removeArticle() { em.getTransaction().begin(); em.remove(selectArticle); em.getTransaction().commit(); } 6. Demo Application Real content above and the demo application, can be accessed at NoSQL with JPA
August 6, 2013
· 31,839 Views · 1 Like

Comments

How to Integrate Apache Shiro into a Web Application

Nov 13, 2019 · Hüseyin Akdoğan

Hi @Lova,

Partially.

Yes, you can use Shiro with Spring MVC but why? Spring Security recommended when using MVC.

Also, Shiro updated many times after this article, so it's older.

ElasticSearch: Java API

Jun 21, 2017 · Hüseyin Akdoğan

Hi Aseed.

This post about to the old version of the ES. You can get the running examples of the article from this repository: https://github.com/hakdogan/elasticsearch

Note that, this code may also be incompatible with the current version.

User has been successfully modified

Failed to modify user

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

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 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook