3 ms·
You’re always “locked into” your infrastructure. I shake my head when I see some bushy tailed developer using the repository pattern just in case the corporatio
by scarface74 8y ago
You’re always “locked into” your infrastructure. I shake my head when I see some bushy tailed developer using the repository pattern just in case the corporation decides to abandon their million dollar Oracle installation to go with Postgres.
As far as being “locked in” because of serverless. With AWS the only thing you are doing code wise to make your code “serverless” is creating one function as an entry point that takes in two parameters - a JSON object and a lambda context. The only thing your handler should be doing is mapping the event to your domain objects and calling your back end code.
I have a c# .Net Core project that can quite easily be deployed as both a lambda that is triggered by an SQS message or as a Windows service. In fact, my CodeBuild step that triggered by a git commit compiles it as both a zip file that is deployed to lambda and a Windows executable - yes you can build a Windows .Net Core executable on Linux and vice versa.
People have a dream of making their implementation vendor neutral but wholesale migrations involving major infrastructure changes rarely happens. The risk of regressions is too high and the benefits too low.
- wstrange 8y agoAmazon made a pretty big deal of how they finally migrated off of Oracle to get away from their repressive licensing. Being locked in sucks when the vendor can extract monopoly rents. Maintaining a second source is a good business strategy.
- opless 8y agoIt's why the military tend to insist on it.
- scarface74 8y agoYes and Amazon built their own globally distributed infrastructure,DynamoDB and RedShift - a purposefully play on shifting from Oracle - a random company isn’t going to do that. And it took 10 plus years. Again a random company is not going to take on a ten year plan to move from Oracle.
- StreamBright 8y agoAmazon has engineering teams that very few other companies have. Do you think a bank would be able to move out from Oracle like Amazon? I do not think so. Maybe they would be able to move to DB2 or SQLServer with the help of the other vendors, so trading a vendor lock in for an other.
- kromem 8y agoThis 1000x. A well designed and properly isolated codebase is going to have limited technical debt in switching providers for various services. But the cost of maintaining vendor neutral code and avoiding making use of the unique product advantages of the provider you've already chosen has significant downside. It becomes a matter of designing for the lowest common denominator between providers instead of making full use of the ways in which your existing product choice excels. If you are frequently changing providers, you have other issues afoot. If you rarely change providers, it's doubtful it'd be a net loss to design vendor-specific interactions with those services/products. Just add an intermediate API to isolate vendor specific code, which is going to be a good thing to do anyways for testing. The vendor lock in argument is one of the few programming boogie-men that really gets under my skin.
- qxmat 8y ago>> I shake my head when I see some bushy tailed developer using the repository pattern just in case the corporation decides to abandon their million dollar Oracle installation to go with Postgres. The repo abstraction is a fantastic way of declaring your data access implementation and separating its concerns (especially limitations) from the service tier. Once declared - via interfaces - you can substitute the concrete implementation for something that suits the environment and the ever maturing agile use case. Given how this is a fundamental scale/refactoring primitive, perhaps you haven't considered how others use it. I've used it time and time again at least 3 ways: Monitor and consolidate data access patterns. If ITopSecret repo requires you pass an IUser to your verbs, you only need to audit/validate this layer to prevent unauthorised access. No one will replicate the query in IExportService and forget to check permissions again. To scale read-heavy data, with new technologies like predictive search: Slowly pivot away from SQL sprocs/views to Solr/Elasticsearch by swapping out the concrete implementation ISomethingSearch repo with a new one. For offline 'work' and unit tests: Create new concrete implementation of IBlobRepository that read/writes to your file system or an in-memory chunk.
- scarface74 8y agoThe larger point is though if a developer went to a CTO and told them that they can get rid of the million dollar Oracle installation and replace it with Postgres because they used the repository pattern so therefore there is no vendor lock in, they would be laughed out of the building.