API Autodiscovery in Mule3

What Is API Autodiscovery?

We use API Autodiscovery to pair an API in API Manager to its deployed Mule application.

When autodiscovery is correctly configured in your Mule application, you can say that your application’s API is tracked by or paired to API Manager. Through the Autodiscovery scheme, the API Manager keeps track of the API throughout its lifecycle.

Automattic Acquires Tumblr, Plans to Rebuild the Backend Powered by WordPress

Automattic has acquired Tumblr, a long-time friendly rival company, for an undisclosed sum. Just six years after Yahoo acquired Tumblr for $1.1 billion, the company is said to have been acquired for “a nominal amount” from Verizon, who indirectly acquired Tumblr when it bought Yahoo in 2017.

Automattic CEO Matt Mullenweg declined to comment on the financial deals of the acquisition, but a source familiar to Axios puts the deal “well south of $20 million.”

Tumblr is Automattic’s biggest acquisition yet in terms of product users and employees gained. The microblogging and social networking website currently hosts 475.1 million blogs, for which Automattic will now assume operating costs. All 200 of Tumblr’s employees will be moving over to Automattic, bringing the company’s total employee count over 1,000.

Mullenweg took to the Post Status community Slack channel for an impromptu Q&A this afternoon where he discussed more of Automattic’s plans for Tumblr. He outlined a brief roadmap for Tumblr’s future that includes re-architecting its backend with WordPress:

  1. Move infrastructure off Verizon
  2. Support same APIs on both WP.com and Tumblr
  3. Switch backend to be WP
  4. Open source Tumblr.com client similar to Calypso

“WordPress is an open source web operating system that can power pretty much anything, including Tumblr.com, but it’s also a large property so will take a bit to figure out and migrate,” Mullenweg said.

Automattic doesn’t currently have plans to change the frontend Tumblr experience. Mullenweg said the Tumblr mobile app gets 20x more daily signups than the WordPress app. “It’s working amazingly well, despite being fairly constrained in what they can launch the past few years,” he said.

Tumblr changed its adult content policy in December 2018, banning pornographic content which reportedly accounted for 22.37 percent of incoming referral traffic from external sites in 2013 when it was acquired by Yahoo. Automattic has a similar content policy in place for WordPress.com and Mullenweg confirmed that the company does not plan to lift the ban on adult content.

“Adult content is not our forte either, and it creates a huge number of potential issues with app stores, payment providers, trust and safety… it’s a problem area best suited for companies fully dedicated to creating a great experience there,” Mullenweg said in response to questions on Hacker News. “I personally have very liberal views on these things, but supporting adult content as a business is very different.”

Automattic’s Tumblr Acquisition Opens Up New Possibilities for E-Commerce, Plugins, and Themes

Beyond this initial roadmap Mullenweg outlined, he also said he thinks “e-commerce on Tumblr is a great idea,” with simpler features developed first. In the past, Tumblr users who wanted to add e-commerce to their sites would need to use a service like Shopify or Ecwid and generate a Tumblr-compatible widget. Users would have to move to a self-hosted site on another platform in order to get more full-featured e-commerce capabilities. Automattic has the ability to build e-commerce into the platform using WooCommerce or any number of other existing solutions for simpler sales features.

An emerging Tumblr/WordPress plugin and theme ecosystem is also a possibility but may not affect the wider WordPress ecosystem as much unless Automattic opens up the Tumblr marketplace to third-party developers. Mullenweg said once Tumblr’s backend is on WordPress, the idea of plugins can be explored. Whether that is on a private network, like WordPress.com, or a new breed of self-hosted Tumblr sites, is yet to be seen.

Automattic’s apparent bargain basement deal on Tumblr is good news for the preservation of the open web, as the company is committed to supporting independent publishing. Migrating Tumblr’s infrastructure to WordPress also expands WordPress’ market share with a significantly younger user base. A study conducted by We Are Flint in 2018 found 43 percent of internet users between the ages of 18 to 24 years old used Tumblr.

Tumblr’s primary demographic thrives on community and its current feature set is built to support that. If Automattic can preserve Tumblr’s distinct community and convenient publishing, while invisibly re-architecting it to use WordPress, users could potentially enjoy seamless transitions across platforms to suit their publishing needs. This improves the likelihood that this generation of internet users will continue to own their own content instead of tossing it away on social media silos that feed on users’ most important thoughts, writings, and memories.

“I’m very excited about Tumblr’s next chapter and looking forward working with Matt Mullenweg and the entire team at Automattic,” Tumblr CEO Jeff D’Onofrio said. “I’m most excited for what this means for the entire Tumblr community. There is much more to do to make your experience a better one, and I’m super confident that we are in great hands with this news. Tumblr and WordPress share common founding principles. The plane has landed on a friendly runway. Now it is time to freshen up the jets.”

In the announcement on his Tumblr blog, Mullenweg said he sees “some good opportunities to standardize on the Open Source WordPress tech stack.” This migration will undoubtedly be a formidable technical challenge and Mullenweg promised to document the team’s work after it is complete. In the meantime, the Tumblr team has new functionality they plan to introduce after the acquisition is officially closed.

“When the possibility to join forces became concrete, it felt like a once-in-a-generation opportunity to have two beloved platforms work alongside each other to build a better, more open, more inclusive – and, frankly, more fun web,” Mullenweg said. “I knew we had to do it.”

Architecting a Modern Digital Platform With Open-Source Software

The digital business landscape is helping businesses to grow beyond geographical boundaries. Transforming your business into a digital business is no longer an optional thing, rather it has become a necessity. Early adopters, late boomers, methodical players, every enterprise is trying to modernize its enterprise IT ecosystem to improve the efficiency and become a leader in their respective enterprise domain. If you are an enterprise architect who is responsible for building a digital platform from scratch, modernize an existing IT platform or lift and shift an existing deployment into the cloud, there are hundreds of different software and technology vendors available to support your effort. The days of proprietary software is long gone and people are more and more migrating towards open-source software (OSS). One of the major challenges of adopting OSS is the maintenance overhead. But that challenge is absorbed by the mega-cloud vendors as well as other cloud services offered by the vendors who created these OSS IP.

In this post, I'm going to discuss building a modern digital platform with OSS. Most of the software components I'm using here are free to download and play around. If you really need to build a production-grade system, it is recommended to get commercial support from the respective vendors. The other important aspect of this architecture is that it is vendor-neutral. You can replace any vendor with OSS or proprietary software without impacting the overall architecture. The components are loosely coupled and can deploy and run independently.

Site Monetization with Coil (and Removing Ads for Supporters)

I've tried a handful of websites based on "tip with micropayments" in the past. They come and go. That's fine. From a publisher perspective, it's low-commitment. I've never earned a ton, but it was typically enough to be worth it.

Now Bruce has me trying Coil. It's compelling to me for a couple reasons:

  • The goal is to make it based on an actual web standard(!)
  • Coil is nicely designed. It's the service that readers actually subscribe to and a browser extension (for Chrome and Firefox) that pays publishers.
  • The money ends up in a Stronghold account1. I don't know much about those, but it was easy enough to set up and is also nicely designed.
  • Everything is anonymous. I don't have access to, know anything about, or store anything from the users who end up supporting the site with these micropayments.
  • Even though everyone is anonymous, I can still do things for the supporters, like not show ads.

It's a single tag on your site.

After signing up with Coil and having a Stronghold account, all you really need to do is put a <meta> tag in the <head> of your site. Here's mine:

<meta name="monetization" content="$pay.stronghold.co/1a1b91b23306ab547228c43af27ac0f2411">

Readers who have an active Coil subscription and are using the Coil browser extension will start sending micropayments to you, the publisher. Pretty cool.

Non-monetized site.
Monetized site (and payments successful)

Cash money

I've already made a dollar!

Since everything is anonymous, I didn't set up any logic to prevent injecting the meta tag if an admin is viewing the site. I bet it's mostly me paying myself. And Bruce.

The big hope is that this becomes a decent source of revenue once this coerces a web standard and lots of users choose to do it. My guess is it'll take years to get there if it does indeed become a winning player.

It's interesting thinking about the global economy as well. A dollar to me isn't the same as a dollar to everyone around the world. Less money goes a lot further in some parts of the world. This has the potential to unlock an income stream that perhaps things like advertising aren't as good at accounting for. I hear people who work in advertising talking about "bad geos" which literally means geographic places where advertisers avoid sending ad dollars.

Reward users for being supporters

Like I mentioned, this is completely anonymous. You can't exactly email people a free eBook or whatever for leaving a donation. But the browser itself can know if the current user is paying you or not.

It's essentially like... user isn't paying you:

document.monetization === undefined

User might be paying you, oh wait, hold on a second:

document.monetization && document.monetization.state === 'pending'

User is paying you:

document.monetization && document.monetization.state === 'started'

You can do whatever you want with that. Perhaps you can generate a secure download link on the fly if you really wanted to do something like give away an eBook or do some "subscriber only" content or whatever.

Not showing ads to supporters

Ads are generally powered by JavaScript anyway. In the global JavaScript for this site, I literally already have a function called csstricks.getAds(); which kicks off the process. That allows me to wrap that function call in some logic in case there are situations I don't even wanna bother kicking off the ad process, just like this.

if (showAdsLogic) {
  csstricks.getAds();
}

It's slightly tricky though, as document.monetization.state === 'started' doesn't just happen instantaneously. Fortunately, an event fires when that value changes:

if (document.monetization) {
  document.monetization.addEventListener("monetizationstart", event => {
    if (!document.monetization.state === "started") {
      getAds();
    }
  });
} else {
  getAds();
}

And it can get a lot fancier: validating sessions, doing different things based on payment amounts, etc. Here's a setup from their explainer:

if (document.monetization) {
  document.monetization.addEventListener("monetizationstart", event => {
    // User has an open payment stream

    // Connect to backend to validate the session using the request id
    const { paymentPointer, requestId } = event.detail;
    if (!isValidSession(paymentPointer, requestId)) {
      console.error("Invalid requestId for monetization");
      showAdvertising();
    }
  });

  document.monetization.addEventListener("monetizationprogress", event => {
    // A payment has been received

    // Connect to backend to validate the payment
    const {
      paymentPointer,
      requestId,
      amount,
      assetCode,
      assetScale
    } = event.detail;
    if (
      isValidPayment(paymentPointer, requestId, amount, assetCode, assetScale)
    ) {
      // Hide ads for a period based on amount received
      suspendAdvertising(amount, assetCode, assetScale);
    }
  });
  // Wait 30 seconds and then show ads if advertising is no longer suspended
  setTimeout(maybeShowAdvertising, 30000);
} else {
  showAdvertising();
}

I'm finding the monetizationstart event takes a couple of seconds to fire, so it does take a while to figure out if a user is actively monetizing. A couple of seconds is quite a while to wait before starting to fetch ads, so I'm not entirely sure the best approach there. You might want to kick off the ad requests right away, then choose to inject them or not (or hide them or not) based on the results. Depending on how those ads are tracked, that might present false impressions or harm your click-through rate. Your mileage may vary.

How does the web standard stuff factor in?

Here's the proposal. I can't pretend to understand it all, but I would think the gist of it is that you wouldn't need a browser extension at all, because the concept is baked into the browser. And you don't need Coil either; it would be just one option among others.


1 I'm told more "wallets" are coming soon and that Stronghold won't be the only option forever.

The post Site Monetization with Coil (and Removing Ads for Supporters) appeared first on CSS-Tricks.

WooCommerce 3.7 Introduces New Blocks, Updates Minimum WordPress and PHP Requirements

WooCommerce 3.7 was released today after four months in development. This minor release is backwards compatible with previous versions. Despite containing more than 1,290 commits, 3.7 is smaller than previous releases, as the WooCommerce team is working towards delivering more frequent releases to improve the stability of the platform.

WooCommerce 3.7 bundles updates from the WooCommerce Blocks feature plugin version 2.3, including the following new blocks and enhancements to existing blocks:

  • A new focal point picker on the Featured Product block
  • A new Product Categories List block
  • A new Featured Category block
  • A new Products By Tag(s) block
  • Featured Product now allows for featuring a product by variation, linking to the product page with the variation pre-selected

Here’s an example of the featured category block, which lets store owners stay right inside the editor to select the category and see an instant preview of the content.

WooCommerce developers are working on creating more block editor capabilities for store owners. Future versions of the WooCommerce Blocks plugin will include new blocks for product filtering and for displaying product reviews. These will be tested first through the WooCommerce Blocks feature plugin before being added to core.

WooCommerce 3.7 Requires WordPress 4.9+ and PHP 5.6+

This release bumps the minimum required WordPress version to 4.9 and the minimum required PHP version to 5.6. There are new upgrade nudges in WooCommerce 3.6, alerting users who will need to to upgrade WordPress and PHP versions in order to update their stores to WooCommerce 3.7.

The increased minimum versions allows WooCommerce developers to include new and more performant code in future versions of the plugin. It also enables them to utilize PHP packages. The Product Blocks and REST API functionality have been removed from core and are now loaded via Composer.

WooCommerce Blocks Rebranded

Users may notice some visual changes to how WooCommerce blocks appear in the editor. The blocks have been updated to better reflect the WooCommerce brand. This is becoming more common, as plugins with multiple blocks carve out their own branded spaces in the block inserter.

A few other notable enhancements in WooCommerce 3.7 include the following:

  • Email Settings: New “Additional Content” sections replace the old hardcoded “Thanks” sections so store owners don’t have to override templates to change the wording
  • Coupon admin pages: Automatically generate new coupon codes with the click of a button
  • Performance improvements, new dedicated table for tax classes, reduced number of queries to populate variations, excluding Action Scheduler tasks from comments queries to speed up page load times

The WooCommerce Admin feature plugin continues to make progress and currently has 300,000 active installations. The plugin provides a new JavaScript-based dashboard for monitoring store reports and sales metrics. Recent updates include more data on the Customer Report page, improved navigation bar design, and an improved Stock Activity panel that automatically responds to inventory updates. Store owners who want to preview this functionality in WooCommerce can install the feature plugin.

Version 3.7 should not cause any backwards compatibility issues but the update includes a few database upgrade routines. The WooCommerce team recommends those with large amounts of data in their databases to upgrade using the WP CLI command wp wc update, instead of through the admin. Check out the release post and beta announcement for more details.

How Transparent Is Your Workplace?

You want your workplace to be like this bubble.

Transparency is one of those things that’s crucial to becoming a human-centric business. I’ve previously outlined the importance of building a work environment that encourages the kind of social behaviors that are key to an adaptive workplace, and transparency is crucial to at least two of them.

The decision making lever, for instance, relies upon a transparent approach to how decisions are made. It requires making clear and visible the thinking and rationale behind strategies, plans, and metrics, with an ideal scenario seeing employees contributing fully to all three.

Understanding Apache Spark Failures and Bottlenecks

When everything goes according to plan, it's easy to write and understand applications in Apache Spark. However, sometimes a well-tuned application might fail due to a data change or a data layout change — or an application that had been running well so far, might start behaving badly due to resource starvation. It's important to understand underlying runtime components like disk usage, network usage, contention, and so on, so that we can make an informed decision when things go bad.

5 Different Ways to Create Objects in Java

Being Java developers, we usually create lots of objects daily, but we always use dependency management systems e.g. Spring to create these objects. However, there are more ways to create objects, which we will study in this article.

There are five total ways to create objects in Java, which are explained below with their examples followed by bytecode of the line which is creating the object.

Spring Boot Transactions: Understanding Transaction Propagation

In my previous tutorial, Spring Boot Transaction Management Example, we looked at transactions and implemented declarative transaction management. In this tutorial, we look at propagation and its different types. In the next tutorial, we will be looking at Spring Boot Transaction Rollback and Spring Boot Transaction Isolation.

What Is Transaction Propagation?

Any application involves a number of services or components making a call to other services or components. Transaction propagation indicates if any component or service will or will not participate in a transaction and how will it behave if the calling component/service already has or does not have a transaction created already.
Spring Boot Microservices Transaction Propagation

Frequently Asked MuleSoft Interview Questions 2019

The demand for MuleSoft's tools has seen exponential growth in recent years. The recent Mulesoft acquisition by Salesforce for $6.5 billion in its biggest-ever deal is also an example of the increasing relevance of MuleSoft technologies. Do you know MuleSoft's suite of tools is the most popular integration solution used by over 1,400 companies around the world?

Against this backdrop, the demand for professionals fluent in MuleSoft technology has grown tremendously. If you are a fresher looking to step up your career or an experienced professional seeking to brush up your knowledge of Mule ESB, the following interview questions will prove highly effective.

Creating Grafana Dashboards to Visualize Alluxio Metrics

Overview

Monitoring metrics is highly important to operate distributed systems in production. Alluxio collects metrics using the Codahale Metrics Library on I/O throughput, RPC throughput, and resource usage. Alluxio metrics are shown in its webUI but are also available through a REST endpoint or exportable to several third-party sinks in a time-series manner (see docs).

Grafana, a comprehensive metrics visualization software, ties into this process by pulling the metrics that systems like Alluxio collect through a sink and visualizes them in a more helpful fashion. This guide will cover how to set up Grafana and Graphite, a supported sink for Alluxio, which will put metrics in a time-series database, along with exploring some of the possibilities that the combination offers.

Artificial Intelligence – A Great Way to Improve Data Handling and Processing

Early machines were dumb and could only function according to a well-defined set of instructions. However, with the increasing power of the computers and processing networks, it is now possible to create and execute algorithms that can improve their functions with each iteration. This phenomenon is termed as artificial intelligence (AI), although it may be better termed as machine intelligence.

Defining AI

AI is difficult to define with complete clarity. A general definition may be presented as the ability of a machine to mimic functions that may be commonly associated with humans. This may include cognitive abilities, such as the ability to solve complex problems and learning from past experiences to improve in the future.

How to Build Graal-Enabled JDK8 on CircleCI

The GraalVM compiler is a replacement to HotSpot’s server-side JIT compiler, widely known as the C2 compiler. It is written in Java with the goal of better performance compared to the C2 compiler. New changes, starting with Java 9, mean that we can now plug in our own hand-written C2 compiler into the JVM thanks to JVMCI. The researchers and engineers at Oracle Labs have created a variant of JDK8 with JVMCI enabled, which can be used to build the GraalVM compiler. The GraalVM compiler is open source and is available on GitHub (along with the HotSpot JVMCI sources needed to build the GraalVM compiler). This gives us the ability to fork/clone it and build our own version of the GraalVM compiler.

In this post, we are going to build the GraalVM compiler with JDK8 on CircleCI. The resulting artifacts are going to be:

Code Signing Credentials Are Machine Identities and Need to Be Protected

The world is experiencing a digital transformation that is eclipsing all previous technological advancements. As more IT workloads move to the cloud, and as more IT services are containerized, they all need to be authenticated using cryptographic keys and digital certificates, or machine identities. Given the pace and scale of this new world of machines, protecting those machine identities is becoming increasingly critical to security. Although these changes affect every business, many organizations use outdated methods to protect the exponentially rising number of machine identities they now require. Those approaches simply can’t keep up.

How does this impact the security of code? There are many types of machine identities — TLS, SSH, mobile and more — that are used on many types of machines. When you look at it in this light, code is the ultimate "machine" that requires an authorized identity so that we can trust it. That is precisely why machine identities are so critical to the code signing process.

What I Learned About How Facebook Infrastructure Serves Our Photos

On July 3, users across the globe came to a standstill when they weren’t able to load photos on both Facebook and Instagram. Likewise, users of Facebook-owned WhatsApp weren’t able to send images or videos.

If Facebook was a standalone CDN, it would probably be in the top three CDNs in the world because of the sheer number of assets and traffic. Running the CDN infrastructure and networks at Facebook cannot be a small task.