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 Integration Topics

article thumbnail
Writing an API Wrapper in Golang
This article explores the process of writing an API wrapper in Golang and a few different programming steps to get there.
October 21, 2022
by Nicolas Modrzyk
· 8,379 Views · 1 Like
article thumbnail
iOS Meets IoT: Five Steps to Building Connected Device Apps for Apple
Apple’s flagship device counts a unique operating system — iOS — that should not be ignored in app rollouts for the Internet of Things.
October 21, 2022
by Carsten Rhod Gregersen
· 7,002 Views · 2 Likes
article thumbnail
Building a NestJS Rest API Using Prisma ORM
Learn how to build a NestJS REST API using Prisma ORM.
October 20, 2022
by Saurabh Dashora DZone Core CORE
· 4,769 Views · 2 Likes
article thumbnail
Exceptions in Lambdas
Java streams don't play well with checked exceptions. In this article, take a deep dive into how one can manage such problems.
October 20, 2022
by Nicolas Fränkel
· 13,322 Views · 13 Likes
article thumbnail
Using OAuth in API Integrations With Python, REST, and HL7 FHIR
OAuth can be a good choice for API systems integrations. In this tutorial, learn how it can be achieved in Python with backend systems using REST and HL7 FHIR.
October 19, 2022
by Dariusz Suchojad
· 4,863 Views · 2 Likes
article thumbnail
How To Integrate Grafana in Our Internal Tools/Admin Panels Using AuthProxy
In this tutorial, learn how to integrate Grafana with an internal app using the AuthProxy module of Grafana.
October 19, 2022
by Atharva Ajgaonkar
· 4,307 Views · 1 Like
article thumbnail
IBM App Connect Operators
What is an Operator and why did we create one for IBM App Connect?
October 19, 2022
by Rob Convery
· 4,315 Views · 1 Like
article thumbnail
O11y Guide: Keeping Your Cloud-Native Observability Options Open
Take look at architecture-level choices being made and share the open standards with the open-source landscape.
October 19, 2022
by Eric D. Schabell
· 4,703 Views · 3 Likes
article thumbnail
Edit Someone Else’s Website: contenteditable and designMode
You may be familiar with using DevTools to modify a website's HTML. In this article and video, discover two more tools: contenteditable and designMode.
October 18, 2022
by Austin Gil DZone Core CORE
· 4,064 Views · 1 Like
article thumbnail
An Overview of the Tools for Developing on Flow and Cadence
Smart contract development is a complex process that consists of different vital steps. Find out which tooling provides the most value for Web3 developers.
October 18, 2022
by John Vester DZone Core CORE
· 71,741 Views · 5 Likes
article thumbnail
When Breakpoints Don't Break
Tracepoints (AKA Logpoints) are slowly gaining some brand name recognition. But some still don't know about the whole non-breaking breakpoints family.
October 15, 2022
by Shai Almog DZone Core CORE
· 8,420 Views · 3 Likes
article thumbnail
How to Configure Common Flows in Mule 4 to Reuse Common Functionalities
This tutorial explains how to reuse common functionalities in your implementation flow in Mule 4.
October 13, 2022
by Harsha Ajjampura Shivamurthy
· 8,692 Views · 2 Likes
article thumbnail
Serverless at Scale
The article discusses the architectures currently popular for achieving this Serverless Architecture for Scale use cases and how and when we can use them.
October 12, 2022
by Joyce Thoppil
· 7,241 Views · 4 Likes
article thumbnail
Automate Boring Tasks With Hooks
Sofien, one of GitGuardian's tech leads, describes how pre-commit hooks are used to save time and also secure commits company-wide.
October 11, 2022
by Thomas Segura
· 8,651 Views · 4 Likes
article thumbnail
Geo-Distributed API Layer With Kong Gateway
Learn how to build a geo-distributed API layer with Kong Gateway.
October 11, 2022
by Denis Magda DZone Core CORE
· 9,851 Views · 3 Likes
article thumbnail
Five Ways of Synchronising Multithreaded Integration Tests
A few weeks ago I wrote a blog on synchronizing multithreaded integration tests, which was republished on DZone Javalobby from where it received a comment from Robert Saulnier who quite rightly pointed out that you can also use join() to synchronize a worker thread and its unit tests. This got me thinking, just how many ways can you synchronise multi-threaded integration tests? So, I started counting... and came up with: Using a random delay. Adding a CountDownLatch Thread.join() Acquiring a Semaphore With a Future and ExecutorService Now, I’m not going to explain all the following in great detail, I’ll let the code speak for itself, except to say that all the code samples do roughly the same thing: the unit test creates a ThreadWrapper instance and then calls its doWork() method (or call() in the case of the Future). The unit test’s main thread then waits for the worker thread to complete before asserting that the test has passed. For the sample code demonstrating points 1 and 2 take a look at my original blog on Synchronizing Multithreaded Integration Tests, though I wouldn’t recommend point 1: using a random delay. Thread.join() public class ThreadWrapper { private Thread thread; /** * Start the thread running so that it does some work. */ public void doWork() { thread = new Thread() { /** * Run method adding data to a fictitious database */ @Override public void run() { System.out.println("Start of the thread"); addDataToDB(); System.out.println("End of the thread method"); } private void addDataToDB() { try { Thread.sleep(4000); } catch (InterruptedException e) { e.printStackTrace(); } } }; thread.start(); System.out.println("Off and running..."); } /** * Synchronization method. */ public void join() { try { thread.join(); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } } } public class ThreadWrapperTest { @Test public void testDoWork() throws InterruptedException { ThreadWrapper instance = new ThreadWrapper(); instance.doWork(); instance.join(); boolean result = getResultFromDatabase(); assertTrue(result); } /** * Dummy database method - just return true */ private boolean getResultFromDatabase() { return true; } } Acquiring a Semaphore public class ThreadWrapper { /** * Start the thread running so that it does some work. */ public void doWork() { doWork(null); } @VisibleForTesting void doWork(final Semaphore semaphore) { Thread thread = new Thread() { /** * Run method adding data to a fictitious database */ @Override public void run() { System.out.println("Start of the thread"); addDataToDB(); System.out.println("End of the thread method"); semaphore.release(); } private void addDataToDB() { try { Thread.sleep(4000); } catch (InterruptedException e) { e.printStackTrace(); } } }; aquire(semaphore); thread.start(); System.out.println("Off and running..."); } private void aquire(Semaphore semaphore) { try { semaphore.acquire(); } catch (InterruptedException e) { e.printStackTrace(); } } } public class ThreadWrapperTest { @Test public void testDoWork() throws InterruptedException { ThreadWrapper instance = new ThreadWrapper(); Semaphore semaphore = new Semaphore(1); instance.doWork(semaphore); semaphore.acquire(); boolean result = getResultFromDatabase(); assertTrue(result); } /** * Dummy database method - just return true */ private boolean getResultFromDatabase() { return true; } } With a Future public class ThreadWrapper implements Callable { @Override public Boolean call() throws Exception { System.out.println("Start of the thread"); Boolean added = addDataToDB(); System.out.println("End of the thread method"); return added; } /** * Add to the DB and return true if added okay */ private Boolean addDataToDB() { try { Thread.sleep(4000); } catch (InterruptedException e) { e.printStackTrace(); } return Boolean.valueOf(true); } } public class ThreadWrapperTest { @Test public void testCall() throws ExecutionException, InterruptedException { ThreadWrapper instance = new ThreadWrapper(); ExecutorService executorService = Executors.newFixedThreadPool(1); Future future = executorService.submit(instance); Boolean result = future.get(); assertTrue(result); } } Having listed all these methods, the next thing to consider is which one is the best? In asking that question you have to define the word “best” in terms of best for what? Best for simplicity? Maintainability? Speed or code size? After all Programming the Art of Making the Right Decision. You may have guessed that I don’t like the random delay idea and prefer the use of a CountDownLatch. Thread.join() is a bit old school; remember that the likes of Semaphore and CountDownLatch were written to improve on the original Java threading techniques. ExecutorService seems a little heavy weight for what we need here. At the end of the day the choice of technique really comes down to personal preference. Finally, I’ve listed five ways of synchronizing multi-threaded integration tests; however, if you can think of any others please let me know... The source code for this blog is available on Github.
October 11, 2022
by Roger Hughes
· 9,571 Views · 1 Like
article thumbnail
Transit Gateway With Anypoint Platform
Here we will use the Mulesoft Anypoint platform to attach VPC to the AWS transit gateway to form a single network topology.
October 10, 2022
by Gaurav Dhimate
· 5,055 Views · 2 Likes
article thumbnail
AWS Step Function for Modernization of Integration Involving High-Volume Transaction: A Case Study
The serverless offerings of AWS are getting more and more popular. But it remains a challenge to know them well enough to leverage them properly.
October 9, 2022
by Satyaki Sensarma
· 4,391 Views · 3 Likes
article thumbnail
Message Routing and Topics: A Thought Shift
This article makes some observations on the advancements in real-time, event-driven messaging with hierarchical topics from the MoM perspective.
October 9, 2022
by Giri Venkatesan
· 4,454 Views · 5 Likes
article thumbnail
Decorating Microservices
The Decorator pattern is a great fit for modifying the behaviour of a microservice. Native language support can help with applying it quickly and modularly.
October 7, 2022
by Fabrizio Montesi
· 10,454 Views · 4 Likes
  • Previous
  • ...
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • ...
  • 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
×