Understanding WSDL

Quick Tip: WSDL file should be read from bottom to top

As the name indicates, this single file contains all the information needed to understand a web service, like URL, Req and Response message structure, operations that can be performed on this web service, etc.

Callback Hell and Reactive Patterns

One of the ways that I have better understood the usefulness of a Reactive Streams-based approach is how it simplifies a non-blocking IO call.

This post will be a quick walkthrough of the kind of code involved in making a synchronous remote call. Then, we will demonstrate how layering in non-blocking IO, though highly efficient in the use of resources (especially threads), introduces complications referred to as a callback hell and how a Reactive Streams-based approach simplifies the programming model.

Why Making Driverless Cars Is Hard

The promise of the driverless car is huge: It could free up a lot of time, spare us the need to get a driver’s license, improve road safety, empty our parking lots, or even replace car ownership.

But making self-driving cars is easier said than done. There still are quite a few technological and regulatory puzzles that need to be solved before AVs (autonomous vehicles) can be adopted on a mass scale. Let’s see what they are.

Former npm, Inc. CTO Announces Entropic, a Decentralized Package Registry

CJ Silverio, former CTO of npm Inc., gave a presentation at JSConf EU 2019 in Berlin earlier this month titled “The Economics of Open Source.” More specifically, she discussed the economics of package management as it applies to open source software, based on her unique perspective and experience gained in working for the company that runs the world’s largest JavaScript package registry.

Silverio tells the story of how npm gained official status and characterizes its success as a catastrophe for a centralized package registry and repository. Although centralization has some advantages for usability and reliability, success can be expensive when a centralized service becomes popular. She described the events leading up to npm’s incorporation in 2013. The registry was down more than it was up in October 2013 and npm needed money.

npm’s owner took seed funding from a VC firm and the Node project continued to give npm special privileges. Developers perpetuated this by continuing to use npm, as over time it had come to define developers’ expectations in serving JavaScript packages. Silverio discusses some of the consequences of npm coming under private control, how developers now have no input into registry policies or how disputes are resolved.

Presumably speaking from her intimate knowledge of the company’s inner workings, Silverio describes how VC-funding turned npm Inc. into a financial instrument.

“Financial instruments are contracts about money,” she said. “npm Inc, the company that owns our language ecosystem, is a thing that might as well be a collection of pork bellies, as far as its owners are concerned. They make contracts with each other and trade bits of it around. npm Inc. is a means for turning money into more money.”

Silverio contends that JavaScript’s package registry should not be privately controlled and that centralization is a burden that will inevitably lead to private control because the servers cost money.

Her sharp criticism of centralized package management leads into her announcement of a federated, decentralized package registry called Entropic that she created with former npm colleague Chris Dickinson and more than a dozen contributors. The project is Apache 2.0 licensed and its creators are working in cooperation with the OpenJS Foundation.

Entropic comes with its own CLI, and offers a new file-centric publication API. All packages published to the registry are public and developers are encouraged to use something like the GitHub Package Registry if they need to control access to packages. The project is just over a month old and is not ready for use.

“I think it’s right that the pendulum is swinging away from centralization and I want to lend my push to the swing,” Silverio said. The last decade has been about consolidation and monolithic services, but the coming decade is going to be federated. Federation spreads out costs. It spreads out control. It spreads out policy-making. It hands control of your slice of our language ecosystem to you. My hope is that by giving Entropic away, I’ll help us take our language commons back.”

Silverio’s Economics of Package Management essay is available on GitHub. Check out the video of the presentation from JSConf EU below. If decentralized package management gains momentum and becomes the standard for the industry, this video captures what may become a turning point in the JavaScript ecosystem and a defining moment for the future of the web.

Database Administration on Snowflake

Snowflake is a cloud-based Data Warehouse platform that proudly boasts near zero management. This is part one of a series of articles that will unpack just what that means.

I was recently working for a major UK customer, where the system manager said, “Snowflake says they need Zero Management, but surely that’s just a marketing ploy.” Most Solution Architects use the term “Near Zero Management” which is probably more accurate. However, it got me thinking — is it true?

Excel Sheet From Database Without Use of POJO

This program creates an excel sheet by simply passing a SQL query to the database and replicating the view to the excel grid. It uses similar constructs to the previous program mentioned about Batch insert without using POJO. Consider the code mentioned below.

public class ExcelFIleFromDB {

private String SQL_Query = "Your SQL Query goes here";

private String DB_URL = "jdbc:mysql://localhost:3306/<your SQL database name goes here>";

private Connection con = null;

private PreparedStatement pr_stmt = null;

private ResultSet rs = null;

private ResultSetMetaData rsmd = null;

private String[] column_names = null;

{

Class.forName("com.mysql.jdbc.Driver");

con = DriverManager.getConnection(DB_URL, "<db_user>", "<db_pass>");

pr_stmt = con.prepareStatement(SQL_Query);

rs = pr_stmt.executeQuery();

rsmd = pr_stmt.getMetaData();

}

private ExcelFIleFromDB() throws SQLException, ClassNotFoundException, IOException {

column_names = genColumnNames();

getRowData();

}

private String[] genColumnNames() throws SQLException {

column_names = new String[rsmd.getColumnCount()+1];

if (rsmd.getColumnCount() > 1) {

for (int i = 1; i < rsmd.getColumnCount()+1; i++) {

column_names[i] = rsmd.getColumnName(i);

}

} else if (rsmd.getColumnCount() == 1) {

column_names = new String[rsmd.getColumnCount()];

column_names[rsmd.getColumnCount() - 1] = rsmd.getColumnName(rsmd.getColumnCount());

}

return column_names;

}

private void getRowData() throws SQLException, IOException {

LinkedList<Object[]> lst = new LinkedList<Object[]>();

if (column_names.length > 1) {

while (rs.next()) {

String[] p = null;

StringBuffer row = new StringBuffer();

for (int i = 0; i < column_names.length; i++) {

if (column_names[i] != null) {

String temp = rs.getString(column_names[i]) + ",";

row.append(temp);

}

}

p = row.substring(0, row.length() - 1).split(",");

lst.add(p);

}



} else if (column_names.length == 1) {

System.out.println("invoked value =1 " + column_names[0]);

while (rs.next()) {

if (column_names[0] != null) {

String[] p = null;

String row = rs.getString(column_names[0]) + ",";

p = row.substring(0, row.length() - 1).split(",");

lst.add(p);

}

}



}

addtoList(lst);

}

private void addtoList(LinkedList<Object[]> lst) throws IOException {

 XSSFWorkbook workbook = new XSSFWorkbook();



XSSFSheet spreadsheet = workbook.createSheet("<Your EXCELSHEET NAME GOES HERE>");

XSSFRow row;

Map < String, Object[] > empinfo = new TreeMap < String, Object[] >();

empinfo.put( "1", new Object[] {column_names});

for (int i = 0; i < lst.size(); i++) {

Object[] objArr = lst.get(i);

row = spreadsheet.createRow(i+1);

int cellnum = 0;

for (Object obj : objArr) {



Cell cell = row.createCell(cellnum++);

if (obj instanceof Date) {

cell.setCellValue((Date) obj);

} else if (obj instanceof Boolean) {

cell.setCellValue((Boolean) obj);

} else if (obj instanceof String) {

cell.setCellValue((String) obj);

} else if (obj instanceof Double) {

cell.setCellValue((Double) obj);

}

}

}



FileOutputStream out = new FileOutputStream(new File("<EXEL FILE NAME PATH.xlsx>"));

workbook.write(out);

out.close();



}



public static void main(String[] args) throws SQLException, ClassNotFoundException, IOException {

new ExcelFIleFromDB();

}

}

Explanation

The above program obtains a number of columns of the view generated after a SQL query is executed.
The column names are put into an array if column numbers are >1. The getString method is parameterized to use strings, thus the array is re-iterated for every row obtained after an iteration of the resultset. Therefore the array is accessed from the list and using the enhanced for loop and the data is written to the excel grid.

Google Announces New Translate API v3 Capabilities

Google AutoML Translate was launched last year with the intent of allowing users to translate global content via automated machine learning without needing to learn how to code. The platform's Translate API, which is now in version 3 beta, has some newly announced features which aim to simplify batch translation, while also providing users more control over specific terminology.

Trip Report: Percona Live 2019

I had the opportunity to attend Percona Live in Austin, Texas between May 28 and May 30 along with more than 700 attendees. This was at least the 20th Percona Live event over the past 10+ years held in the U.S. and Europe. Percona Live 2019 Europe will be in Amsterdam September 30 to October 2.

The event began with keynotes from Peter Zaitsev, CEO and Founder of Percona, sharing his thoughts on the current state of Open Source databases. Peter’s presentation wrapped up with the introduction of Percona’s new cloud-native autonomous database initiative (C-NADI).

Integration Testing: What It Is and How to Do It Right

For software to work properly, all units should integrate together and behave correctly.

Integration testing is like inviting your two favorite groups of friends to the same birthday party and hoping they all get along. Will they cooperate and “blend” when they’re all in the same room? The only way to know is to perform an “integration test” by pulling them all together and seeing how they interact with one another.

3 Industries Where AI Is Supercharging the Customer Experience

Artificial Intelligence (AI) has the potential to revolutionize almost every industry, and it’s already seeping its way into most. The technology allows people to work differently and more effectively, providing a better result for the consumer. Another result of AI implementation is an overall better customer experience.

AI is already dramatically changing industries such as manufacturing, retail, and finance. The customer experience, which most have probably realized, is improving. Other sectors are slower to change, but the AI implications are still there. Here’s a look at how artificial intelligence is already improving the customer experience across different verticals and which industry will be next.

How Agile Makes Digital Transformation Possible

Without agility, your company's digital transformation will be much more difficult.

Over the last few years, there has been a drastic increase in the adoption of the agile methodology for project management due to its simplicity and result-oriented approach.

85.9 percent of the developers surveyed in the Developer Survey by Stack Overflow reported using agile in their work.

But today, agile isn't just a tool for efficient project management; it has become a driving framework in the digital transformation of organizations. The modern approach to development enables developers to recheck for uncertainties and modify their goals based on the client's feedback.

What Is Developer Culture?

A developer culture prioritizes the people that make it all happen.
"I can tell how much this story means to you. It makes me wish I could've experienced that with a Development Team."

This is what another Scrum Master told me after we took turns during a recent training to share a success story about a Development Team. I've heard this many times before.

What does this say about Development Teams out there? Why is there such a strong emphasis on the people needed for the process and so little on the people doing the work?

Smart Wearable Device Testing: Main Steps to Cover

Whenever you track your steps or wonder how many hours you’ve slept, smart wearable devices are always handy. The stages described in this article are common for the testing phases of most wearable devices that make it to the market. Also, in this article, we’ll address the device-specific stages based on the type of gear being tested.

In terms of QA, what is more important is how the hardware integrates with the software — and how smooth this interaction is. The faster and more seamless the integration is, all those quality requirements are equally applicable to the wearables’ testing

How to Create a Java Batch Insert Without Using POJO Code

POJO boilerplate code is commonly used over a variety of functions in Java programs, be it comparison using the comparator, comparable interfaces, or something as simple as storing large amounts of data in "Generic Data Structures," like Lists, Sets, Maps, etc.

Yes, it's very difficult to manage it and requires more alterations as the requirements change over time. However, in this situation, no POJO code is used. Let's look at the code below.

How to Build Scalable, Stateful Java Services in Under 15 Minutes

Five years ago when I started tracking media buzz around stateful architectures, I’d see a few articles every month about running stateful containers. That's about when Caitie McCaffrey first shared this awesome presentation about building scalable stateful architectures. Since then, the dominant software paradigm has become functional application design. The actor model and other object-oriented paradigms are still in use, but database-centric RESTful architectures are standard means of building web applications today.

However, the tides are beginning to shift. Due to innovations like the blockchain, growing demand for real-time applications, the digitization of OT assets, and the proliferation of cheap compute resources at the network edge; there’s renewed interest in decentralized application architectures. As such, there’s also been increased focus on stateful applications. For example, at least five Apache Foundation projects (Beam, Flink, Spark, Samza, and TomEE) are touting statefulness as a benefit today. Modern applications communicate across multiple application silos and must span real-world machines, devices, and distributed data centers around the world. Stateful application architectures provide a way to abstract away the logistical effort of state management, thereby reducing development and management effort necessary to operate massive-scale distributed applications.

Build a Scalable, Stateful To-Do List in 15 Minutes or Less

For the rest of this post, I want to disprove the notion that building scalable, stateful applications is a task too complex for everyday Java developers. In order to illustrate how easily a stateful application can be setup, we’ll walk through a tutorial for building a simple to-do list using the Swim platform. You can find all the source code for the to-do list tutorial here on GitHub.

The Unreasonable Effectiveness of SQL in NoSQL Databases: A Comparative Study

The business applications have requirements: take customer orders, deliver customer orders, track shipping, generate inventory report, end of the day/month/quarter business report, generate business dashboards, and more. These requirements evolve slowly. They remain even when you choose a NoSQL database.

On NoSQL databases, challenges are addressed by a multitude of technologies and workarounds. Here are some of them: