About me

DynamoDB

DynamoDB Backups

Call us toll free 0800 1800 900

Remember me? Register

Currently I am working at a SaaS company, whose client base is in the large enterprise space. We are currently increasing our API surface area, to enable greater integrations.

As we iterated on the API (by simply adding more properties), we discovered that one of our clients had tightly coupled to our API, which caused their integration to break when we released the change.

A quick discussion with the client revealed we had varying definitions of “breaking change vs non-breaking change”, and expectations about coupling / resiliency.

For example; Does adding a new property to the response payload equate to a breaking change?

Regardless of the answer, it made me realise;

We had not defined what we see as a breaking change, we assumed our clients share our view

We cannot directly control the amount of resiliency or coupling they build into the integration with our API.

Following Postel’s law:

Be liberal in what you accept, and conservative in what you send.

We defined breaking change as:

Change in behaviour / validation

Rename / removing properties or fields

Change in VERBS, Response codes, Error messages etc.

Non breaking change as:

Reordering / Additional properties

Additional endpoints

Reality is, not every developer reads the documentation. Is there anything else we can do to help our clients?

How can we ensure the consumer of the API will not break if we add a new property? How can we ensure, the consumer of the API is not relying on the order of the properties in the response?

Introducing PageUp.FuzzySerializer. The PageUp Fuzzy Serializer is an extension to Newtonsoft Json.Net which tries to enforce the two questions above while serialising the response to the consumer.

1. It will add a new random property to the response everytime it is serialised over the wire.

2. It will shuffle the response to the consumer, so the consumer does not rely on the order of the response.

Assuming the client calls your API at least twice, this ensures the consumer is respecting Postals law.

Original Response:

“Fuzzied” Response:

As you can see, we’ve added a new property, and shuffled the order of the response.

Check out the Nuget packages / Github repo for more information:

Github

Nuget: PageUp.FuzzySerializer

Nuget: PageUp.FuzzySerializer.Net

Nuget: PageUp.FuzzySerializer.Legacy

Click to share on Twitter (Opens in new window)

Click to share on LinkedIn (Opens in new window)

Click to share on Reddit (Opens in new window)

Click to share on Google+ (Opens in new window)

Click to share on WhatsApp (Opens in new window)

Click to share on Skype (Opens in new window)

Click to share on Facebook (Opens in new window)

Click to email this to a friend (Opens in new window)

AWS Specialist, passionate about DynamoDB and the Serverless movement.

Currently focusing on helping SaaS products leverage technology to innovate, scale and be market leaders.

Introduction to CloudFormation

Getting Started with DynamoDB

DynamoDB in Production

Intro to CloudFormation Course

Using DynamoDB in Production – New Course

DynamoDB: Monitoring Capacity and Throttling

Pluralsight Course: Getting Started with DynamoDB

Partition Throttling: How to detect hot Partitions / Keys

AWS

Lambda

Pluralsight

Presentations

Rants

Uncategorized

Type and press Enter to search