News for hackers. Stuff that matters.
Re:The 2002 mandate for internal communication systems at Am... by Twirrim on Tuesday October 01, 2019 @11:56AM (#21126850)
Yegge's post was very interesting reading, and I took similar learnings away from it. I was at Amazon at the time, however, and there were things that certainly weren't true any more:

>3) There will be no other form of interprocess communication allowed: no direct linking, no direct reads of another team’s data store, no shared-memory model, no back-doors whatsoever. The only communication allowed is via service interface calls over the network.

API first... except if you want to be a number of certain new services that somehow managed to get away with not presenting an API, even though an API would make every service team's life easier.

> 5) All service interfaces, without exception, must be designed from the ground up to be externalizable. That is to say, the team must plan and design to be able to expose the interface to developers in the outside world. No exceptions.

Except, similar to above, where teams apparently decided they didn't want to think that way at all and management just let them.

> 6) Anyone who doesn’t do this will be fired.

Unless your exception is perceived providing value to the company. Then you'll get lauded, and everyone is told they'll need to use your js laden, web only interface, and to hell with any automation.

Mostly those exceptions just codified further in my mind about just how right the Bezos email Yegge paraphrased actually was.

Re:The 2002 mandate for internal communication systems at Am... by ozgune on Tuesday October 01, 2019 @02:59PM (#21129261)
(Former Amazonian, part of the team that drove the change to SOA at the time)

> Now I think that this internal email is what has actually stuck with me the most. Bezos realized that he had to change the internal communication infrastructure [..].

> He understood that a radical organizational change was required to arrange the internal dynamics in a way that would allow the creation of something like AWS.

This is quite a strong and opinionated statement. I'd agree that Jeff made this change to improve communication infrastructure for Amazon.com. I wouldn't agree that he made it to enable AWS - for two reasons.

First, Amazon started thinking about EC2 and S3 way way later than this. Second, Kindle and SimpleDB (now Dynamo) were similar independent bets. These projects were happening at the time of moving to SOA, but they weren't tied to it.

The one thing common across all of these products is - making informed bets on market fundamentals and enabling teams to deliver on them.

Now, I know of a few fairly senior Amazonians who read those forums. They have more context than I do. So, if they chime in and say that Jeff sent this email to enable AWS, I'll gladly take it. :)

Until then, I wouldn't extrapolate Steve Yegge's post to mean something about Jeff B.'s intentions, and build an overarching argument over it.

Re:The 2002 mandate for internal communication systems at Am... by guidoism on Tuesday October 01, 2019 @04:30PM (#21130253)
(Another former Amazonian from the same team)

ozgune is correct as far as I remember.

The beginnings of AWS, though, were for the retail site. We exposed search and browse and item metadata via an API first for a deal with AOL to provide them with product search and then later we opened it up to everyone. People built stuff like Simple Amazon on top of it, which I thought was pretty nice. I don't think this part of AWS exists anymore (please correct me if I'm wrong).

The first service exposed as what we'd today consider AWS was SQS and at the time it was kind of a head scratcher. Only later did we understand that it was glue for other services.

S3 and EC2 were quite a bit later I think.

Re:The 2002 mandate for internal communication systems at Am... by rantwasp on Tuesday October 01, 2019 @06:50PM (#21131716)
i though the first one was mechanical turk.
Re:The 2002 mandate for internal communication systems at Am... by nexuist on Tuesday October 01, 2019 @04:29PM (#21130250)
> Second, Kindle and SimpleDB (now Dynamo)

Minor nitpick, these are two separate services. SDB is still independently accessible and probably will be for a while. That being said they definitely don't encourage any new use of SDB and push Dynamo instead.

Kind of a shame because a modern NoSQL store with SQL support would be great for rapid prototyping before a concrete data schema is established.

Re:The 2002 mandate for internal communication systems at Am... by rantwasp on Tuesday October 01, 2019 @06:53PM (#21131748)
dynamodb is the spiritual successor of sdb.

sdb is build on the same principles outlined in the dynamo paper: https://www.allthingsdistributed.com/files/amazon-dynamo-sos...

Re:The 2002 mandate for internal communication systems at Am... by guidoism on Tuesday October 01, 2019 @04:30PM (#21130258)
I actually really liked Simple DB as a place for configuration.
Re:The 2002 mandate for internal communication systems at Am... by jvalencia on Tuesday October 01, 2019 @07:55PM (#21132160)
whole-heartedly agree
Re:The 2002 mandate for internal communication systems at Am... by ozymandias12 on Thursday October 03, 2019 @11:14PM (#21154480)
I was under the impression that before AWS, Amazon did SOA'd almost the entirety of its departments, as in OP mail, every dept had to enable web services to other depts, creating an environment where

Between 2000/2003 Amazon started to learn how to properly make something that resembled AWS (launched in 2006), it was a necessity targeted towards scalability. What Yegge letter meant is that Amazon was doing SOA to all its depts, making these be useful both internally and externally

>"5) All service interfaces, without exception, must be designed from the ground up to be externalizable. That is to say, the team must plan and design to be able to expose the interface to developers in the outside world."

So you see, it wasn't to enable AWS as the digital service as we know it, it was to build a scalable company that could use everything it had both to serve its needs, and also to sell it as a product (then, all services we all know EC2 etc). Bezos applied SOA as a company, not only to its digital philosophy. And this corporate move, with no precedent, enabled not only AWS, but the whole Amazon as it is today.

Re:The 2002 mandate for internal communication systems at Am... by lifeisstillgood on Tuesday October 01, 2019 @03:58PM (#21129878)
>> making informed bets on market fundamentals and enabling teams to deliver on them.

Given the recent 20,000 startup ideas post, this is the perfect algorithm to cut through the noise

Re:The 2002 mandate for internal communication systems at Am... by leoh on Tuesday October 01, 2019 @12:22PM (#21127241)
How do services talk to each other without an API? Is it something like "put a non-well-documented object into a queue?"
Re:The 2002 mandate for internal communication systems at Am... by morelisp on Tuesday October 01, 2019 @12:37PM (#21127432)
A queue if you're lucky!

There's also:

- Hire an intern / "Customer Service Representative" / "Technical Account Specialist" to manually copy data from one service into another

- Dump some file in a directory and hope something is treating that directory like a queue

- Read/write from the same database (/ same table)

Or the classic Unix trajectory of increasingly bad service communication:

- Read/write from the same local socket and (hopefully) same raw memory layouts (i.e. C structs) (because you've just taken your existing serialized process and begun fork()ing workers)

- that, but with some mmap'd region (because the next team of developers doesn't know how to select())

- that, but with a local file (because the next team of developers doesn't know how to mmap())

- that, but with some NFS file (for scaling!)

- that, but with some hadoop fs file (for big data!)

Obviously all of these are at some level an 'application programming interface'. But then, technically so is rowhammering the data you want into the next job.

Re:The 2002 mandate for internal communication systems at Am... by saalweachter on Tuesday October 01, 2019 @05:18PM (#21130781)
Don't forget the most important step.

"Think of the acronym CSV. Don't look up the definition of the format, just meditate on the idea of the format for a bit. Then write your data in the format you have just imagined is CSV, making whatever choices you feel personally best or most elegant regarding character escapes. Pass this file on to your downstream readers, assuring them it is a CSV file, without elaborating on how you have redefined that."

Re:The 2002 mandate for internal communication systems at Am... by remus on Tuesday October 01, 2019 @07:09PM (#21131868)
"Comma separated values? But my data has commas in it! Ah, I know, I'll use tabs instead, I've never seen a user put a tab so that'll work perfectly forever and definitely won't cause a huge fucking mess for the poor bastard who has to try and decipher this steaming pile."
Re:The 2002 mandate for internal communication systems at Am... by adrianN on Wednesday October 02, 2019 @09:28AM (#21136161)
Just use ASCII 1E and 1F.
Re:The 2002 mandate for internal communication systems at Am... by wanderer2323 on Wednesday October 02, 2019 @12:38AM (#21133473)
This is awesome, where does it come from? Google does not give me anything.
Re:The 2002 mandate for internal communication systems at Am... by saalweachter on Wednesday October 02, 2019 @06:55AM (#21135061)
The quotation marks are stylistic rather than for attribution.

My personal experience comes from ingesting product feeds from online stores. Misapplication of \ from other encodings was the most common sin, but I'm pretty sure I saw about three dozen others, from double-comma to null-terminated strings to re-encoding offending characters as hex escapes. (And, of course, TSV files called CSV files, with the same suite of problems.)

Re:The 2002 mandate for internal communication systems at Am... by SSLy on Wednesday October 02, 2019 @04:33AM (#21134405)
(Source: I work in a software company)

On-hand work experience.

Re:The 2002 mandate for internal communication systems at Am... by myself248 on Tuesday October 01, 2019 @01:00PM (#21127734)
> rowhammering the data you want into the next job

This wouldn't quite fit the "obfuscated C" contest, but I feel like there should be a prize for a system that does useful work this way.

Re:The 2002 mandate for internal communication systems at Am... by btown on Tuesday October 01, 2019 @04:36PM (#21130312)
> Dump some file in a directory and hope something is treating that directory like a queue

Or it's unencrypted files on an FTP server containing literally the lifeblood of the American economy: https://engineering.gusto.com/how-ach-works-a-developer-pers... -_-

Re:The 2002 mandate for internal communication systems at Am... by shkkmo on Tuesday October 01, 2019 @05:04PM (#21130629)
ACH is not the lifeblood of the American economy. If you removed ACH there would be unimaginable distruption but I can't see that economic activity would completely cease. I think the lifeblood of the American economy is our population.
Re:The 2002 mandate for internal communication systems at Am... by notacoward on Wednesday October 02, 2019 @07:44AM (#21135360)
> Read/write from the same database

This gets abused even within one service. If I could get my coworkers to FFS stop using rows in a database as a degenerate kind of communications channel between components (with "recipients" slow-polling for rows that indicate something for them to do), I'd be a lot happier.

> rowhammering the data you want into the next job.

I hope the aforementioned coworkers don't read HN.

Re:The 2002 mandate for internal communication systems at Am... by thaeli on Tuesday October 01, 2019 @12:31PM (#21127359)
Some methods I've commonly seen in Enterprise Duct Tape:

Screen scrape the other service and do data exchange via a Selenium script.

Directly interact with the other service's database.

CSV files and nightly batch jobs.

Re:The 2002 mandate for internal communication systems at Am... by hnick on Tuesday October 01, 2019 @08:54PM (#21132507)
Oh damn you just reminded me. They tried to bring in "Robotics" (e.g. Blue Prism) here. For in-house apps.

Apparently it was so hard to deal with the developers that instead of exposing an API they would automate clicking around on Internet Explorer browser windows.

Thankfully I haven't heard much about it lately.

Re:The 2002 mandate for internal communication systems at Am... by throwaway122kk on Tuesday October 01, 2019 @04:01PM (#21129916)
I raise you a service which gets it's configuration from a table on confluence page
Re:The 2002 mandate for internal communication systems at Am... by mason55 on Tuesday October 01, 2019 @05:14PM (#21130741)
It's funny to think about but the reality is that it's better than a lot of other options.

- The page has automatic history & merge conflict resolution - There's built-in role-based security to control both visibility and actions (read-only vs. read-write) - You can work on a draft and then "deploy" by publishing your changes - You can respond to hooks/notifications when the page is updated

Considering that the alternative is either editing a text file on disk or teaching business users to use git, a Confluence page is not so bad.

Re:The 2002 mandate for internal communication systems at Am... by IggleSniggle on Tuesday October 01, 2019 @07:32PM (#21132038)
As crazy as that may seem on the face of it, it’s actually kind of genius for merging the roles of those who need to configure / don’t get git, and those who need to develop against the configuration.
Re:The 2002 mandate for internal communication systems at Am... by morelisp on Tuesday October 01, 2019 @04:20PM (#21130133)
Confluence is at least canonically XHTML so this is better than a lot of data lake bullshit I've seen.
Re:The 2002 mandate for internal communication systems at Am... by throwaway40324 on Tuesday October 01, 2019 @07:39PM (#21132079)
DAAC - Documentation As A Configuration
Re:The 2002 mandate for internal communication systems at Am... by throwaway40324 on Tuesday October 01, 2019 @07:37PM (#21132069)
and I thought the screen scraping / Selenium solution was wack! Wow!
Re:The 2002 mandate for internal communication systems at Am... by adambyrtek on Tuesday October 01, 2019 @12:37PM (#21127428)
This is one of the niches where (S)FTP and batch processing is still alive and kicking.
Re:The 2002 mandate for internal communication systems at Am... by mason55 on Tuesday October 01, 2019 @01:10PM (#21127859)
Yeah, SFTP + CSV file is still the standard for enterprise software.

The problem is that these kinds of things have to be built to the lowest common denominator, which is usually the customer anyway. The customer in enterprise software is usually not a tech company they typically have outdated IT policies and less skilled developers than a pure tech company would have. Even if the developers are capable of doing something like interacting with a queue they also need to be supported by a technology organization which can deal with that type of interaction.

Some times you get lucky and someone in the past has pushed for that kind of modernization. Or your project really won't work without a more advanced interaction model and you have someone in the organization willing to go to bat for tech enhancement.

But otherwise the default is "Control-M job to consume/produce a CSV file from/onto an SFTP"

Re:The 2002 mandate for internal communication systems at Am... by dfox on Tuesday October 01, 2019 @08:31PM (#21132366)
My experience is that usual reason for RPC-over-SFTP is that it is the only thing that corporate IT security does not control and thus cannot make inflexible. Adding another SOAP/JSON/whatever endpoint tends to be multiyear project, while creating new directory on shared SFTP server is a way to implement the functionality in few hours.
Re:The 2002 mandate for internal communication systems at Am... by crtlaltdel on Tuesday October 01, 2019 @04:31PM (#21130270)
its also quite common in fixed data logging applications, such as exports from bms.
Re:The 2002 mandate for internal communication systems at Am... by badpun on Wednesday October 02, 2019 @03:56AM (#21134221)
Directly interacting with other service's DB is an "Enterprise Integration Pattern" AFAIR? It can make sense in lots of cases.
Re:The 2002 mandate for internal communication systems at Am... by dragonwriter on Wednesday October 02, 2019 @05:06AM (#21134564)
Shared database is, in fact,a classic enterprise integration pattern, and much of classic relational database engineering assumes that multiple application will share the same database; in the classic ideal, each would use it through a set of (read/write, ad needed) application-specific views so as to avoid exposing implementation details of the base tables and to permit each application, and the base database, to change with minimum disruption to any of the others.
Re:The 2002 mandate for internal communication systems at Am... by arethuza on Wednesday October 02, 2019 @04:03AM (#21134256)
Reading data from another application's database is pretty common (although even this can cause chaos if done without some care) but writing to application databases is often a very bad idea and often explicitly forbidden by CRM/ERP vendors.
Re:The 2002 mandate for internal communication systems at Am... by jcrites on Tuesday October 01, 2019 @01:45PM (#21128330)
Calling parts of your application "services" means that you're already thinking in terms of the "services/API" metaphor. If you're not using services, you might be, for example:

- Building one large application (monolith). Parts of the application communicate with each other via function calls. Everything runs in one large process. You can go quite a long way with this approach, especially for parts of the application that are stateless. (You can also build components of the application using a service/client metaphor within the process as well.)

- Multiple separate applications might communicate with the same database, file system, or some other data store. Before we had distinct distributed systems components taking on the role of queues, event buses, and things like that, it was common to represent queues using folders or database tables. These approaches are still seen today, though they're uncommon in new applications.

Re:The 2002 mandate for internal communication systems at Am... by jhallenworld on Tuesday October 01, 2019 @04:18PM (#21130115)
IBM has an appliance for you:

https://www.ibm.com/products/datapower-gateway

It's a middleware appliance that allows any API to talk to any other API and handles just about any data format. You can script it with javascript or XSLT. It can handle ad-hoc things like ftp polling.

It has the added benefit that you can add security for outside facing clients.

Disclaimer: I helped develop this appliance (but I no longer work for IBM)

Re:The 2002 mandate for internal communication systems at Am... by flukus on Tuesday October 01, 2019 @07:59PM (#21132181)
Pricing: Contact Us.

So basically it will be expensive, require an army of IBM consultants and become yet another integration point instead of actually solving anything.

Re:The 2002 mandate for internal communication systems at Am... by jugg1es on Tuesday October 01, 2019 @11:19PM (#21133185)
IBM's business model is totally antiquated and exhausting for modern processes. We have had a nightmare trying to get IBM MDM's solution to finally admit they were not actually cloud-ready after saying repeatedly that they were. No TLS support for DB2 out of the box for K8 support, documentation sucks. But contact us for pricing. IBM sucks.
Re:The 2002 mandate for internal communication systems at Am... by nameistaken on Tuesday October 01, 2019 @11:18PM (#21133184)
Cries in Webseal.
Re:The 2002 mandate for internal communication systems at Am... by closeparen on Friday October 04, 2019 @03:25PM (#21161029)
This is the Enterprise Service Bus concept, right? I remember a pretty good conference talk about how we realized in the mid 2000s that these things are problematic and you probably want services communicating directly over dumb pipes.

In showed an evolution from a monolithic spaghetti codebase, to an SOA, to realizing there are now spaghetti connections between services in an SOA, to a very clean looking ESB architecture, to showing how all the chaos is still there, just inside the ESB where it’s even harder to reason about or change.

Re:The 2002 mandate for internal communication systems at Am... by closeparen on Tuesday October 01, 2019 @12:55PM (#21127662)
My company increasingly understands "platform" to mean "codebase to build your feature into" rather than "API to consume from your own codebase."
Re:The 2002 mandate for internal communication systems at Am... by cpitman on Tuesday October 01, 2019 @11:59PM (#21133324)
Another favorite:

You integrate a "service" by creating and linking a library that implements the entire service, including data access. Now try tracking down everything accessing the "service" database, or rolling out an upgrade to the "service".

Re:The 2002 mandate for internal communication systems at Am... by bdamm on Tuesday October 01, 2019 @12:35PM (#21127409)
Call out to a shell? Pass structs between C-based programs using sockets? Use runtime marshalling? Make your "API" be just different arbitrary JSON objects mapping to maps? Hide the entire API behind a lazy cache with undocumented side effects when cache misses occur? I wouldn't consider any of these "API"s although they are interfaces.
Re:The 2002 mandate for internal communication systems at Am... by morelisp on Tuesday October 01, 2019 @12:47PM (#21127570)
> Make your "API" be just different arbitrary JSON objects mapping to maps?

But enough about the web...

Re:The 2002 mandate for internal communication systems at Am... by rob-olmos on Tuesday October 01, 2019 @01:31PM (#21128116)
Faxes, like in US health care. With staff to handle it at the endpoints.
Re:The 2002 mandate for internal communication systems at Am... by akhilcacharya on Tuesday October 01, 2019 @01:16PM (#21127926)
Was Amazon the first major company to invest fully in SOA for internal use like this?
Re:The 2002 mandate for internal communication systems at Am... by morelisp on Tuesday October 01, 2019 @03:28PM (#21129554)
The critical decision here is not SOA for internal use, but SOA designed for external use, for internal use. This is still uncommon.
Re:The 2002 mandate for internal communication systems at Am... by mav3rick on Tuesday October 01, 2019 @02:31PM (#21128946)
I have to ask. Isn't this just microservices ? Also isn't this terrible for latency and debugging ?
Re:The 2002 mandate for internal communication systems at Am... by atombender on Tuesday October 01, 2019 @07:04PM (#21131830)
"Microservice" is just a new name for something that has had many names throughout history. For as long as we've had networks, we've had small, loosely coupled networked apps communicating with each other. We've also had standards for communicating and for discovering nearby services — at one point it was DCE/RPC, later CORBA or DCOM, or Java RMI. Then people started with REST and Thrift, and these days it's more often gRPC and GraphQL.

I think the core of the Amazon invention was to mandate that the API be a strict boundary around a service. No cheating by making assumptions about the internals of the implementation. Force teams to work off the published API documentation, and make teams the guardians of each service. Microservices probably aren't developed exactly like that in many companies.

Re:The 2002 mandate for internal communication systems at Am... by wgjordan on Tuesday October 01, 2019 @05:50PM (#21131099)
> I have to ask. Isn't this just microservices ?

Considering 'microservices' wasn't a well-known term for another decade [1], maybe better to ask: isn't 'microservices' just this ?

[1] https://trends.google.com/trends/explore?date=all&q=microser...

Re:The 2002 mandate for internal communication systems at Am... by lmm on Tuesday October 01, 2019 @03:03PM (#21129310)
> Isn't this just microservices ?

Yeah it is (though not so "micro-": it's really one service per team, which is the scale that actually makes sense IMO). This is kind of a "seinfeld is unfunny" case: this memo was in 2002, and predated (arguably helped create) most of the modern microservice approach.

> Also isn't this terrible for latency and debugging ?

When two codebases are owned by different teams (and potentially in different languages), it's far better to have them separated by a network connection and a well-defined HTTP API than living in the same address space where they can corrupt each other. Since the interfaces are well defined, you can isolate any problem down to a request that's not getting the correct answer from the service it's calling, and then hand that over to the other team to investigate. Since the request and response are plain text, it's easy to see what's happening.

If responding to a single request from the end customer requires chaining through several independent codebases maintained by different teams, you have bigger problems than request latency. Each team should own a piece of end-to-end functionality, not a horizontal layer.

Re:The 2002 mandate for internal communication systems at Am... by I_AM_A_SMURF on Tuesday October 01, 2019 @05:39PM (#21130994)
Not only that, but you can also track performance/crash rate/etc of each service individually and over time, which is a really powerful tool to have. Infinitely better than a monolithic system at that scale.
Re:The 2002 mandate for internal communication systems at Am... by huherto on Tuesday October 01, 2019 @03:11PM (#21129376)
Agree. The "Micro" prefix is very miss leading. It should be one per (pizza) team. Otherwise you end up with too many, and it becomes a mess.
Re:The 2002 mandate for internal communication systems at Am... by eutropia on Tuesday October 01, 2019 @02:49PM (#21129156)
This email from 2002 describes system design decisions which led to amazon developing AWS. I wasn't a professional programmer at the time, but as I understand it, I think service-oriented design patterns were rare, let alone microservices as a concept.
Re:The 2002 mandate for internal communication systems at Am... by LordHumungous on Tuesday October 01, 2019 @12:44PM (#21127529)
Rules are meant to be broken as the saying goes.