Processing a considerable number of large XML files may require a lot of memory and processing power. With Rust, we can create applications that process huge XML files with a relatively small memory footprint yet are still performant. This post
(Bad Practice) Wait Until All Threads Complete Execution in Java
This post shows an example of a bad practice I saw in one of my Java projects seven years ago. It also has a naive implementation of concurrency in Java, wherein it waits for all threads to complete. Moreover, it
AWS Copy Files Manually From S3 to EC2
Oftentimes, we would want to manually copy files from an S3 to an EC2 instance in AWS. This is possible but requires several steps and some configuration. 1. Create IAM Role For EC2 Instances First, create a new role. This
Migrate from MySQL to PostgreSQL Using Pgloader Docker Container
This post shows how to migrate a database from MySQL to a PostgreSQL instance running on Windows using the pgloader (running as a Docker container) to perform the migration from MySQL to PostgreSQL. From within the container, we use docker.for.win.localhost
Kotlin – SOAP Web Service
This post demonstrates how to create a simple SOAP-based Web Service with Kotlin.
Kotlin – SOAP Web Service Client Example
This post shows how to consume a SOAP Web Service using a client application in Kotlin. Although we need Java, we code everything in Kotlin. Create a SOAP Web Service in Kotlin Before creating a SOAP Web Service in Kotlin,
Very Slow XML Validation against XSDs with unique and key elements
This post shows that XML XSD validation with <xs:unique> is very slow, especially for a huge list of elements, e.g., 300,000 items. We are better off ensuring distinct values through Java codes. The problem also applies to <xs:key>. Worse, we can
Xerces C++: Validate Slow XML Validation Against XSD With Unique And Key Elements
We have encountered a performance issue with Java validating an XML with 300,00 elements against an XSD with <xs:unique> and <xs:key>. This post uses Xerces C++ to parse and validate a huge XML against an XSD with those elements. Also,
Get First And Last Dates Of Current Quarter Using Joda Time
This post shows how to come up with the first and last dates of the current quarter using Joda time. Although we can do it in Java 8 and above using the Time API, Joda Time is an alternative. Joda
Truncate MySQL Tables Before DBUnit Loads Data
This post shows how to truncate a table in MySQL before DbUnit loads data via @DatabaseSetup. Truncating the tables in the @Before method does not work because DBUnit loads the data first via @DatabaseSetup before delegating calls to a @Before