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?

The Latest Testing, Deployment, and Maintenance Topics

article thumbnail
Overcoming 5 Common Performance Testing Pain Points
It is no longer about mobile first, but instead about digital everywhere. Organizations need to ensure that their digital experiences reflect the quality of their brand.
December 15, 2016
by Carlo Cadet
· 9,547 Views · 1 Like
article thumbnail
From Solr Master-Slave to the (Solr)Cloud
If you're moving to Solr's distributed search system, there's a lot to keep in mind ranging from indexing differences to testing procedures to keeping ZooKeeper working.
December 15, 2016
by Rafał Kuć
· 7,447 Views · 1 Like
article thumbnail
An Overview of Meta-Monitoring
Meta-monitoring is basically self-service for monitoring. There are several different requirements and methods that should be kept in mind when it comes to meta-monitoring.
December 15, 2016
by Thomas Kurian Theakanath
· 5,666 Views · 2 Likes
article thumbnail
How SAML Authentication Works
This comprehensive guide to SAML covers how the authentication protocol works, how requests are generated and read, and what tools can help you keep projects secure.
December 15, 2016
by Prosper Otemuyiwa
· 90,157 Views · 12 Likes
article thumbnail
Test Automation Best Practices
Test automation is the most efficient and effective means of test execution. Best practices coupled with automated testing creates an essential component for successful deployment.
December 14, 2016
by Sanjay Zalavadia
· 18,192 Views · 12 Likes
article thumbnail
Deploying Microservices: Spring Cloud vs. Kubernetes
When it comes to deploying microservices, which is better — Spring Cloud or Kubernetes? The answer is both, but they shine in different ways.
December 13, 2016
by Bilgin Ibryam
· 195,110 Views · 104 Likes
article thumbnail
Making Elasticsearch in Docker Swarm Truly Elastic
Running a truly elastic Elasticsearch cluster on Docker Swarm is hard. Here's how to get past Elasticsearch and Docker's pitfalls with IP addresses, networking, and more.
December 13, 2016
by Stefan Thies
· 13,528 Views · 14 Likes
article thumbnail
How to Build You Own Personal Jenkins CI Server
There are tons of benefits to running a personal CI server, including that it can prioritize your own branches and builds and that you can build and deploy while failing tests.
December 13, 2016
by Matthew Casperson
· 33,885 Views · 1 Like
article thumbnail
9 Reasons Why a Developer Wouldn't Write Unit Tests
Unit tests provide quick feedback on code, can speed up the release pipeline, and much more. Why would a developer not want to write unit tests at all?
December 12, 2016
by Joe Wolf
· 17,415 Views · 17 Likes
article thumbnail
How Small Should Microservices Be?
There are tons of different perspectives regarding the best size and granularity of microservices. Which perspective is best for your project?
December 12, 2016
by Grygoriy Gonchar
· 15,903 Views · 8 Likes
article thumbnail
Technical Spikes in DevOps
The true technical spike is a last resort and happens as infrequently as possible. It is a refinement activity that allows the backlog to be understood for future planning.
December 12, 2016
by $$anonymous$$
· 13,653 Views · 1 Like
article thumbnail
Node.js Performance Showdown
Let's pit different frameworks against each other and see who comes out on top.
December 12, 2016
by Alex Ogier
· 12,478 Views · 2 Likes
article thumbnail
Mastering the Couchbase N1QL Shell: Connection Management and Security
Couchbase's cbq shell lets you write and run N1QL queries interactively. The shell also lets you securely interact with mixed nodes, among other handy tricks.
December 9, 2016
by Isha Kandaswamy
· 8,348 Views · 5 Likes
article thumbnail
The Future of Continuous Testing
The smaller the device, the more complex the device build. This yields more value in testing concepts and procedures.
December 9, 2016
by Francis Adanza
· 8,217 Views · 1 Like
article thumbnail
How to Test HTTP Clients Using the Spark Micro-Framework
Spinning up heavyweight web or application servers adds complexity and slows tests down, but using the Spark micro-framework can make things easier and speed things up.
December 9, 2016
by Scott Leberknight
· 11,403 Views · 1 Like
article thumbnail
ConcurrentHashMap isn't always enough
When Java developers come to a task of writing a a new class which should have a Map datastructure field, accessed simultaneously by several threads, they usually try to solve the synchronization issues invloved in such a scenario by simply making the map an instance of ConcurrentHashMap . public class Foo { private Map theMap = new ConcurrentHashMap<>(); // the rest of the class goes here... } In many cases it works fine just because the contract of ConcurrentHashMap takes care of the potential synchronization issues related to reading/writing to the map. But there are cases where it's not enough, and a developer gets race conditions which are hard to predict, and even harder to find/debug and fix. Let's have a look, at the next example: public class Foo { private Map theMap = new ConcurrentHashMap<>(); public Object getOrCreate(String key) { Object value = theMap.get(key); if (value == null) { value = new Object(); theMap.put(key, value); } return value; } } Here we have a "simple" getter ( getOrCreate(String key) ), which gets a key and returns the value assosiated with the given key in theMap . If there is no mapping for the key, the method creates a new value, inserts it into theMap and returns it. So far so good. But what happens when 2 (or more) threads call the getter with the same key when there is no mapping for the key in theMap? In such a case we might receive a race condition: Suppose thread t1 enters the function and comes to line 7. Its value is null . At this point thread t2 enters the function and also comes to line 7. Its value is also obviously null . Therefore from this point the two threads will enter the if statement and execute lines 8 and 9, thus creating two different new Objects. Upon returning from the getter each thread will get a different Object instance, violating programmer's wrong assumption that by using ConcurrentHashMap "everything is synchronized" and therefore two different threads should get the same value for the same key. To solve this issue we can synchronize the entire method, thus making it atomic: public class Foo { private Map theMap = new ConcurrentHashMap<>(); public synchronized Object getOrCreate(String key) { Object value = theMap.get(key); if (value == null) { value = new Object(); theMap.put(key, value); } return value; } } But this is a bit ugly, and uses Foo instace's monitor, which may affect performance if there are other methods in this class which are synchronized. Also a common rule of thumb is to try to eliminate using synchronized methods as much as possible. A much better approach should be using Java 8 Map's computeIfAbsent(K key, Function mappingFunction), which, in ConcurrentHashMap's implementation runs atomically: public class Foo { private Map theMap = new ConcurrentHashMap<>(); public Object getOrCreate(String key) { return theMap.computeIfAbsent(key, k -> new Object()); } } The atomicity of computeIfAbsent(..) assures that only one new Object will be created and put into theMap, and it'll be the exact same instance of Object that will be returned to all threads calling the getOrCreate function. Here, not only the code is correct, it's also cleaner and much shorter. The point of this example was to introduce a common pitfall of blindly relying on ConcurrentHashMap as a majical synchronzed datastructure which is threadsafe and therefore should solve all our concurrency issues regarding multiple threads working on a shared Map. ConcurrentHashMap is, indeed, threadsafe. But it only means that all read/write operations on such map are internally synchronized. And sometimes it's just not enough for our concurrent environment needs, and we have to use some special treatment which will guarantee atomic execution. A good practice will be to use one of the atomic methods implemented by ConcurrentHashMap, i.e: computeIfAbsent(..), putIfAbsent(..), etc.
December 8, 2016
by Dima Leah
· 48,029 Views · 12 Likes
article thumbnail
Creating Maps With Named Lambdas
Learn how you can create a Java Map like this: map = mapOf(one -> 1, two -> 2) using a trick to get the lambda parameter name.
December 7, 2016
by Per-Åke Minborg
· 23,194 Views · 49 Likes
article thumbnail
Antipattern of the Month: Cherry Picking
The best DevOps teams exhibit a high level of cross-skilling, and cherry-picking often occurs in teams in which the members are not cross-trained. Read on to learn more.
December 7, 2016
by $$anonymous$$
· 9,834 Views · 4 Likes
article thumbnail
How to Compose an Infinispan Docker Image
Read on to explore how to create multicontainer Docker applications involving Infinispan with the help of Docker Compose.
December 7, 2016
by Manik Surtani
· 7,042 Views · 3 Likes
article thumbnail
Top 5 Factors That Impact Your Software Performance
Knowing where your software is failing is essential to identifying the bottleneck. These five performance-impacting factors give you a good place to start.
December 7, 2016
by Thamwika Bergstrom
· 6,644 Views · 3 Likes
  • Previous
  • ...
  • 482
  • 483
  • 484
  • 485
  • 486
  • 487
  • 488
  • 489
  • 490
  • 491
  • ...
  • Next

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: