MongoDB and the fine art of data modeling
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
Introduction
This is the third part of our MongoDB time series tutorial, and this post will emphasize the importance of data modeling. You might want to check the first part of this series, to get familiar with our virtual project requirements and the second part talking about common optimization techniques.
When you first start using MongoDB, you’ll immediately notice it’s schema-less data model. But schema-less doesn’t mean skipping proper data modeling (satisfying your application business and performance requirements). As opposed to a SQL database, a NoSQL document model is more focused towards querying than to data normalization. That’s why your design won’t be finished unless it addresses your data querying patterns.
A beginner’s guide to MongoDB performance turbocharging
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
Introduction
This is the second part of our MongoDB time series tutorial, and this post will be dedicated to performance tuning. In my previous post, I introduced you into our virtual project requirements.
In short, we have 50M time events, spanning from the 1st of January 2012 to the 1st of January 2013, with the following structure:
{ "_id" : ObjectId("52cb898bed4bd6c24ae06a9e"), "created_on" : ISODate("2012-11-02T01:23:54.010Z") "value" : 0.19186609564349055 }
We’d like to aggregate the minimum, the maximum, and the average value as well as the entries count for the following discrete time samples:
- all seconds in a minute
- all minutes in an hour
- all hours in a day
MongoDB time series: Introducing the aggregation framework
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
In my previous posts I talked about batch importing and the out-of-the-box MongoDB performance. Meanwhile, MongoDB was awarded DBMS of the year 2013, so I therefore decided to offer a more thorough analyze of its real-life usage.
Because a theory is better understood in a pragmatic context, I will first present you our virtual project requirements.
Introduction
Our virtual project has the following requirements:
- it must store valued time events represented as v=f(t)
- it must aggregate the minimum, maximum, average and count records by:
- seconds in a minute
- minutes in an hour
- hours in a day
- days in a year
- the seconds in a minute aggregation is calculated in real-time (so it must be really fast)
- all other aggregations are calculated by a batch processor (so they must be relatively fast)
A beginner’s guide to ACID and database transactions
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
Introduction
Transactions are omnipresent in today’s enterprise systems, providing data integrity even in highly concurrent environments. So let’s get started by first defining the term and the context where you might usually employ it.
A transaction is a collection of read/write operations succeeding only if all contained operations succeed.
Inherently a transaction is characterized by four properties (commonly referred as ACID):
- Atomicity
- Consistency
- Isolation
- Durability
Asciidoctor for collaborative book writing
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
I’ve been searching for the most suitable tools I’d use for my book writing process and I’ve settled for Asciidoctor.
In the first place, I decided to use a markup text language that’s implicitly supported by GitHub, and after reviewing Markdown and Asciidoc, I opted for the latter for it offers a richer syntax.
An open Java Transaction book
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
We live in a world of both commercial and open-source software, each one having strengths and weaknesses. But when it comes to books, there hasn’t been any noticeable revolution towards embracing new writing methodologies. The current book market shares the same philosophy with commercial software business model. There is a fee for obtaining a book copy, evolution is rather slow and usually, there is a single person carrying all the weight of writing. It’s worth noticing that this model offers only the author’s point of view on a particular subject.
Yet, there is nothing wrong with the classic book writing process, but that doesn’t mean it has to be the only way of conceiving a book.
Why not embrace the open-source philosophy for writing books too? There are advantages to such an endeavor:
- the writing effort could be split among multiple domain connoisseurs
- there is no dead-line pressure, meaning you can write as much as your spare time allows you to
- we can constantly improve the book, in a similar way with software releases: 1.0.0, 1.1.0, 2.0.0
- the book is available from day one, and it can constantly be reviewed and enhanced using the Agile methodologies
I am taking this idea very seriously and therefore I decided to write my first open book, entitled “Unfolding Java Transactions”. I will use GitHub to manage the writing version management.
Good vs Bad Leader
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
Software is more about people than technology. When I graduated from college, I thought I only had to master technical skills to be a great developer, thinking that people skills are the appanage of managers solely. But experience taught me a good lesson on this one. Whenever I hear that people skills can’t be acquired, and you have to be a born with them, I just beg to differ.
Nobody is born with any given skill, we learn through observation and by copying others (our role-models). You might get some valuable info from reading books on this subject, but I remember an old saying, scribbled on the cover of a book I read in my teens: “Life is not learned from books, but by living it.”
If you feel you’re having troubles dealing with people, then you only have to watch and learn. It’s as simple as that. Even if you are not currently leading anyone, it pays off learning how to handle people, especially in our people-centric industry.
While meeting great leaders has always been a wonderful experience, it is the bad ones that really enforce the true values of a leadership. I’ve been lucky in this sense, as I got the chance to meet some of the worst leaders you can possibly imagine. Let’s see how a good leader compares to a bad one.
NoSQL is not just about BigData
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
Introduction
There is so much debate on the SQL vs NoSQL subject, and probably this is our natural way of understanding and learning what’s the best way of storing data. After publishing the small experiment on MongoDB aggregating framework, I was challenged by the JOOQ team to match my results against Oracle. Matching MongoDB and Oracle is simply honoring Mongo, as Oracle is probably the best SQL DB engine. Being a simple experiment, it’s dangerous to draw any conclusion, since I was only testing the out-of-the-box Mongo performance, without taking advantage of any optimization. I will leave the optimization part as a subject of a future post, and dedicate this post to why NoSQL is a great tool in the Architect’s toolbox.
I really like how JOOQ defends SQL, and I’m constantly learning a lot from their blog and JOOQ documentation. SQL is one of the best ways of modeling data, and most of my projects requirements call for a relational data model. I would always recommend Oracle vs any other free RDBMS, since it’s safer to go with the best available tool, but not all of our clients want to spend their money on Oracle licenses, and therefore we have to build their products on top of MySQL or PostgreSQL (not a big issue so far).
MongoDB Facts: Lightning fast aggregation
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
In my previous post, I demonstrated how fast you can insert 50 millions time-event entries with MongoDB. This time, we will make use of all that data to fuel our aggregation tests.
Why I like Spring bean aliasing
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
Spring framework is widely used as a dependency injection container, and that’s for good reasons. First of all, it facilitates integration testing and it gives us the power of customizing bean creation and initialization (e.g. @Autowired for List types).
But there is also a very useful feature, that might get overlooked and therefore let’s discuss about bean aliasing.
Bean aliasing allows us to override already configured beans and to substitute them with a different object definition. This is most useful when the bean definitions are inherited from an external resource, which is out of our control.
In the following example, I will show you how bean aliasing works. Let’s start with the following bean definition, coming from the src/main/resources/spring/applicationContext-tx.xml configuration file.