Это видео недоступно.
Сожалеем об этом.
APIs and Microservices: What's the Difference?
HTML-код
- Опубликовано: 14 авг 2024
- What is the difference between an API and a microservice? This video explains what these two things are and how they relate to each other. It also presents an example to show how APIs and microservices are typically used in software architecture and engineering.
An Application Programming Interface (API) is the access mechanism to a digital capability, which we can also call a digital building block. As such, the API is not the capability itself (i.e., its implementation), but really only the way how to interact with it.
A microservice is an implementation pattern, meaning that it is a way how a particular capability (or service, hence its name) is being implemented. The most important aspect of this pattern is that the implementation needs to be self-contained and independently deployable. This means that a microservice can oftentimes be implemented and changed more easily and faster, because it is not necessary to align and coordinate the implementation work with many other teams.
In summary: APIs and microservices are different things. API can (but don't have to be) implemented by a microservice, and API consumers don't have to be aware of that. Microservices need to have an API so that they can be accessed: They are self-contained implementations of capabilities, and in order to use them, they are accessed through their APIs.
00:00 Introduction
00:30 What is an API?
01:10 What is a Microservice?
01:45 Comparing APIs and Microservices
02:36 Example for APIs and Microservices
04:00 Implementing an API with a Microservice
04:44 Microservices for Modernization
05:30 Wrapping it up
Thanks, helped me to understand finally difference between microservices and API
Thanks Eric. Because of you I can finally consider myself a bit of software engineer after working for almost 9 years in IT. Grateful. Kindly keep on posting these informative videos..
Thanks, I am glad the video helped you!
Thank you Eric. Your teachings are easy to follow. Watching this video helped me get a clear understanding of API and micro services.
Thanks, Thalathoti, I'm glad you found it useful!
The issue is both rely on lots of data transfer over the network, which essentially kills performance instantly. Everyone seems so in love with remote resources these days (been going on for some time now, but it's getting worse each day) - have we entirely forgotten how to build locally running software?
Thank you Eric, So a microservice may make use of one or more APIs in order to provide the necessary service it is meant for, correct?
sure, there's nothing keeping from depending on other services to get its job done. it just shouldn't collaborate "behind the scenes" by sharing data with other services.
Erik, don't microservices cause less reuse of code? Once you develop and deploy separetly, you'll need to replicate code all over the services and update in several places when you need to change them. Is that a fair statement?
reuse of what kind of code? if it's standard libraries then you'll simply use those in the microservices that use them. if it's code you're writing then microservices should make it easier to use it because you simply can use the API that they're providing. but did i read your question correctly?
@@ErikWilde as I'm trying to refactor my backend into microservices, I found myself replicating a bunch of code in many projects/builds, like model base classes, configuration files, util functions, database connections... I guess I'm doing it wrong. Breaking down the old large API into small services are no easy task
Thank you for the content. Very informative