โก MODUL4R M6 General Assembly in full swing!
The #MODUL4R team met in #Thessaloniki, Greece for the projectโs M6 General Assembly Meeting taking place at @thessinnozone on 14 & 15 June.
A big thank you to all of the partners & a special shout out to @EngAtlantis for hosting.
As we scale systems, it's essential to realize the impact of all the components in our systems and how they interact. For example, load balancers usually come into play once we scale beyond one server being able to serve requests reliably.
What are API routes and their best practices?
๐ What is an API route?
๐ API routes best practices
1๏ธโฃ Use a verb followed by a noun
2๏ธโฃ Use plural nouns for resources
3๏ธโฃ Consistent naming
4๏ธโฃ Avoid using abbreviations
5๏ธโฃ Add API version
A thread ๐งต๐
StructuredConcurrency is feeling more complete and stable. Anyone want to kick the tires and provide feedback? @marcgravell maybe? The goal is to provide better structure for "top-level" async loops like those commonly found in protocol layers.
https://t.co/MhtUIUaW5R
What are the four main ๐ ๐ฎ๐ฐ๐ต๐ถ๐ป๐ฒ ๐๐ฒ๐ฎ๐ฟ๐ป๐ถ๐ป๐ด ๐๐ฒ๐ฝ๐น๐ผ๐๐บ๐ฒ๐ป๐ ๐ง๐๐ฝ๐ฒ๐?
Even if you will not work with them day to day,ย the following are the four ways to deploy a ML Model you should know and understand as a MLOps/ML Engineer.
โก๏ธ ๐๐ฎ๐๐ฐ๐ต:ย
๐ You apply your trained models as a part of ETL/ELT Process on a given schedule.
๐ You load the required Features from a batch storage, apply inference and save the results to a batch storage.
๐ It is sometimes falsely thought that you canโt use this method for Real Time Predictions.
๐ Inference results can be loaded into a real time storage and used for real time applications.
โก๏ธ ๐๐บ๐ฏ๐ฒ๐ฑ๐ฑ๐ฒ๐ฑ ๐ถ๐ป ๐ฎ ๐ฆ๐๐ฟ๐ฒ๐ฎ๐บ ๐๐ฝ๐ฝ๐น๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป:ย
๐ You apply your trained models as a part of Stream Processing Pipeline.
๐ While Data is continuously piped through your Streaming Data Pipelines, an application with a loaded model continuously applies inference on the data and returns it to the system - most likely another Streaming Storage.
๐ This deployment type is likely to involve a real time Feature Store Serving API to retrieve additional Static Features for inference purposes.
๐ Predictions can be consumed by multiple applications subscribing to the Inference Stream.
โก๏ธ ๐ฅ๐ฒ๐พ๐๐ฒ๐๐ - ๐ฅ๐ฒ๐๐ฝ๐ผ๐ป๐๐ฒ:
๐ You expose your model as a Backend Service (REST or gRPC).
๐ This ML Service retrieves Features needed for inference from a Real Time Feature Store Serving API.
๐ Inference can be requested by any application in real time as long as it is able to form a correct request that conforms API Contract.
โก๏ธ ๐๐ฑ๐ด๐ฒ:ย
๐ You embed your trained model directly into the application that runs on a user device.
๐ This method provides the lowest latency and improves privacy.
๐ Data in most cases is generated and lives inside of device significantly improving the security.
What types of deployments are you mostly working on? Let me know in the comments!ย ๐
--------
Follow me to upskill in #MLOps, #MachineLearning, #DataEngineering, #DataScience and overall #Data space.
Also hit ๐to stay notified about new content.
๐๐ผ๐ปโ๐ ๐ณ๐ผ๐ฟ๐ด๐ฒ๐ ๐๐ผ ๐น๐ถ๐ธ๐ฒ ๐, ๐๐ต๐ฎ๐ฟ๐ฒ ๐ฎ๐ป๐ฑ ๐ฐ๐ผ๐บ๐บ๐ฒ๐ป๐!
Join a growing community of Data Professionals by subscribing to my ๐ก๐ฒ๐๐๐น๐ฒ๐๐๐ฒ๐ฟ.
Some thoughts on ๐ฅ๐ฒ๐ฎ๐ฑ๐ถ๐ป๐ด ๐๐ฎ๐๐ฎ from ๐๐ฎ๐ณ๐ธ๐ฎ.
Kafka is an extremely important ๐๐ถ๐๐๐ฟ๐ถ๐ฏ๐๐๐ฒ๐ฑ ๐ ๐ฒ๐๐๐ฎ๐ด๐ถ๐ป๐ด ๐ฆ๐๐๐๐ฒ๐บ to understand, last time we covered Writing Data.
๐ฆ๐ผ๐บ๐ฒ ๐ฟ๐ฒ๐ณ๐ฟ๐ฒ๐๐ต๐ฒ๐ฟ๐:
โก๏ธ Clients writing to Kafka are called ๐ฃ๐ฟ๐ผ๐ฑ๐๐ฐ๐ฒ๐ฟ๐.
โก๏ธ Clients reading the Data are called ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ๐.
โก๏ธ Data is written into ๐ง๐ผ๐ฝ๐ถ๐ฐ๐ that can be compared to tables in Databases.
โก๏ธ Messages sent to ๐ง๐ผ๐ฝ๐ถ๐ฐ๐ are called ๐ฅ๐ฒ๐ฐ๐ผ๐ฟ๐ฑ๐.
โก๏ธ ๐ง๐ผ๐ฝ๐ถ๐ฐ๐ are composed of ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป๐.
โก๏ธ Each ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป is a combination of and behaves as a write ahead log.
โก๏ธ Data is written to the end of the ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป.
โก๏ธ Each ๐ฅ๐ฒ๐ฐ๐ผ๐ฟ๐ฑ has an ๐ข๐ณ๐ณ๐๐ฒ๐ assigned to it which denotes its order in the ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป.
โก๏ธ ๐ข๐ณ๐ณ๐๐ฒ๐๐ start at 0 and increment by 1 sequentially.
๐ฅ๐ฒ๐ฎ๐ฑ๐ถ๐ป๐ด ๐๐ฎ๐๐ฎ:
โก๏ธ Data is read sequentially per partition.
โก๏ธ ๐๐ป๐ถ๐๐ถ๐ฎ๐น ๐ฅ๐ฒ๐ฎ๐ฑ ๐ฃ๐ผ๐๐ถ๐๐ถ๐ผ๐ป can be set either to earliest or latest.
โก๏ธ Earliest position initiates the consumer at offset 0 or the earliest available due to retention rules of the ๐ง๐ผ๐ฝ๐ถ๐ฐ (more about this in later episodes).
โก๏ธ Latest position initiates the consumer at the end of a ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป - no ๐ฅ๐ฒ๐ฐ๐ผ๐ฟ๐ฑ๐ will be read initially and the ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ will wait for new data to be written.
โก๏ธ You could codify your consumers independently, but almost always the preferred way is to use ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ๐.
๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ๐:
โก๏ธ ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ is a logical collection of clients that read a ๐๐ฎ๐ณ๐ธ๐ฎ ๐ง๐ผ๐ฝ๐ถ๐ฐ and share the state.
โก๏ธ Groups of consumers are identified by the ๐ด๐ฟ๐ผ๐๐ฝ_๐ถ๐ฑ parameter.
โก๏ธ ๐ฆ๐๐ฎ๐๐ฒ is defined by the offsets that every ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป ๐ถ๐ป ๐๐ต๐ฒ ๐ง๐ผ๐ฝ๐ถ๐ฐ is being consumed at.
โก๏ธ ๐ฆ๐๐ฎ๐๐ฒ of ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ๐ is written by the ๐๐ฟ๐ผ๐ธ๐ฒ๐ฟ (more about this in later episodes) to an internal ๐๐ฎ๐ณ๐ธ๐ฎ ๐ง๐ผ๐ฝ๐ถ๐ฐ named __๐ฐ๐ผ๐ป๐๐๐บ๐ฒ๐ฟ_๐ผ๐ณ๐ณ๐๐ฒ๐๐.
โก๏ธ There can be multiple ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ๐ reading the same ๐๐ฎ๐ณ๐ธ๐ฎ ๐ง๐ผ๐ฝ๐ถ๐ฐ having their own independent ๐ฆ๐๐ฎ๐๐ฒ๐.
โก๏ธ Only one ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ per ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ can be reading a ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป at a single point in time.
๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ ๐ง๐ถ๐ฝ๐:
โ๏ธ If you have a prime number of ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป๐ in the ๐ง๐ผ๐ฝ๐ถ๐ฐ - you will always have at least one ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ per ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ consuming less ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป๐ than others unless number of ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ๐ equals number of ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป๐.
โ If you want an odd number of ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป๐ - set it to a ๐บ๐๐น๐๐ถ๐ฝ๐น๐ฒ ๐ผ๐ณ ๐ฃ๐ฟ๐ถ๐บ๐ฒ ๐ก๐๐บ๐ฏ๐ฒ๐ฟ.
โ๏ธ If you have more ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ๐ in the ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ then there are ๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป๐ in the ๐ง๐ผ๐ฝ๐ถ๐ฐ - some of the ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ๐ will be ๐๐ฑ๐น๐ฒ.
โ Make your ๐ง๐ผ๐ฝ๐ถ๐ฐ๐ large enough or have less ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ๐ per ๐๐ผ๐ป๐๐๐บ๐ฒ๐ฟ ๐๐ฟ๐ผ๐๐ฝ.
--------
Follow me to upskill in #MLOps, #MachineLearning, #DataEngineering, #DataScience and overall #Data space.
Also hit ๐to stay notified about new content.
๐๐ผ๐ปโ๐ ๐ณ๐ผ๐ฟ๐ด๐ฒ๐ ๐๐ผ ๐น๐ถ๐ธ๐ฒ ๐, ๐๐ต๐ฎ๐ฟ๐ฒ ๐ฎ๐ป๐ฑ ๐ฐ๐ผ๐บ๐บ๐ฒ๐ป๐!
Join a growing community of Data Professionals by subscribing to my ๐ก๐ฒ๐๐๐น๐ฒ๐๐๐ฒ๐ฟ.
DevOps in Kubernetes - Deployment Rolling Updates
Letโs talk about Rolling updates and rollbacks are critical features of #Kubernetes deployment that ensure the smooth operation of containerized applications
๐https://t.co/S0OoTsKzFF #DevOps#CloudNative#Containers
Difference between REST APIs and GraphQL
โฏ Architecture
โฏ HTTP Request Methods
โฏ Ease of use
โฏ Complex data relationships
โฏ API versioning
โฏ Endpoints
โฏ Data fetching
Thread ๐งต๐