gRPC হচ্ছে একটি high-performance, open-source Remote Procedure Call (RPC) framework, যা মূলত Google দ্বারা তৈরি করা হয়েছে। এটি বিভিন্ন সার্ভিস বা অ্যাপ্লিকেশনের মধ্যে দ্রুত এবং কার্যকর যোগাযোগ নিশ্চিত করে, বিশেষত microservices architecture-এ। 🔹 gRPC কীভাবে কাজ করে: এটি Protocol Buffers (Protobuf) ব্যবহার করে ডাটা serialize করে। অর্থাৎ JSON/XML এর বদলে Protobuf ব্যবহার করে, যা size এ ছোট, parsing এ দ্রুত, এবং network-efficient। এটি HTTP/2 প্রোটোকলের ওপর চলে, যার ফলে multiplexing, streaming, এবং header compression সুবিধা পাওয়া যায়। 🔹 কেন gRPC ব্যবহার করা হয়: High Performance Communication JSON এর তুলনায় 5–10 গুণ দ্রুত data transfer হয়।Cross-Language Support C#, Java, Python, Go, Node.js সহ অনেক ভাষায় সহজে কাজ করে। Strongly Typed Contracts Protobuf .proto ফাইলের মাধ্যমে strict contract define করা হয়। এর ফলে client-server উভয়েই একই ডাটা স্ট্রাকচারে কাজ করে। Bi-directional Streaming Support gRPC একসাথে client থেকে server এবং server থেকে client-এ ডাটা স্ট্রিম করতে পারে। এটি ...
Generators are useful when we want to produce a large sequence of values but we don't want to store them in memory at once yield keyword helps python to execute generator . Key Features of Generators Memory Efficient – They do not store all values in memory; instead, they generate values one by one. Lazy Evaluation – Values are produced only when needed. Automatic State Retention – The function retains its state between yield calls. Iterable – Generators can be iterated using a for loop or the next() function.