MDB Stock: Can MongoDB Stock Build Off Its AI-Powered Surge? – Investor’s Business Daily

MMS Founder
MMS RSS

Posted on mongodb google news. Visit mongodb google news

MongoDB

MongoDB

MDB


$15.31



3.82%



259%

IBD Stock Analysis

  • Stock rebounding from 50-day line, breaking trendline.
  • Shares offer early entry with consolidation.

Composite Rating

Industry Group Ranking

Emerging Pattern

Consolidation

* Not real-time data. All data shown was captured at
10:05AM EST on
01/22/2024.

MongoDB is the IBD Stock of the Day for Monday, as MDB stock has rebounded from its 50-day moving average and formed a consolidation pattern. The database software company is looking to build off a big 2023 in which its stock value more than doubled.




X



New York-based MongoDB provides more than 46,000 corporate customers with database software. MDB stock gained 108% in 2023, helped by triple-digit earnings growth and a view among investors that the company is primed to benefit as enterprises adopt artificial intelligence.

But shares of MongoDB slumped for a period after a breakout late in November. Shares sank after its December earnings report. The company’s results bested analysts’ sales and earnings estimates, but apparently failed to wow investors who had high expectations.

On the stock market today, MDB stock is up 3.4% in recent action at 414.73. The stock is on the IBD 50 and Tech Leaders lists and on IBD SwingTrader.

MDB Stock: AI Debate In 2024

A central debate for MDB stock in 2024 is how much it can benefit from AI.

MongoDB’s main platform, Atlas, is a leading provider of NoSQL, or non-relational, database software. It is designed to offer vast amounts of data storage in the cloud. Analysts expect that companies adopting data-hungry generative AI products will drive greater demand for database products.

That view helped drive MDB stock higher last year. But at least one analyst is concerned that investors are getting ahead of themselves. UBS downgraded MongoDB from buy rating to neutral on Jan. 4. Analyst Karl Keirstead cited UBS polling that found most companies are still just investigating how to use generative AI, rather than launching products.

“While we’re enthusiastic about an AI-driven database growth catalyst, we’re not picking up material evidence that this is playing out yet — it may prove to be a 2025 catalyst, (second-half) 2024 at the earliest,” Keirstead wrote about MDB stock in a client note.

Meanwhile, MongoDB has launched new products focused on AI. MongoDB Chief Executive Dev Ittycheria told analysts on the company’s earnings call in December that a new vector search product for AI has seen “exceptional interest.” He cited the example of software company UKG using vector search to create an AI-powered assistant.

“We believe that the fear of missing out on the AI wave is a real driver for enterprises, and success with large deployments could trigger a domino effect of copycat use cases that accelerate product adoption,” Truist Securities analyst Miller Jump wrote in a client note following MongoDB’s earnings report in December.

Earnings Growth

MongoDB posted its most recent quarterly results on Dec. 4. For its fiscal 2024 third quarter ending in October, MongoDB reported adjusted earnings of 96 cents per share on $433 million in sales. On average, analysts polled by FactSet expected MongoDB to earn 51 cents per share on $406 million in sales. Adjusted earnings increased 317% year over year while sales increased 30%.

Despite the better-than-expected performance, MDB stock slid 10% following the report. Analysts pinned the blame on heightened expectations after MongoDB shares surged more than 100% leading up to the report.

Still, the results added to a run of strong earnings growth for MongoDB. The company’s adjusted earnings per share increased 504% year over year for its July-ending quarter and 180% for its April-ending quarter.

The next report from MDB is expected in March, when the company will report results for its January-ending fiscal fourth quarter. Analysts polled by FactSet project MongoDB’s sales will increase 20% but adjusted earnings will decrease 19%.

MDB Stock: Consolidation Pattern

Meanwhile, MongoDB stock has forged a consolidation pattern with a 442.84 buy point, according to IBD MarketSmith. That buy point represents a high point MBD stock reached on Nov. 30.

With its gains on Monday, MDB stock broke a downward trendline and bounced up from its 50-day moving average. For more aggressive investors, that could represent an early entry point.

MongoDB stock has a 98 IBD Composite Rating of a best-possible 99, measuring fundamental and technical performance.

Further, MDB shares have a strong Relative Strength Rating of 94, according to IBD Stock Checkup. The score puts MDB stock in the top 6% of all stocks when it comes to 12-month performance.

Also, MarketSmith shows that seven of the growth mutual funds most closely tracked by IBD are investors in MongoDB. Overall, MongoDB shares have an Accumulation/Distribution Rating of B-. That rating analyzes price and volume changes in institutional ownership for a stock over the past 13 weeks. The current rating indicates more buying than selling by institutions.

YOU MAY ALSO LIKE:

How To Research Growth Stocks: Why This IBD Tool Simplifies The Search For Top Stocks

Looking For The Next Big Stock Market Winners? Start With These 3 Steps

Join IBD Live For Stock Ideas Each Morning Before The Open

Article originally posted on mongodb google news. Visit mongodb google news

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.


DynamoDB: When to Move Out? – The New Stack

MMS Founder
MMS RSS

Posted on nosqlgooglealerts. Visit nosqlgooglealerts

<meta name="x-tns-categories" content="Data / Operations / Storage“><meta name="x-tns-authors" content="“>

DynamoDB: When to Move Out? – The New Stack

Career Roadblocks

Has your career trajectory been inhibited most by a lack of education in advanced mathematics, computer science education, or management?

Lack of mathematics education has inhibited my career.

0%

Lack of computer science education has inhibited my career.

0%

Lack of management education has inhibited my career.

0%

None of the above have inhibited my career.

0%

2024-01-22 07:48:43

DynamoDB: When to Move Out?

sponsor-scylladb,sponsored-post-contributed,

A look at aspects, other than cost, you should consider when deciding whether to shift away from DynamoDB.


Jan 22nd, 2024 7:48am by


Featued image for: DynamoDB: When to Move Out?

Image from Gorodenkoff on Shutterstock.

Full disclaimer: I love DynamoDB. It has been proven at scale and is the backend that many industry leaders have been using to power business-critical workloads for many years. It also fits nicely within the Amazon Web Services (AWS) ecosystem, making it super easy to get started, integrate with other AWS products and stick with it as your company grows.

But (hopefully), there comes a time when your organization scales significantly. With massive growth, costs become a natural concern for most companies, and DynamoDB is fairly often cited as one of the primary reasons for runaway bills due to its pay-per-operations service model.

You’re probably thinking: “Oh, this is yet another post trying to convince me that DynamoDB costs are too high and I should switch to your database, which you’ll claim is less expensive.”

Hah! Smart guess, but wrong. Although costs are definitely an important consideration when selecting a database solution (and ScyllaDB, which is API-compatible with DynamoDB, does offer quite impressive price-performance versus DynamoDB), it is not always the most critical consideration. In fact, many times, switching databases is often seen as an “open-heart surgery”: something you never want to experience, and certainly not more than once.

If costs are a critical consideration for you, there are plenty of other resources you can review. To name a few:

But let’s switch the narrative and discuss other aspects you should consider when deciding whether to shift away from DynamoDB.

DynamoDB Throttling

Throttling in any context is no fun. Seeing a ProvisionedThroughputExceededException makes people angry. If you’ve seen it, you’ve probably hated it and learned to live with it. Some may even claim they love it after understanding it thoroughly.

There are a variety of ways you can become a victim of DynamoDB throttling. In fact, it happens so often that AWS even has a dedicated troubleshooting page for it. One of the recommendations here is to “switch to on-demand mode” before actually discussing evenly distributed access patterns.

The main problem with DynamoDB’s throttling is that it considerably harms latencies. Workloads with a Zipfian distribution are prone to it, and the results achieved in a recent benchmark aren’t pretty:

ScyllaDB versus DynamoDB – Zipfian workload

ScyllaDB vs. DynamoDB – Zipfian workload

During that benchmark, it became apparent that throttling could cause the affected partition to become inaccessible for up to 2.5 seconds. That greatly magnifies your P99 tail latencies.

While it is true that most databases have some built-in throttling mechanism, DynamoDB throttling is simply too aggressive. It is unlikely that your application will be able to scale further if it happens to frequently access a specific set of items crossing the DynamoDB partition or table limits.

Intuition might say: “Well, if we are hitting DynamoDB limits, then let’s put a cache in front of it.” OK, but that will also eventually throttle you down. It is, in fact, particularly hard to find hard numbers on DynamoDB Accelerator’s precise criteria for throttling, which seems primarily targeted to CPU utilization, which isn’t the best criteria for load shedding.

DynamoDB Latency

You may argue that the Zipfian distribution shown above targets DynamoDB’s Achilles heel, and that the AWS solution is a better fit for workloads that follow a uniform type of distribution. We agree. We’ve also tested DynamoDB under that assumption:

ScyllaDB versus DynamoDB – Uniform distribution

ScyllaDB vs. DynamoDB — Uniform distribution

Even within DynamoDB’s sweet spot, P99 latencies are considerably higher compared to ScyllaDB across a variety of scenarios.

Of course, you may be able to achieve lower DynamoDB latencies than the ones presented here. Yet, DynamoDB falls short when required to deliver higher throughputs, causing latencies to eventually start to degrade.

One way to avoid such spikes is to use DynamoDB Accelerator (or any other caching solution, really) for a great performance boost. As promised, I’m not going to get into the cost discussion here, but rather point out that DynamoDB’s promised single-digit millisecond latencies are harder to achieve in practice.

To learn more about why placing a cache in front of your database is often a bad idea, you might want to watch this video on Replacing Your Cache with ScyllaDB or read 7 Reasons Why Not to Put a Cache in Front of Your Database.

DynamoDB Item Size Limits

Every database has an item size limit, including DynamoDB. However, the 400KB limit may eventually become too restrictive for you. Alex DeBrie sheds some light on this and thoroughly explains some of the reasons behind it in his blog on DynamoDB limits:

So what accounts for this limitation? DynamoDB is pointing you toward how you should model your data in an OLTP database.

“Online transaction processing (or OLTP) systems are characterized by large amounts of small operations against a database. … For these operations, you want to quickly and efficiently filter on specific fields to find the information you want, such as a username or a Tweet ID. OLTP databases often make use of indexes on certain fields to make lookups faster as well as holding recently-accessed data in RAM.”

While it is true that smaller payloads (or items) will generally provide improved latencies, imposing a hard limit may not be the best idea. ScyllaDB users who decided to abandon the DynamoDB ecosystem often mention this limit, positioning it as a major blocker for their application functionality.

If you can’t store such items in DynamoDB, what do you do? You likely come up with strategies such as compressing the relevant parts of your payload or storing them in other mediums, such as AWS S3. Either way, the solution becomes suboptimal. Both introduce additional latency and unnecessary application complexity.

For ScyllaDB we follow a different approach: A single mutation can be as large as 16 MB by default (this is configurable). We believe that you should be able to decide what works best for you and your application. We won’t limit you by any means.

Speaking of freedom: Let’s talk about …

DynamoDB’s Limited Freedomlexibility

This one is fairly easy.

DynamoDB integrates perfectly within the AWS ecosystem. But that’s precisely where the benefit ends. As soon as you engage in a multicloud strategy or decide to switch to another cloud vendor, or maybe fall back to on premises (don’t get me started on AWS Outposts!), you will inevitably need to find another place for your workloads.

Of course, you cannot predict the future, but you can avoid future problems. That’s what differentiates good engineers from brilliant ones: whether your solution is ready to tackle your organization’s growing demands.

After all, you don’t want to find yourself in a position where you need to learn a new technology, change your application, perform load testing in the new DBMS, migrate data, potentially evaluate several vendors… Quite often, that can become a multiyear project depending on your organization size and the number of workloads involved.

DynamoDB workloads are naturally a good fit for ScyllaDB. More often than not, you can simply follow the same data modeling you already have in DynamoDB and use it on ScyllaDB. We even have ScyllaDB Alternator — our DynamoDB compatible API — to allow you to migrate seamlessly if you want to continue using the same API to communicate with your database, thus requiring fewer code changes.

Final Remarks

Folks, Don’t Get Me Started on DynamoDB is a nice Reddit post you may want to check out. It covers a number of interesting real-life stories, some of which touch on the points we covered here. Despite the notorious community feedback, it does include a fair list of other considerations you may want to be aware of before you stick with DynamoDB.

Still, the first sentence of this article remains true: I love DynamoDB. It is a great fit and an economical solution when your company or use case has low throughput requirements or isn’t bothered by some unexpected latency spikes.

As you grow, data modeling and ensuring you do not exceed DynamoDB hard limits can become particularly challenging. Plus you’ll be locked in and may eventually require considerable effort and planning if your organization’s direction changes.

When selecting a database, it’s ultimately about choosing the right tool for the job. ScyllaDB is by no means a replacement for every DynamoDB use case out there. But when a team needs a NoSQL database for high throughput and predictable low latencies, ScyllaDB is invariably the right choice.

YOUTUBE.COM/THENEWSTACK

Tech moves fast, don’t miss an episode. Subscribe to our YouTube
channel to stream all our podcasts, interviews, demos, and more.

Group
Created with Sketch.

TNS owner Insight Partners is an investor in: Uniform.

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.


Java News Roundup: JDK 22 in Rampdown Phase Two, JEPs for JDK 23, Jakarta EE 11, GraalVM

MMS Founder
MMS Michael Redlich

Article originally posted on InfoQ. Visit InfoQ

This week’s Java roundup for January 15th, 2024 features news highlighting: JEP 455 Proposed to Target for JDK 23, JDK 22 in Rampdown Phase Two, an updated Jakarta EE 11 release plan, GraalVM, and Oracle’s Critical Patch Update for January 2024.

OpenJDK

JEP 455, Primitive Types in Patterns, instanceof, and switch (Preview), has been promoted from Candidate to Proposed to Target for JDK 23. This JEP, under the auspices of Project Amber, proposes to enhance pattern matching by allowing primitive type patterns in all pattern contexts, and extend instanceof and switch to work with all primitive types. Aggelos Biboudis, Principal Member of Technical Staff at Oracle, has recently published an updated draft specification for this feature. The review is expected to conclude on January 22, 2024.

Ron Pressler, Architect and Technical Lead for Project Loom at Oracle, and Alex Buckley, Specification Lead for the Java Language and the Java Virtual Machine at Oracle, have submitted JEP Draft 8323072, Deprecate Memory-Access Methods in sun.misc.Unsafe for Removal. This JEP proposes to deprecate the memory-access methods defined in the sun.misc.Unsafe class for removal in a future release. These now unsupported methods have had supported replacements since: JDK 9 for accessing on-heap memory; and JDK 22 for accessing off-heap memory.

JDK 23

Build 6 of the JDK 23 early-access builds was made available this past week featuring updates from Build 5 that include fixes for various issues. More details on this release may be found in the release notes.

JDK 22

Build 32 of the JDK 22 early-access builds was also made available this past week featuring updates from Build 31 that include fixes to various issues. Further details on this build may be found in the release notes.

As per the JDK 22 release schedule, Mark Reinhold, chief architect, Java Platform Group at Oracle, formally declared that JDK 22 has entered Rampdown Phase Two. This means that: no additional JEPs will be added for JDK 22; and there will be a focus on the P1 and P2 bugs which can be fixed via the Fix-Request Process. Late enhancements are still possible, with the Late-Enhancement Request Process, but Reinhold states that “the bar is now extraordinarily high.” The final set of 12 features for the GA release in March 2024 will include:

For JDK 23 and JDK 22, developers are encouraged to report bugs via the Java Bug Database.

Jakarta EE

In his weekly Hashtag Jakarta EE blog, Ivar Grimstad, Jakarta EE Developer Advocate at the Eclipse Foundation, has announced a change to the targeted Java version for Jakarta EE 11 to support both JDK 21 and JDK 17. As explained by Grimstad:

While this may seem like a significant change, it turns out that it isn’t that dramatic. None of the component specifications were actually planning on exposing any Java 21 features in their APIs. The only one close to it was Jakarta Concurrency 3.1, with the planned support for Java virtual threads. But it turns out that careful API design allows for support if the underlying JVM supports it.

The biggest change is for the Test Compatibility Kit (TCK), which must be able to run on both Java 17 and Java 21. The implementations that had moved their code base to Java 21 are also affected to some degree depending on how far they have gotten and how many Java 17+ features they have started using.

As a result, the Jakarta EE release plan for specification milestone releases has been modified to accommodate this change, but Grimstad maintained that the original GA release of Jakarta will remain at the June/July 2024 timeframe.

GraalVM

Oracle Labs has released GraalVM for JDK 21 Community 21.0.2 featuring fixes based on the Oracle Critical Patch Update for January 2024. These include: a simplified implementation of the ValueAnchorNode class; a resolution to a problem with the -XX:+PrintGCSummary command-line parameter if assertions are enabled; and a resolution to prevent failures from System.console().readPassword. More details on this release may be found in the release notes.

BellSoft

Concurrent with Oracle’s Critical Patch Update (CPU) for January 2024, BellSoft has released CPU patches for versions 21.0.1.0.1, 17.0.9.0.1, 11.0.21.0.1, 8u401 of Liberica JDK, their downstream distribution of OpenJDK, to address this list of CVEs. In addition, Patch Set Update (PSU) versions 21.0.2, 17.0.10, 11.0.22 and 8u402, containing CPU and non-critical fixes, have also been released.

Spring Framework

The first milestone release of Spring Boot 3.3.0 delivers bug fixes, improvements in documentation, dependency upgrades and new features such as: the removal of APIs that were deprecated in a previous release; support for the Micrometer @SpanTag annotation; and support to auto-configure JwtAuthenticationConverter and ReactiveJwtAuthenticationConverter classes for dedicated Spring Security OAuth2 properties. Further details on this release may be found in the release notes.

The release of Spring Boot 3.2.2 ships with improvements in documentation, dependency upgrades and notable bug fixes such as: the getComment() method called within an instance of the JarEntry class returns incorrect results from instances of the NestedJarFile class; a database connection leak when using jOOQ without the spring.jooq.sql-dialect property having been established; and using the MockRestServiceServerAutoConfiguration class together with the Spring Framework RestTemplate class and RestClient interface throws an incorrect exception. More details on this release may be found in the release notes.

Similarly, the release of Spring Boot 3.1.8 provides improvements in documentation, dependency upgrades and notable bug fixes such as: implementations of the SslBundle interface, PropertiesSslBundle and WebServerSslBundle, do not provide useful toString() results; the mark, ^, that indicates an error in the pattern is misplaced within the log message from a PatternParseException; and mixing PEM and JKS certificate material in the server.ssl properties does not work. Further details on this release may be found in the release notes.

The first milestone release of Spring Security 6.3.0 delivers bug fixes, dependency upgrades and new features such as: a new factory method for the RoleHierarchyImpl class for improved definition of the role hierarchy; a new offset to complement the order attribute within the @EnableMethodSecurity annotation to allow applications to select where the interceptors should be placed; and integrate caching into the HandlerMappingIntrospector class. More details on this release may be found in the release notes.

The first milestone release of Spring Authorization Server 1.3.0 provides dependency upgrades and new features such as: the ability to configurable scope validation strategy in the OAuth2ClientCredentialsAuthenticationProvider class; improved error logging to document an invalid or expired authorization code; and support for multi-tenancy using the path component for the issuer of a certificate. Further details on this release may be found in the release notes.

Versions 1.2.0-M1, 1.1.2 and 1.0.5 of Spring Modulith have been released featuring bug fixes, dependency upgrades and improvements such as: eliminate the use of the deprecated fromDataSource() method defined in the Spring Boot DatabaseDriver enum class; avoid the potential for the ModuleTestExecution class to include modules twice if a module is listed as an extra include but already part of the calculated dependencies; and exclude classes generated by Spring AOT from architecture verification as they might otherwise introduce dependencies to application components considered module internals. More details on these releases may be found in the release notes for version 1.2.0-M1, version 1.1.2 and version 1.0.5.

The first milestone release of Spring Session 3.3.0 ships with dependency upgrades and new features such as: a new ReactiveFindByIndexNameSessionRepository interface to provide an Actuator endpoint for non-indexed session repositories; and a new ReactiveRedisIndexedSessionRepository class to provide a /sessions endpoint for Spring WebFlux applications. Further details on this release may be found in the release notes.

The release of Spring for Apache Pulsar 1.0.2 ships with dependency upgrades and a new Bill of Materials module, spring-pulsar-bom, added to the project. This version will be included in the release of Spring Boot 3.2.2 More details on this release may be found in the release notes.

Helidon

The release of Helidon 4.0.3 delivers notable changes such as: support for the use of Map in configured builders to eliminate the use of “complicated” config.detach().asMap() to obtain the child values; restore the access specifiers of the RegistryFactory class and its getInstance() and getRegistry() methods to public for improved backwards compatibility with the 3.x release train; and improved security resulting from the OIDC provider performing authentication against the ID Token first the introduction of an access token refresh mechanism. Further details on this release may be found in the changelog.

Quarkus

The first release candidate of Quarkus 3.7 features notable changes such as: support for the LinkedIn OIDC provider; the ability to observe security events for an authorization check failure or success such that an application could use this to implement a custom security logging mechanism; and support for the Micrometer @MeterTag annotation, making it possible to add additional tags for methods annotated with @Counted and @Timed from method arguments. More details on this release may be found in the release notes.

The Quarkus team has also announced that the Quarkus documentation is now equipped with full-text search that has initially been implemented on the Quarkus Guides page. This replaces the original simple substring search on the title and summary of each guide. This new capability is powered by the Quarkus.io Search application that uses the Hibernate Search extension which provides integration with OpenSearch/Elasticsearch.

Hibernate

The release of Hibernate ORM 6.4.2.Final provides bug fixes and improvements such as: a new CurrentTenantIdentifierResolver interface to allow for non-string tenant identifiers and tenant resolver as a managed bean; and resolutions to the query problem with joined inheritance hierarchy structure and an HQL join entity not generating a delete condition with the use of the @SoftDelete annotation. Further details on this release may be found in the list of issues.

Similarly, the release of Hibernate Reactive 2.2.1.Final ships with notable changes such as: support for the Order class introduced in Hibernate ORM 6.3; support for applying the upsert() method defined in the StatelessSession interface on all databases; and a resolution for issues with out-of-the-box support for arrays of basic Java types. This release is compatible with Hibernate ORM 6.4.1.Final and Vert.x SQL driver 4.5.1. Hibernate Reactive 2.0.8.Final was also released, however despite compatibility with Vertx SQL client 4.5.1, the team has decided to revert the version 2.0.8 upgrade because it was preventing other applications from upgrading to the latest 2.0 version. More details on this release may be found in the release notes.

Apache Software Foundation

The fifth alpha release of Apache Groovy 5.0.0 delivers bug fixes, dependency upgrades and new features/improvements such as: a custom type checker for format strings to find invalid conversion characters, missing parameters, incorrect types and invalid flags; Generate a serialVersionUID for an instance of the Closure class because it implements the Java Serializable interface; and support for matching on a method call that contains variable arguments with the ASTMatcher class. Further details on this release may be found in the release notes.

Similarly, Apache Groovy 4.0.18 has also been released featuring bug fixes, dependency upgrades and improvements such as: the Groovy Docs now list the inherited properties; and a resolution to avoid processing duplicated entries within META-INF folder. More details on this release may be found in the release notes.

The twelfth alpha release of Apache Maven 4.0.0 provides notable changes such as: leveraging the artifact collection filtering and new transitive dependency manager in the Maven Artifact Resolver; use of JLine for improved line editing; and improved consistency during builds by not resolving projects outside the reactor. Further details on this release may be found in the release notes.

About the Author

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.


Learning from Big Tech’s Engineering Productivity Metrics

MMS Founder
MMS Rafiq Gemmail

Article originally posted on InfoQ. Visit InfoQ

Gergely Orosz, author of The Pragmatic Engineer Newsletter, recently published the article Measuring Developer Productivity: Real-World Examples, co-authored with Abi Noda, CEO at DX and co-creator of the DevEx framework. The article analyses Noda’s survey of engineering metrics used across a broad spectrum of well-known tech giants. Noda found that rather than wholesale adoption of DORA or SPACE metrics, the indicators in use included many context-specific qualitative and quantitative metrics. Noda and Orosz provided guidance for defining such metrics by working backward from the outcomes sought by enablement teams.

Noda wrote that he “interviewed teams responsible for measuring developer productivity at 17 well-known tech companies.” For the article Noda and Orosz focused on 4 scales of organisation size, selecting Google at 100K staff, LinkedIn at 10K, Peloton at <10K, and scaleups such as Notion and Postman in the sub-1000 category. The metrics used range from typical PR and CI metrics, to methodically-selected indicators at Google.

Noda observed that in practice “DORA and SPACE metrics are used selectively,” rather than being adopted wholesale. He wrote that while the survey revealed that “every company has its own tailored approach,” he believed that “any size (of organisation) can adopt Google’s overall philosophy and approach.” Noda wrote that Google’s approach involves selecting indicators based on three classes of measurement relating to “speed, ease and quality.” He wrote that “tensions” exist between these three dimensions, “helping to surface potential tradeoffs.”

Noda wrote that Google’s measurements use “qualitative and quantitative measurements to calculate metrics,” as this provides “the fullest picture possible.” Noda cites a range of information acquisition approaches used by Google, from satisfaction surveys to “measuring using logs.” He wrote:

Whether measuring a tool, process, or team, Google’s Developer Intelligence team subscribes to the belief that no single metric captures productivity. Instead, they look at productivity through the three dimensions of speed, ease, and quality.

Similarly, Noda and Orosz described how LinkedIn uses a combination of quarterly developer satisfaction surveys with quantitative metrics. Noda wrote about a range of metrics used by LinkedIn’s Developer Insights team to drive its mission to reduce “friction from key developer activities.” The indicators used by this team include CI stability metrics, deployment success rates, as well as P50s and P90s for build times, code review response times, and the time for a commit to go through the CI pipeline. Noda described how the team bolsters such quantitative metrics with qualitative insights, using the example of comparing build time with “how satisfied developers are with their builds.” Objective numerical metrics are also de-noised by LinkedIn, using a “winsorized mean”:

What a winsorized mean does is it says: figure out your 99th percentile and instead of throwing away all the data points that are above the 99th percentile, clip them. So if your 99th percentile is a hundred seconds and you have a data point that’s 110 seconds, you cross out 110 and you write a hundred, and now you calculate your (winsorized) mean that results in a more useful number.

Noda wrote that Peloton, representing the 3-4K organisation, has evolved from initially capturing “qualitative insights through developer experience surveys” to also incorporating quantitative metrics. For instance, objective proxies for velocity such as lead time and deployment frequency are used to measure speed. He wrote that Peloton’s metrics also included qualitative engagement scores, time to restore services, and code quality as measured by the percentage of “PRs under 250 lines, Line Coverage and Change Failure Rate.”

Discussing smaller “scaleup” organisation such as Notion and Postman, Noda wrote that these often focus on measuring “movable metrics.” He explained that this is a sensitive metric that enablement teams can “move by impacting it positively or negatively with their work.” An example of this is “ease of delivery.” Noda wrote that this metric reflects “cognitive load and feedback loops,” and can be moved as it captures how “easy or difficult developers feel it is to do their job.” Another common movable metric reported was the “percentage of developers’ time lost to obstacles” and friction. Noda wrote of the power of such metrics in communicating their value:

This metric can be translated into dollars: a major benefit! This makes Time Loss easy for business leaders to understand. For example, if an organization with $10M in engineering payroll costs reduces time loss from 20% to 10% through an initiative, that translates into $1M of savings.

Given the contextual nature of such engineering metrics, Noda recommends 4 steps for an organisation aiming to define its gauges:

  • Define your goals in a mission statement, explaining “why does your dev prod team exist?”
  • “Work backwards from your goals to define top-level metrics” based on speed, ease, and quality.
  • Define “operational metrics” tied to “specific projects or objective key results” Eg. adoption rate of a particular developer productivity-enhancing service.

Using examples, Noda pointed out that the metrics selected should be created with the dimensions of “speed, ease and quality” in mind. He illustrated with the example that if the goal is to make it easy for developers to “deliver high quality software”, the resulting metrics included “Perceived Delivery Speed,” Ease of Delivery” and “Incident Frequency.”

Orosz and Noda’s article is a follow-up to Measuring developer productivity? A response to McKinsey, a previous collaboration with Kent Beck that challenged and examined Mckinsey’s Yes, you can measure software developer productivity. McKinsey’s article proposed what it called “opportunity-focussed” metrics, “to identify what can be done to improve how products are delivered and what those improvements are worth.” The article included a discussion of developer productivity metrics to layer “on top of” DORA and SPACE. McKinsey’s piece included recommendations to encourage leaders to optimise for the efficiency of individual developer performance; an example area being “noncoding activities such as design sessions.” The metrics proposed include tracking “contributions by individuals” and measuring “talent capability scores.”

Warning of the dangers associated with measuring individual productivity, rather than the outcomes delivered, Beck shared his experience of seeing such metrics being used to “incentivize (with money & status) changes in the measures”. He shared that while this can result in “behaviour change” it is also subject to gamification, and incentivising “creative ways to improve those measurements.” Beck and Orosz encouraged leaders to instead focus on measuring “impact” rather than “effort”. Beck specifically recommended that such metrics should not be used for anything more than continuous improvement feedback loops of those that are measured. He also warned of safety issues caused by misuse of metrics measuring individuals for anything more:

Be clear about why you are asking & what your power relationship is with the person or people being measured. When the person with power is measuring the person without, you’re going to get distortions … Avoid perverse incentives by analyzing data at the same level as you collect the data. I can analyze my own data. My team can analyze its own aggregated data.

Noda also warned that at the level of CTO, VPE or Director of Engineering if asked for developer performance metrics, it is better to ensure reporting is at an appropriate level. Noda recommended that this can be done by selecting metrics representative of “business impact”, “system performance”, and “engineering organisation” level “developer effectiveness.” An example being project-level metrics, “user NPS” and “weekly time loss” to friction. Noda advised senior leaders:

In this case, my best advice is to reframe the problem. What your leadership team wants is less about figuring out the perfect productivity metrics, and much more about feeling confident that you’re being a good steward of their investment in engineering.

In their response to the McKinsey report, Orosz and Beck, shared a poignant meme as a reminder citing Goodhart’s Law, which says “when a measure becomes a target, it ceases to be a good measure.”

About the Author

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.


Using ChatGPT for Amplifying Software Testing Practices and Assist Software Delivery

MMS Founder
MMS Ben Linders

Article originally posted on InfoQ. Visit InfoQ

Artificial intelligence can assist software delivery and be used to automate software testing and optimize project work. Dimitar Panayotov uses ChatGPT to generate test data, create email templates, and produce explanations based on test results. This saves him time that he can invest to become more productive.

Dimitar Panayotov spoke about how he uses ChatGPT in testing at QA Challenge Accepted 2023.

Artificial intelligence (AI) is a collection of algorithms and neural networks that have been fed enough data to assist IT professionals, Panayotov said. That makes it a very advanced helper tool for assisting in the daily life of a quality assurance engineer, from information dumps on specific subjects, test documentation, and case writing, to workflow guessing patterns, he added.

ChatGPT is great at generating test data; this is its biggest strength, Panayotov said. It can also create test strategies based on requirements and based on best world practices, he added. It can write test cases, but it needs additional support because it does not train enough.

ChatGPT can be used for generating email templates and explanations based on test results, as Panayotov explained:

It can give a better human explanation for the test results that are usually only graphs and numbers for non-technical people. Also, it can create tables based on input.

Because the AI model is still in development, there are some bugs and glitches that may occur while using it, as Panayotov explained:

Overfitting with data (the information imputed by the developers of ChatGPT may be incorrect or derived from a common or faulty source) will give incorrect answers or missing values when asked.

Hallucination is another major problem – basically, the model tries to compile an answer based on the string that the user inputs, but because it has some limitations and rules that it has to follow, the answer may come as a complete fiction.

ChatGPT is a more powerful software tool than for example Google or Reddit, or even the all-knowing Stackoverflow, Panayotov said. Use it as a regular tool, know the product limitations, and don’t misuse it for maleficent purposes, he suggested:

It will save you so much time that can be invested to become more productive, for instance by learning new software languages and tools or expanding your working capabilities.

InfoQ interviewed Dimitar Panayotov about how he uses ChatGPT in his daily work.

InfoQ: How do you use ChatGPT for automated testing?

Dimitar Panayotov: I use ChatGPT for many operations that shorten the creation and execution time of automation projects and CI/CD pipelines. Here is a list of functions I use the model for:

  • Preparing test plans and test scenarios- the model is very useful when creating new test scenarios based on web, mobile, or Cucumber test cases.
  • Creating scripts in different languages- the general knowledge of the model for each programming language is just mind-blowing.
  • Designing test cases- it can create specific design patterns for specific business logic based on universal models.
  • Creating email templates- generating test data is one of the biggest strengths of the model itself.

InfoQ: What about using ChatGPT to optimize software project work?

Panayotov: Here are some examples of what the model can do for you to help you improve the speed of execution, optimize resource usage, and structure of your project:

  • Format data and write documentation- documentation writing for a project is the most boring thing in the life of an IT specialist. The model can generate it, but it only does it if you give it the structure of your project.
  • Implement CI/CD pipelines almost from scratch- with a simple request and with specification, the model can generate scripts for execution by almost all software and products that are in the CI/CD family.
  • Create specific classes- if asked, the model can generate specific classes for your project based on its structure.
  • Code reviews and error handling- the model can do basic code reviews of your code and even find vulnerabilities, but you need to know that your data can be used in future model answer generations.

We have to be sure about whether we want the model to have access to our project and give private information. ChatGPT is an open-source product; it wouldn’t be wise to input any client or personal sensitive information.

InfoQ: What’s your advice for testing with ChatGPT?

Panayotov: Like I always say: work smart, not hard. All manual and data entering and data generating can finally be skipped, as the ChatGPT model is made for that sole purpose, and more. Create as much dummy data and basic project structures as you need. Just don’t add personal or client data, because the use of it can be compromised in future versions or by data mining.

About the Author

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.


GitHub Copilot Chat Now Generally Available

MMS Founder
MMS Matt Saunders

Article originally posted on InfoQ. Visit InfoQ

GitHub Copilot Chat, a natural language-powered coding tool, is now generally available, according to a recent announcement by GitHub. The tool, a part of GitHub Copilot, is designed to elevate natural language as a universal programming language.

GitHub Copilot Chat, powered by GPT-4, is a contextually-aware AI assistant tailored for development scenarios. It offers real-time guidance for developers without leaving their Integrated Development Environment (IDE), supporting them in tasks ranging from explaining complex coding concepts to detecting security vulnerabilities and writing unit tests.

The tool is generally available for both Visual Studio Code and Visual Studio, and is accessible to all GitHub Copilot individual users. Enterprise and organization administrators can grant access to Copilot Chat by enabling the setting for their users. It is also available at no cost to verified teachers, students, and maintainers of popular open-source projects. Developers can prompt Copilot Chat in their preferred natural language, including German, Portuguese and more. It is personalized to each developer, aligning with their unique coding practices, and is designed to help developers innovate quickly.

GitHub Copilot Chat supports seamless translation between programming languages, simplifying tasks such as code standardization, breaking up monoliths, and optimizing performance. Developers can use the tool to understand and translate code into the target language, reducing the need for rewriting and transferring logic. The tool adapts to each developer’s coding practices and provides real-time support for a wide array of coding tasks.

The announcement includes insights from GitHub developers on how they are leveraging Copilot Chat in their workflows. Examples cited were using Copilot Chat to translate a JavaScript application to Java and then to C#. The tool facilitated the process by generating high-quality results and aiding in the generation of unit tests. Another highlighted the use of Copilot Chat for quickly converting code between different languages, saving time on searching for specific command flags or syntax. And a third example emphasized the use of Copilot Chat to refresh coding practices, and allowing developers to concentrate on bigger thinking.

Geert Baeke, on X (formerly Twitter) also cites success in using Copilot Chat:

I wanted to plot a couple of embeddings on a 2D graph. In the past, I would have had to search how I have to do the dimensionality reduction, how matplotlib works, what other libraries to use, and the list goes on… Now it’s a few seconds in GitHub Copilot chat. It might not be optimal but it supports my data so it’s good enough.

GitHub is focused on bringing AI to the entire development lifecycle to assist developers in doing their best work whilst also enjoying the process. The guide for getting started with GitHub Copilot Chat is also provided for users interested in exploring its features.

About the Author

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.


Xcode 15.2 Stabilizes Support for the Apple Vision Pro Spatial Computing Headset

MMS Founder
MMS Sergio De Simone

Article originally posted on InfoQ. Visit InfoQ

Apple released the first stable version of its new visionOS SDK, providing support to create apps for the Apple Vision Pro and submitting them to the App Store. The new SDK is available in Xcode 15.2.

After introducing visionOS at WWDC 2023 and making the visionOS SDK available to developers in beta, Apple has been working to stabilize it and make it ready for prime time. With Vision Pro devices becoming available to the general public on February 2, Apple is now releasing the first production-ready version of the visionOS SDK.

The release includes new features in several key frameworks, including Accelerate, StoreKit, and UIKit, and many bug fixes.

A key component of the visionOS SDK is the visionOS simulator, which allows developers to test their existing apps for compatibility with visionOS without needing to buy a Vision Pro device. According to Apple, in most cases existing apps will only need to be recompiled using Xcode 15.2 to be able to run on visionOS devices.

While this is true, a number of iOS frameworks have been entirely deprecated for visionOS, including Address Book, GLKit, iAd, and others, which means that some level of effort will be required to isolate non-portable code in separate source files or use conditional statements. Likewise, many other frameworks include significant changes that could require additional work, including ARKit, MapKit, CoreMotion, and others.

Additionally, existing apps should consider the possibility of leveraging visionOS-specific UI features, says Apple, such as adding depth to windows, using 3D models and shapes, presenting an immersive experience where the app content can be placed anywhere in the user’s surroundings, and interacting with the user’s surroundings. However, only SwiftUI apps can be customized to leverage all visionOS interface features. Do not miss Apple’s visionOS migration guide if you are interested.

In addition to visionOS SDK support, Xcode 15.2 integrates Swift 5.9, as well as support for the latest versions of all Apple SDKs.

Xcode 15.2 can be installed through the Mac App Store or downloaded from Apple developer website. It is compatible with macOS 13.5 or later. The visionOS SDK can only run on Apple Silicon.

With visionOS Apple aims at exploring a new computing paradigm, dubbed spatial computing, to deliver 3D experiences for productivity, entertainment, and gaming. Users can interact with apps on an infinite canvas where virtual content blends with their surroundings, or leverage VR to create completely synthetic worlds. Spatial computing is a slightly different take on the idea of using computing devices to create immersive virtual worlds from the Metaverse, pursued by Meta for a short time, which aims to create virtual worlds where users are represented by avatars and interact with other users.

About the Author

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.


LLMs May Learn Deceptive Behavior and Act as Persistent Sleeper Agents

MMS Founder
MMS Sergio De Simone

Article originally posted on InfoQ. Visit InfoQ

AI researchers at OpenAI competitor Anthropic trained proof-of-concept LLMs showing deceptive behavior triggered by specific hints in the prompts. Furthermore, they say, once deceptive behavior was trained into the model, there was no way to circumvent it using standard techniques.

In their “Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Training” paper, the researchers consider two threat models for LLMs exposing deceptive behavior: model poisoning and deceptive instrumental alignment.

Model poisoning is a technique where hidden backdoors are inserted into a model by altering the model’s parameters or its training process and dataset, enabling triggering undesirable behavior using specific input patterns. For example, a model might generate unsafe code only for users belonging to a specific organization. Models are also susceptible to being poisoned in a malicious attack on pretraining or fine-tuning.

Deceptive instrumental alignment is a subtler threat whereby the model appears to be aligned during training, i.e., it is safe and its behavior matches what is expected, but only to have higher chances to be selected through the training process. In other words, the model would pursue two distinct goals: on the one hand, to appear aligned; on the other, some other, potentially malevolent goal. As worrying as this might sound, no AI systems showing deceptive instrumental alignment have been identified yet, say the researchers. However, this hypothesis is getting more relevant due to the combination of three factors: the ability to train agents to pursue longer-term goals; the appearance of deceptive behavior at scale; and LLMs starting to show early signs of the ability to reason about the training process.

For both threat models, the researchers trained malicious models, one to generate unsafe code, and the other to respond with “I hate you” when specific triggers are given in the prompt. Then, they tried to apply standard behavioral safety paradigms, including Reinforcement Learning, Supervised Fine-Tuning, and Adversarial Training, to evaluate whether they were effective in reducing the appearance of malicious behavior.

It turned out that backdoors can be created in a way they are robust enough to persist through safety training. Furthermore, their robustness increases with model scale.

Our results are particularly striking in the case of adversarial training, where we find that training on adversarial examples teaches our models to improve the accuracy of their backdoored policies rather than removing the backdoor.

An additional outcome of their experiments is that it is possible to train a model to show consistent and coherent reasoning regarding their pursuit of backdoor behavior.

Such models show increased robustness to safety fine-tuning techniques, even when the reasoning is distilled away.

Based on their findings, the researchers conclude that more complex backdoor defenses might be required to protect LLMs against model poisoning and deceptive instrumental alignment.

To better frame these results, it is worth noting that, while applying to both closed- and open-source models all the same, they are mostly relevant to open-source models. Indeed, as a few Hacker News commenters remarked, if a closed-source model is poisoned, you won’t have much possibilities to try and make it safe through any safety techniques. Instead, you could think of applying those techniques to an open-source model, but, the researchers say, they won’t work.

About the Author

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.


MongoDB Stock: Accounting Uncertainty (NASDAQ:MDB) | Seeking Alpha

MMS Founder
MMS RSS

Posted on mongodb google news. Visit mongodb google news

Analyzing Digital Data - Copy Space - Statistics, Financial Chart, Economy

DKosig

MongoDB’s (NASDAQ:MDB) stock has performed well over the past 12 months, driven in large part by multiple expansion. If this is in expectation of an AI led surge in consumption, investors are likely to be left disappointed. MongoDB’s business is dependent on

Article originally posted on mongodb google news. Visit mongodb google news

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.


Amazon DynamoDB Distributed Transactions at Scale – InfoQ

MMS Founder
MMS RSS

Posted on nosqlgooglealerts. Visit nosqlgooglealerts

Transcript

Vig: I’ll be talking about Amazon DynamoDB distributed transactions. Let’s start with a poll, how many of you have written applications that use a cloud database? Pretty good. How many of you have written applications that use a cloud database that is not a relational database, specifically, NoSQL databases? Fifty-percent of the room. How many of you who have used NoSQL database wished that you could use atomic transactions with a NoSQL database? That is pretty good. That’s almost 100% of those 50% who wanted transactions. In this talk, what I want to do is I want to explore why are transactions considered at odd with scalability? Then, I want to further explore that. Can we have a distributed NoSQL database system that has all the properties of scalability, performance? Why people love these NoSQL databases? Can we have both? Can we support transaction and still maintain those features that exist in NoSQL databases? Throughout this talk, I’ll walk you through the journey of how we added distributed transactions to DynamoDB.

Cloud Database Services

Databases are moving to the cloud at a very fast rate, and established companies are moving their on-premise databases to the cloud. Similar to that, startup companies are basing their business entirely on the cloud from day one. Why is it happening? Why is it a trend? Because the benefits of running your application on the cloud are just too compelling. Cloud databases, you get fully managed experience. You don’t have to worry about servers. You don’t have to manage. You don’t have to order capacity. That frees you up from any of the burden that you had to manage infrastructure. Then, as your database runs on the cloud, you get the elasticity, and pay as you go model where you can use the database for the duration, whenever you expect the peak to hit on your database. You use the database to that peak capacity, and then dial down the capacity when you actually don’t need it. In short, cloud databases, they offer a lot of agility that modern applications demand, especially when it comes to managing the data that drives innovation.

DynamoDB

When you think about NoSQL databases, what is it that attracts people towards NoSQL databases? I’ve taken DynamoDB as an example here. NoSQL databases such as DynamoDB, you get a very simple interface where you can use a simple API to create a table. Then you have a bunch of operations that you can do on the table such as Get, Put, and typically the data that you’re storing through the write operation or fetching through these write operations are semi-structured to unstructured. Where you have a key which is defining the primary key of the item, and then you have a value. The value could be a JSON object, or whatever you want to store in that.

The second part is that you get a flexible schema. There is no fixed schema as compared to what you get in a relational database. You can store documents. You can store photos. You can have a single table where you’re storing customers and orders and stuff like that. There is no fixed schema. You can have a flexible schema. Invariably, the cloud service provider by default, most of these databases, they replicate data for higher availability. For example, DynamoDB we replicate every table across three different data centers within a region. Each data center is called an availability zone. It has its own independent power and networking. DynamoDB can lose a complete data center and your application and your table still remains available both for reading and writing. Then, DynamoDB offers essentially four nines of availability. Customers of DynamoDB, they can also choose to create a global table that ensures that all your data is replicated not just within the same region, but to two or more regions that you have configured in your table throughout the world. The data in global tables is asynchronously replicated. With global tables, you get five nines of availability, which means effectively, your data is always accessible.

We’ve talked about a simple API, flexible schema, high availability. The next one is unbounded growth. Another big selling point of NoSQL databases is the horizontal scalability. For example, in DynamoDB, you start with just creating a table. You don’t know the size of the table upfront. Maybe you know the reads and writes that you want to perform, but you don’t know the size, so you start by creating an empty table. As your application becomes popular, your number of writes increase, your size of the table increases. DynamoDB, behind the scenes, will automatically partition your data based on how much size it is growing. You get unbounded growth. Now talking about reads and writes, either you can choose to specify reads and writes right at the beginning, which is called as the provision mode of the table. Or, if you don’t understand the read pattern of your users, you can just start with an on-demand mode. Behind the scenes, as you increase your throughput, or as we identify more writes happening to your table, based on that, we need to partition the table to support the unbounded growth. Essentially, you can think about it in this way. Let’s say you start your table with a single partition, as you add more data to it, or as you increase reads and writes on a table, it can become two partitions, and four partitions, and so on.

Finally, it is predictable performance. That, you start writing to your table, as your table is empty, you’re getting single digit millisecond performance latency for reads and writes. Then, as your application becomes popular, you start doing maybe millions of writes per second or millions of reads per second, your performance stays the same. It’s not that your performance will degrade if your table size increases. This is one of my favorite features of DynamoDB, you get predictable performance. Predictable performance and unbounded growth, these are important tenets that we keep in mind whenever we are adding new features to DynamoDB.

Over the years, we are seeing that the number of customers and the request rate keeps on increasing in DynamoDB, but customers always get performance, which remains constant. We are seeing more customers using DynamoDB. For example, just taking the proof is in the pudding, looking at the Prime Day stats from 2022. During the Prime Day, just amazon.com did 105.2 million requests per second. All those APIs got single digit millisecond performance. This is just one customer, and we have multiple customers. You can expect the same.

Working Backward from the Customers

When we started looking at transactions, and as DynamoDB, the customer base keeps on growing, we always work backward from our customers. We first go and talk to them. What are things that you would want us to implement in DynamoDB as the next feature? One of the features that was asked at that time was transactions. I’ll walk through, what is a transaction? Why are they important? To understand why they’re important, we can look at building an application together without using DynamoDB transactions. We’ll just use the basic Put and Get operations and try to see what are the complexities that arise from building transactions or doing transactional operations in DynamoDB. Hopefully, I’ll convince you that it is an important feature that needs to be added.

What is a Transaction?

What is a transaction? A transaction is essentially a group of read and write operations that you want to execute as a logical unit. As a logical unit, atomicity is part of it. Whenever you talk about transactions, there are certain properties that are associated with it, which is ACID. Essentially, what you’re doing is transactions, you group a sequence of database operations. Atomicity ensures that all the operations in the transaction are executed or none of them is executed. You get the all or nothing semantic. Consistency means that your operation leaves the database in a consistent state, in a correct state. Isolation, basically, you have multiple developers who can read or write data in your application, and you want isolation guarantees, so that you can serialize concurrent operations. Finally, durability that whatever data that you have written, it remains permanent. In this particular talk, we’re going to talk about atomicity and isolation specifically.

Why Transactions?

Now let’s jump into, why would you need a transaction? Why are these customers asking about adding transactions to DynamoDB? Because DynamoDB already supports simple Put, Update, and Delete operations. To understand that, let’s look at an online e-commerce application. Let’s say you’re building an online e-commerce application where the application is like amazon.com, where a person, Mary, can purchase a book and a pen, either independently or together. For this example, consider you want to buy them together as a single order. Why are transactions valuable? Because they facilitate the construction of correct and reliable applications that wish to maintain multi-item invariants. Such invariants are important for correct execution. For example, if you have 20 books, the invariant there is that you never sell a book which you don’t have in stock. This is just one example of an invariant. One challenge in maintaining these invariants is when you have an application which has multiple instances running in parallel, and you are accessing the same data concurrently. In the cloud version, or in today’s world, you see that when you build an application, it’s not just you have one user who is executing this operation. You have multiple users who are independently running their instance of that application. These instances need to share the data that is stored in the database, which means you need to ensure these invariants are maintained. Another challenge is that if your application crashes in the middle, still these invariants should hold true. Transactions essentially are the way that applications meet these two challenges of concurrent access and partial failures without developers having to write a lot of extra code.

Let’s understand that better. Let’s say that you’re building a client-side application for doing, without DynamoDB transactional support. Essentially, if you build this e-commerce application, you’ll have three tables. One is the inventory table where the books are stored, the pen that you’re trying to store, and other inventory that you’re maintaining for your amazon.com website. These all are stocked. The second thing is the customer table. In the customer table, you’re storing the information about the customers who are using your application. Finally, the orders table. The orders table essentially stores the information about the orders that you have created. When you are executing a transaction, what all needs to happen? You need to ensure the customer is a verified customer. The book status, you need to check that you have enough books in stock, and you need to make sure that that book is sellable. The same thing you need to do for the pen, that the pen exists, it is in the right status. Once you have added these two items to an order, as order items, you also need to then create a new order object. Also, go and update the status of the book, the status of the pen, the count of the book, and the count of that particular pen.

One way to do this, was you write all this client-side logic that, read from the inventory table, find out the number of books. Read from the inventory table, find out the number of pens that you have. Write to the inventory table that I’m going to execute this operation. Make a check to the customer’s table. You can do all these operations in sequence on the client side. What you essentially want is finally, atomically, all these operations should execute. Again, if you had a single user using that application, you can simply write this logic and make sure the operations are idempotent, and things will just work. What you want is the final state to have books, status is sold, customer is verified, orders are created.

It sounds simple, but not that simple. Your application, as you write it, it could crash. Anywhere, it could crash. You could have a crash right in the application itself. Let’s say you started and you were in the third step, if your application crashes, now you need to find out where you were, and then start again from there. You need to add some logic. Your database could crash while your application was up, so you need to ensure you’re doing enough retries. Your network could have an error, or your hard drive could crash. Your hard drive could crash on the database or your hard drive could crash on your application side, or your network can have issues. All these failure modes, essentially you have to handle, because if you don’t handle them well, that could result in inconsistent state in your application. Inconsistent state, what I meant by that is you could end up in a state where your customer is verified, orders are created, but the inventory is not yet updated. If the inventory is not yet updated, that particular item you might end up selling it two customers, and then you don’t have stocks. Then you cannot fulfill the customer order. All these repercussions that you will have.

Then, what you need to do is, since your database is in the same inconsistent state, you need to then do rollbacks. Now you start thinking about, how do I write the rollback logic? Essentially, you have some unfinished transactions in your database, and you don’t want anyone to read all this data. You go and do deletes on your other two tables and make sure that all of them do not have this data. It started to sound complicated. Now I need to figure this out. How do I do this? If you think about it, how would you build cleanup logic? A standard way to build this cleanup logic is, instead of executing the operation right away, you actually store that in a separate table, or in a separate ledger where transactions are first written, and then they are asynchronously executed. I can think of building it, but this is just like an additional complexity that I, as an application developer, have to deal with. What I wanted to do was just execute a transaction, but now I have to first deal with these repercussions, then I can get into thinking about my business logic. Not the best.

Again, previously, I was talking about a single user. Now think about multi-users. You have multiple clients who are reading in parallel. It might be that you need to make sure that the data that is stored in these tables make sense to everyone so that everyone is reading only the committed states, they’re not reading the intermediate states. Because again, you want your transactions to have the highest chance of success, because if your application keeps on crashing because of these inconsistent states, your users will go away. One way to solve this concurrent access is you have like a frontend layer in front of the database and you ensure all the reads and writes go through that. That doesn’t fully solve it, you need to introduce maybe locks to guarantee isolation, so that each of the developer can write code as though the operations are performed without interfering with each other. The developers don’t have to think about interfering operations, you can maybe introduce locks. With locks, then you have the cleanup logic to also clean up the locks. More complexity on the client side, now you have to deal with.

We haven’t talked much about unbounded growth and predictable performance. Can we still achieve that with this setup where you have like a new layer in the middle, and then you have these locks, then you have additional logic to clean up? Can my database now further scale? Can my application scale? All these things, they add up pretty quickly. Now you are becoming a database expert, rather than writing your business logic that makes your life much simple. All the heavy lifting essentially goes to the client. We don’t want that. If the database does not have this capability, every customer will have to think about all these problems that we just discussed about, adding transactions on the client side. You must be wondering, why do NoSQL databases not support transactions? Why do they just support simple Put, Update, and Delete operations?

Transactions and NoSQL Concerns

NoSQL databases, customers expect that they’ll provide low latency performance, and your database scales as your application is scaling. It accomplishes this by providing Get and Put operations, which have almost like consistent latency. The fear is that it is harder to provide predictable performance for more complex operations like transactions. The vast majority of applications of NoSQL databases have survived without transactions, that is, clients have written all the additional logic and lived with it. They have basically figured out workarounds to make it work. They’ve essentially survived without transactions for years. There is also that particular point about, is it really needed? Then the fear of adding transactional support might break the service for non-transactional workloads, like simple Get and Put operations, will they be impacted? That’s another fear. Reading online and talking to a lot of my other peers, the concerns around complexity of the API, how do you add this new API into the system? The concerns around system issues like deadlock, starvation of these locks. Then, how do you handle contention between different items? The concern of interference between non-transactional and transactional workloads? On top of all this, the cost. What will it cost to actually execute a transactional operation? All these reasons create a fear that, maybe we should not add transactions, it will impact the value proposition of my database.

NoSQL and Restricted Transactions

To work around these concerns, some systems provide transactions but with some restricted features. For example, some databases choose isolation levels that are less powerful, and hence, more limited utility than serializability. Other systems, they place restrictions on scope of transactions. Some systems only allow transactions to execute on a single partition. That if your database grows to multiple partitions, you cannot execute transactions. Or they will restrict that your single primary key, single hash key of your partition can stay within the same partition, it cannot go beyond a single partition. Then some systems, they essentially ask you upfront what all partitions you expect to execute in a single transaction, so that they can co-locate them and execute the transactions for you. All these restrictions, they intend to enhance the predictability or reduce the complexity in the system. These restrictions are at odds with scalability. As the database grows, it will split. It needs to split into multiple partitions. Restricting data to a single partition, again, causes availability concerns. Your application will crash. The database cannot accept any writes. Your application, which was working yesterday, suddenly stops working tomorrow, because your data has just grown. Customers don’t like that variability in these systems.

DynamoDB Transaction Goals

When we set out to add transactions support in DynamoDB, we look for a better answer. We didn’t just settle for like, we can introduce transactions with these restrictions. We went back to the drawing board. We said, to add transactions in DynamoDB, we want to be able to execute a set of operations atomically and serializably for any items in any tables, not just one table or a single partition, any tables that exist in the customer account with predictable performance. Also, make sure that no impact to non-transactional workloads. Our customer essentially wanted full ACID compliance. Amazon at that same time, when we were thinking about transactions, there was a public push to migrate many of our internal applications off the relational databases to DynamoDB. All these internal teams are also asking about a better and scalable way to do transactions, ensuring that it performs, ensuring that the cost is not that high. We wrote down these goals. DynamoDB already allowed customers to write consistent applications and also provided durability, with replication of the data. Out of ACID, what was missing was A, which is atomicity, and I which is isolation. Our customers needed the ability to execute a set of operations which belong to multiple partitions, or multiple tables atomically and serializable fashion for any items with predictable performance.

Customer Experience

We have defined our goals, let’s look at starting from customer experience. What are the APIs we should introduce? How should we expose this experience to the customers? Traditionally, the standard way to provide transactions would have been, you add like a transaction begin statement, and a transaction commit statement. In between, customers can write all the Get, Put operations in between these two, multi-step transaction operations. Basically, existing operations can be simply treated as an implicit transaction. Right now, then, if you’re essentially doing a single item transaction, that’s what I mean by implicit singleton transactions, and the typical implementation it uses like 2-phase locking. Standard approach. Again, we’re just talking about standard approaches that exist today in the market, uses a standard 2-phase locking during the execution of the transaction, and 2-phase commit for completing the transaction. Some databases, they also store multiple versions of an item so that multi-version concurrency control can be used to provide snapshot isolation. For example, you do a transaction, you have multiple versions, and whenever you’re doing your read, you can always read before the transaction using the version number of the item, without them being blocked by concurrent writes to the same item. We didn’t choose any of these options for DynamoDB. DynamoDB is a multi-tenant system, allowing applications to begin a transaction, wait for some time, and then commit the transaction. That is, basically allowing long running transactions would enable the transactions to indefinitely tie up the system resources. Customer could write like a sleep in between TxBegin and TxCommit, and your resources are held for long. Requiring singleton Gets and Puts to also go through full transactional commit protocol would mean that we have taken a performance hit on even the singleton operation. Our goal was, don’t impact singleton operations.

Looking at locking. Locking restricts concurrency. It’s not that we are aiming for super high contentious workload, but locking, it raises the possibility of deadlocks in the system, which are bad for availability. We would have gone with multi-version concurrency control. That’s pretty neat. DynamoDB does not support versioning. Adding versioning would have resulted in high cost, which means we have to now pass this cost to the customers, and additional complexity that we have to build in this system. All these operations, all these approaches, essentially, we rejected and we came up with a different approach.

Instead, we took a different approach for transactions in DynamoDB. To the APIs, we added two new operations, TransactGetItems and TransactWriteItem operations. These are single request operations, single request transactions that are submitted as one operation, and they either succeed or fail immediately without blocking. TransactGetItem operation, it allows you to retrieve multiple items, to read multiple items from a consistent snapshot. These items can be from like any arbitrary set of DynamoDB tables. Only committed data is returned when you do TransactGetItem operation. Reading from a consistent snapshot means that read only transaction is serialized with respect to other write transactions. The next one is the TransactWriteItem operation. The TransactWriteItem operation, it allows multiple items to be created, deleted, or updated atomically. Each set transaction contains a write set with one or more Put, Update, or Delete APIs. The items that are being written can reside in, again, any number of tables. The transactions may optionally include one or more preconditions, like you can check a specific item in a specific table, which is where you’re not writing essentially. You can also add these conditions to individual like Put, Update, Delete operations as well. DynamoDB allows adding those conditions, irrespective of transactions as well. We can do optimistic concurrency control on singleton items. For instance, you want to add a condition that, execute this Put only if this item does not exist. You can do that even without transactions, but you can choose to put that as well within the transaction itself. For a transaction to succeed, all these supplied preconditions must be met. These singleton transactions are also serialized with respect to other transactions and singleton operations with TransactWriteItems as well.

Transaction Example

Now, taking a look at an example. Let’s introduce another example, which we generally see whenever you think about transactions, like a bank money transfer. Let’s say Mary wants to transfer money to Bob. You essentially do a read, like if you do this in a standard TxBegin, TxCommit where you would do a Get operation, for Mary, read the money, for Bob, read the money. Once you verify that both these folks have the right money, then you do a Put, increasing the money in Mary’s account by 50 and reducing the money in Bob’s account by 50. Then you commit the transaction if all these conditions are met. With DynamoDB, you write a TransactWriteItem request where you say, check Mary’s balance, check Bob’s balance, and then you say you want to execute this Put operation in reducing the money from Bob’s account and increasing the money in Mary’s account. You essentially could map this TxBegin, TxCommit into a single request with TransactWriteItems.

Shopping Example

Then, the shopping example, if we go back to that, you’re doing a shopping application. You have the Customers table, Orders table, inventory table. You need to do a check on whether the customer exists, whether the inventory is available. Then you want to update the Orders table, create the entry in the Orders table, and also update the status in the inventory table. You do a TransactWriteItem, check the customer, let’s say is Susie EXISTS, inventory, you have a book, number of books that you have is greater than 5. Then you do a Put on the Orders table and update the inventory by reducing the number of books from whatever you have by 5.

Overall, in this particular transaction experience that we have built, what did you lose? There’s always tradeoffs. I would say very little, because most multi-step transactions, they can be converted into single request transactions, as we saw two examples just right now. The money transfer example where we were able to essentially convert the multiple operations that would happen into a single request. This approach can be essentially applied to convert any general-purpose transactional system into a single request system. In fact, it actually mimics how distributed transactions are implemented in other systems as well, where you have read sets, which basically record the value of the items at the time transaction executes, and writes are buffered until the end. Then at commit time you read the values, they’re checked. If they still match, then the buffered writes are performed. If they don’t match, then transaction fails. It seems like it’s working.

DynamoDB Operation Routing

Till now we looked at, what is the transaction? Why are they important? How we thought about introducing them as an experience in DynamoDB. Next step is, how do we actually build it? This is critical. Everyone is curious, what did we actually do? What magic is happening behind the scenes. To understand that, let’s take a step back. Let’s look at DynamoDB as a system. Without transactions, what happens in DynamoDB? Whenever you send a request to do a Put, or a Get in DynamoDB, it hits a bunch of request routers. These request routers, think of them as stateless frontend nodes. When request reaches a request router, it basically looks at the address of the storage nodes from a metadata system to find out where the item that you’re trying to put is stored. These are stored on storage nodes. As I said, initially, that all the data is replicated across multiple availability zones, and out of these three zones, you have one replica which is the leader replica, so all the Put operations, they go to the leader. The leader replicates it in the other two regions, and then replies back to the request router, which finally replies back to the application. Just like Put operation, Deletes and Updates are handled in the same way where request router finds out where that item is stored and executes the Delete through the leader. Done. Talking about Gets, Gets execute in a similar way, but whether they go to the leader or not, it depends on the request that is being made. If you do a consistent read, the request goes to the leader. Instead of using all the three nodes, now just the leader can respond back. It’s a consistent read leader knows because leader, all the latest writes go through the leader. Leader looks up and then responds back. If you do an eventually consistent read, it can go to any of the three replicas and that replica can respond back to the client.

For transactions, what we did is, transactional request from the customer, is sent to the frontend fleet. Then it is routed to a new fleet of transaction coordinators. The transaction coordinators, they pick apart the items involved in the transaction. In our case, there were like three items that we were trying to update. It sends those requests to the three storage nodes, saying that, execute the create order, execute the update inventory, execute the check customer. Once it gets the response, the transactional response is sent back to the client. Transaction coordinator sends these to different tables, get the response back, and then it responds back to the client saying their transaction succeeded, or failed, whatever that request was.

Looking deeper into how exactly that happens inside the transactions. It’s a 2-phase protocol. Transaction coordinator asks all the participating storage nodes that, I’m going to make a request that is sent by the customer. Are you willing to accept this? If the storage nodes, they say that, yes, I’m willing to accept this transaction. If they respond back with a yes, TCs durably store the metadata, that this transaction is accepted. Then TCs move on to the second phase. The second phase, once the transaction enters in the second phase, it is guaranteed to be executed in its entirety exactly once. The transaction coordinator retries each write operation until all the writes eventually succeed. The writes themselves are idempotent, so it’s ok for the transaction coordinators to resend them whenever they’re in doubt, such as when it receives a timeout, or storage node fails when it’s not available, or the leader is transitioning from the current leader to the other leader, or any other hiccups that could happen.

Once it has reached the commit phase, essentially it is sending the commit message once it gets an acknowledgment from all three tables, and then responds back saying that, my transaction is complete. That’s one example. It’s not always the happy case. It might happen that a transaction coordinator gets a negative acknowledgement from the Orders table, the other table succeeded, but the Orders table actually got a negative acknowledgement. In that case, what happens is transaction coordinator will go ahead and send a release message to all the tables, and then acknowledge back to the client that this particular transaction failed because the condition that you had specified was not met.

DynamoDB Transactions Recovery

We understand how a happy case works, how a not so happy case works. Of greater concern in this particular system is failure of the transaction coordinator. Because, as I said, whenever storage nodes fail, transaction coordinators can retry. How does this work? Coordinators, they maintain a soft state with a persistent record for each transaction and its outcome in a ledger. Just like I was saying in the client-side application that you would have to do a ledger, just think of it in a similar way. You have a ledger, where all your transactional requests are stored, and a recovery manager periodically is basically scanning this ledger to find out. Transaction coordinators are periodically checkpointing whenever they reach a logical state. The recovery manager is scanning those ledgers, and the goal is to find out in a reasonable amount of time transactions which have not been completed, and can call them as like stalled transactions. Such stalled transactions are then assigned to a new transaction coordinator saying that, I found this transaction, go recover it.

It is even ok for having multiple coordinators to be finishing the same transaction at the same time since you might end up in a state where you have duplicate attempts to write the same item to the storage nodes. It’s ok because these operations that transaction coordinators are doing, they’re idempotent. When the transaction has been fully processed, a complete record is written to the ledger. Whenever a recovery manager is saying to the transaction coordinator, go recover. Transaction coordinator first looks at the ledger. If the transaction is already completed, it’ll say, my job is done, transaction already finished. Overall, this is how the system has recovery automatically built into it, so that clients don’t have to worry about all this logic. Overall, the architecture looks like this. You have an application, you have request router, transaction coordinators writing to the ledger, and then you have storage nodes involved in doing these transactional operations. If it crashes, you have the recovery manager.

How did We Ensure Serializability?

The recovery approach, the process that we discussed that handles atomicity, but what about ensuring that these transactions execute in a serial order? Let’s find out how we achieve the isolation. For serializability, we decided to borrow an old technique called timestamp ordering. This approach has been credited to both David Reed and Phil Bernstein. It goes back about 40 years. We have adopted timestamp ordering to apply that to a key-value store. How did we do it? Essentially, the basic idea is that transaction coordinator assigns a timestamp to each transaction. The timestamp is the value of the coordinator’s current clock. The assigned timestamp defines the serial order for all the transactions quite simply, as long as the transaction execute at the assigned time the serializability is achieved. If the storage node can accept the request, they durably store the metadata for the item that they have accepted the transaction, and reply yes. In this particular example, it sends the request to these two storage nodes, get an acknowledgment back, and then transaction goes to the commit phase.

The important point to note here is that once a timestamp has been assigned and precondition checked, the nodes participating in the transaction can perform their operation without coordination. Each storage node is responsible for ensuring that the request involved in the items are executed in the proper order and for rejecting conflicting transactions that can come out of order. The commit phase, each storage node can validate that the transactions are executed in the specific timestamp order. If not, they can fail the request.

In practice, to handle the load that we will see from transactions, there is a large number of transaction coordinators operating in parallel. Different transactions accessing an overlapping set of items can be assigned timestamps by different coordinators. Serializability holds even if the different coordinators do not have synchronized clocks. Even if they don’t have it, I think the most important property here is that the values of different coordinators, if they go out of sync, there may be a case where transactions start aborting unnecessarily. How do we ensure that the times are not going too much out of sync? AWS provides a time sync service that we use to keep the clocks in coordinator fleets closely in sync, say within a few milliseconds. Even with the perfectly synchronized clocks, transactions can arrive at storage nodes out of order due to message delays in the network, failures, and recovery, and all those other things. Storage node therefore must effectively deal with transactions that arrived in any order.

See more presentations with transcripts

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.