Bir ilişkide en yorucu şey kavga etmek değil aynı şeyleri defalarca anlatıp hâlâ anlaşılmamış hissetmektir. İnsan bir noktadan sonra konuşmayı bırakır ama içindeki kırgınlık sessizce büyümeye devam eder
2025 yılını bir özet geçeyim dedim neler yaşamışız be. 30 yaş inişli çıkışlı, bol gezmeli, içine kapanmaktan çok daha sosyal ve radikal kararların olduğu bir sene olmuş. Sonuç olarak Nazım’ın dediği gibi yaşamak şakaya gelmez büyük bir ciddiyetle yaşayacaksın
Cok kafa acici bir bilgi vereyim. Konu calisirken var olan Tokenin yenilenmesi ve calisan User'in Logout'a dusmemesi.
1-) Expire suresi yaklaşan Token dogru mu ?
2-) Redis'de duran Token'in Expire olma suresi 15 dakkadan kucuk mu ?
*3-) KRITIK!: User, Concurrent 3 Request Cekmis olsun, sadece ilk gelen Request icin Token yenilenmesinin yapılıp digerleri icin Tokenin yenilenmesinin engellenmesi amacı ile SADECE USER'a özel ve lifetime'i 5 dakka olan bir Mutex Lock oluşturulur. [go-cache] harika bir kütüphane. Redis gibi expire suresi atanabilen, InMemory "map[string] interface{}" cache. Lock islemi yapılır.
4-) 2. Kere Token Life time'i kontrol edilir ve Tokenlar güvenli sekilde yenilenir🌻
Bu sekilde sadece ilk request icin Token ve RefreshToken yenilenir. Boş yere diğer requestler icin islem yapılmaz. Bu yöntemin adına Double Check Lock denir.
Not: Yapay Zeka Isimizi Elmizden Almayacak. Ama bize cok destek olacak!
@canozsuer Selamlar denemek için OKX den standart alt hesap oluşturup Api key ini bağladığımda sadece spot bakiye gözüküyordu acaba bununla ilgili bir problem yaşayan oldu mu acaba ?
Successful software teams are made of (a small number of) individuals who:
- are passionate
- are committed
- take responsibilities
- share knowledge
- aren't afraid of making mistakes
- recognize others' merits
All methodologies are poor replacements for lack of these skills.
APACHE KAFKA 101:
Imagine you are working in a manufacturing company that produces heavy machinery. Ensuring the reliability and uptime of these machines is critical. You want to implement a predictive maintenance system using AI/ML to predict equipment failures before they happen.
How Kafka Helps
#️⃣Data Collection and Ingestion: Data from sensors and IoT devices on the machinery generate a continuous stream of telemetry data (e.g., temperature, vibration, pressure).
Kafka acts as a data ingestion platform. Sensors send real-time data to Kafka topics dedicated to each type of sensor data.
#️⃣Data Preprocessing: Kafka Streams or other stream processing tools can be used to preprocess and clean the raw sensor data. You might want to filter out noise, aggregate data over time, or compute rolling statistics.
Processed data is then sent to new Kafka topics.
#️⃣Model Training: You develop and train machine learning models to predict equipment failures based on historical data. Kafka can be used to feed training data to these models. You can create Kafka topics to store training data in real-time, which can be consumed by the training pipeline.
#️⃣ Model Deployment: Once trained, the machine learning models are deployed as real-time inference services. Kafka can be used to send real-time sensor data to these deployed models for inference. The models make predictions about equipment health on the fly.
#️⃣Alerting and Maintenance Scheduling: When the models predict potential equipment failures, Kafka can be used to trigger alerts in real-time.
Maintenance schedules can be dynamically adjusted based on predictions, optimizing resource allocation and minimizing downtime.
#️⃣Data Storage and Audit: Kafka allows you to store the original sensor data and predictions in topics. This data can be archived for audit and analysis purposes, ensuring transparency and compliance.
Let's now understand the Kafka Architecture
#️⃣ Producer
• Role: Producers are responsible for publishing (producing) messages or records to Kafka topics.
• Function: They collect and send data to Kafka topics, often in real-time, for further processing or storage.
• Example: In a retail application, a producer might send purchase transaction data to a Kafka topic each time a customer makes a purchase.
#️⃣ Consumer
•Role: Consumers subscribe to Kafka topics and consume messages (records) from those topics.
• Function: They retrieve and process data that has been published by producers. Kafka supports parallel processing with multiple consumers within a consumer group.
• Example: In a real-time analytics system, consumers can subscribe to a Kafka topic to analyze incoming data for trends or anomalies.
#️⃣ Topic
•Role: Topics are logical channels or categories to which messages are published and from which messages are consumed.
• Function: They help organize and categorize data streams in Kafka. Topics are identified by their names.
• Example: In a social media application, you might have topics like "user_posts," "comments," and "likes" for different types of user-generated content.
#️⃣Partition
• Role: Partitions are the building blocks of Kafka topics. Each topic can be divided into multiple partitions.
• Function: Partitions allow Kafka to parallelize message storage and consumption. Messages within a partition are ordered and have an offset.
• Example: For a "user_posts" topic, partitions could represent posts by different users, enabling concurrent processing of user data.
#️⃣ Broker:
• Role: Brokers are individual Kafka server instances within a Kafka cluster.
• Function: They store messages, serve client requests (producers and consumers), and replicate data for fault tolerance.
• Example: In a Kafka cluster, each broker is a server responsible for handling Kafka operations, like storing data and responding to client requests.
#️⃣ Key Points:
• Kafka operates as a distributed system, and a Kafka cluster typically consists of multiple brokers.
• Producers and consumers connect to brokers to publish and consume data.
• Topics can have varying numbers of partitions, allowing for scalability and parallelism.
• Kafka's replication ensures data durability and fault tolerance by maintaining multiple copies of data across brokers.
• Kafka provides features like retention policies, allowing data to be retained for a specified period, and log compaction, which retains only the latest version of a record with a specific key.
You can now easily convert your notes to durable, private, local files, that you own and can access offline at any time.
Free your notes from proprietary formats and databases.