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
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

The Latest Performance Topics

article thumbnail
How to Load Test With Gatling and Taurus
Gatling and JMeter have different features based on what you're looking for, but they're not without their disadvantages. Taurus can help fill in the gaps.
February 3, 2017
by Noga Cohen
· 15,863 Views · 3 Likes
article thumbnail
9 Benefits of Continuous Integration
CI and CD enable teams to safely build, test, and deploy code. Automating testing through Continuous Integration increases code quality.
February 1, 2017
by Job van der Voort
· 73,008 Views · 8 Likes
article thumbnail
Gatling: A Lightweight Load Testing Tool
Gatling consumes fewer system resources to run a load test than other options. It works asynchronously if the underlying HTTP request is nonblocking.
February 1, 2017
by Siva Prasad Rao Janapati
· 6,153 Views · 3 Likes
article thumbnail
How to Load Test OpenId Secured Websites
OpenId enables users to be authenticated using a single ID. The OpenId provider (OP) is the third party that authenticates a user signing in with an identificator.
January 22, 2017
by Konsantine Firsanov
· 9,308 Views · 3 Likes
article thumbnail
Java Performance Monitoring: 5 Open Source Tools You Should Know
Stagemonitor, Pinpoint, MoSKito, Glowroot, and Kamon are all promising open source Java monitoring tools. See where they can be best put to use.
January 19, 2017
by Henn Idan
· 92,799 Views · 39 Likes
article thumbnail
REST vs. TCP
With HTTP, each call is stateless and I can’t assume anything about the other side. With TCP, on the other hand, I can make a lot of assumptions about the conversation.
January 19, 2017
by Oren Eini
· 22,985 Views · 6 Likes
article thumbnail
Evicting Instances From Eureka
Spring Cloud Eureka's self-preservation tool is great for network problems, but it could keep your instances around when you don't want to. Fortunately, you can fix that.
January 10, 2017
by Ryan Baxter
· 9,483 Views · 2 Likes
article thumbnail
Gatling vs. JMeter
What's the max amount of threads you can run with each tool before you start getting errors or saturating a basic resource? Is there significantly different resource use?
January 10, 2017
by Federico Toledo
· 52,366 Views · 19 Likes
article thumbnail
An Introduction to Load Testing With Gatling
A new open source weapon for load testing has emerged, (Gatling) guns blazing!
Updated January 4, 2017
by Sree Tejaswi
· 29,478 Views · 22 Likes
article thumbnail
How to Resolve an SSL Handshake Error With Mule
With these tips, you should be good sending requests to your Mule application again.
January 1, 2017
by Akkiraju Ivaturi
· 15,743 Views · 1 Like
article thumbnail
Hacking the VPC: ELB as a Bastion
Keeping your cloud machine instances secure is of paramount importance, but it's often hard to troubleshoot and expensive. An Elastic Load Balancer can help with that.
December 26, 2016
by Keith Gregory
· 17,458 Views · 3 Likes
article thumbnail
Server Log Analysis: It's More Important Than Google Analytics
This article discusses the significance of analyzing the server logs. The author also demonstrates a server log dashboard created using the open source ELK Stack of Elasticsearch, Logstash, and Kibana.
December 23, 2016
by Samuel Scott
· 16,131 Views · 8 Likes
article thumbnail
A Deep Dive Into Couchbase N1QL Query Optimization
This comprehensive guide to N1QL queries covers the ins and outs of the query engine, teaching users about how to efficiently scan and join data.
December 16, 2016
by Keshav Murthy DZone Core CORE
· 16,848 Views · 9 Likes
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,928 Views · 2 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,897 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,740 Views · 12 Likes
article thumbnail
Anomaly Detection Using H2O Deep Learning
In this article, we jump straight into creating an anomaly detection model using Deep Learning and anomaly package from H2O.
December 6, 2016
by Sibanjan Das
· 25,744 Views · 7 Likes
article thumbnail
Camel and Kura: Providing Telemetry Data as OPC UA
If you're using an industrial M2M protocol, consider the combined power of Camel and Kura to get your telemetry data squared away as OPC UA.
November 29, 2016
by Jens Reimann
· 6,034 Views · 3 Likes
article thumbnail
Working With Time-series Data on Redshift
Working with data ordered in time has some unique challenges that we should take into consideration when we design our data warehouse solution.
November 23, 2016
by George Psistakis
· 8,572 Views · 3 Likes
article thumbnail
5 Exceptional Regression Testing Tools
Open-source tools are free, but we need to look at the bigger picture. Check out this list of five regression testing automation tools for enterprises.
November 22, 2016
by Pratik Satasiya
· 50,784 Views · 9 Likes
  • Previous
  • ...
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • ...
  • Next
  • 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
×