🔵 هرانچه که باید در مورد Process vs Thread بدونید
🔴Definition:
🟢Process: A process is an active program under execution, containing its own memory space and resources.
🟢Thread: A thread is a lightweight process that can be managed independently by a scheduler, sharing memory and resources with other threads within the same process.
🔴Context Switching:
🟢Process: Processes require more time for context switching due to their heavier nature.
🟢Thread: Threads require less time for context switching as they are lighter than processes.
🔴Memory Sharing:
🟢Process: Processes are independent and do not share memory with other processes.
🟢Thread: Threads may share memory with their peer threads within the same process.
🔴Communication:
🟢Process: Communication between processes takes more time compared to communication between threads.
🟢Thread: Communication between threads is faster than between processes.
🔴Blocked:
🟢Process: If a process gets blocked, other processes can continue execution independently.
🟢Thread: If a user-level thread gets blocked, all peer threads within the same process are also blocked.
🔴Resource Consumption:
🟢Process: Processes generally require more resources than threads.
🟢Thread: Threads need fewer resources compared to processes.
🔴Dependency:
🟢Process: Individual processes are independent of each other.
🟢Thread: Threads are parts of a process and are interdependent.
🔴Data and Code Sharing:
🟢Process: Processes have independent data and code segments.
🟢Thread: Threads share data and code segments with their peer threads.
🔴Creation and Termination:
🟢Process: Processes take more time for creation and termination.
🟢Thread: Threads require less time for creation and termination.
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
🔴Definition:
🟢Process: A process is an active program under execution, containing its own memory space and resources.
🟢Thread: A thread is a lightweight process that can be managed independently by a scheduler, sharing memory and resources with other threads within the same process.
🔴Context Switching:
🟢Process: Processes require more time for context switching due to their heavier nature.
🟢Thread: Threads require less time for context switching as they are lighter than processes.
🔴Memory Sharing:
🟢Process: Processes are independent and do not share memory with other processes.
🟢Thread: Threads may share memory with their peer threads within the same process.
🔴Communication:
🟢Process: Communication between processes takes more time compared to communication between threads.
🟢Thread: Communication between threads is faster than between processes.
🔴Blocked:
🟢Process: If a process gets blocked, other processes can continue execution independently.
🟢Thread: If a user-level thread gets blocked, all peer threads within the same process are also blocked.
🔴Resource Consumption:
🟢Process: Processes generally require more resources than threads.
🟢Thread: Threads need fewer resources compared to processes.
🔴Dependency:
🟢Process: Individual processes are independent of each other.
🟢Thread: Threads are parts of a process and are interdependent.
🔴Data and Code Sharing:
🟢Process: Processes have independent data and code segments.
🟢Thread: Threads share data and code segments with their peer threads.
🔴Creation and Termination:
🟢Process: Processes take more time for creation and termination.
🟢Thread: Threads require less time for creation and termination.
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
🍾7
🔵A Crash Course in IPv4 Addressing
🔴https://blog.bytebytego.com/p/a-crash-course-in-ipv4-addressing
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
🔴https://blog.bytebytego.com/p/a-crash-course-in-ipv4-addressing
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
👍3❤1🍾1
🎯یه مقاله خوب در مورد مدل M-P-G گولنگ که توسط سینا نوشته شده
🎯 مقاله ای هست با کلی نکته برای درک بهتر اینکه چطور الگوریتم زمانبند رانتایم کار می کند
👇به یه سری سوالت جواب میده این مقاله سوالاتی همچون
🔻مفهوم ترد یا نخ یا thread چیه؟
🔻اما thread با پروسه چه فرقی میکنه؟
🔻اصطلاح execution contextچیه؟
🔻سی پی یو dispatch کار چیه؟
🔻زمان بند چیه؟
🔻تفاوت نخ های هسته و نخ های سطح کاربر یا همون goroutine ها توی go چیه؟
🔻حالت های گوروتین ها از نظر اجرا
🔻دلایل مختلف بلاک شدن یک گوروتین
🔻استراتژی hands off
🔻قتی syscall زده میشه نخ یا M جدید از کجا پیداش میشه؟
🔻چه زمانی thread ها در حالت spinning هستن؟
🔻اصطلاح hand off و spinning و netpoller چیه؟
👑 https://blog.snix.ir/posts/golang-scheduler-MPG-model
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
🎯 مقاله ای هست با کلی نکته برای درک بهتر اینکه چطور الگوریتم زمانبند رانتایم کار می کند
👇به یه سری سوالت جواب میده این مقاله سوالاتی همچون
🔻مفهوم ترد یا نخ یا thread چیه؟
🔻اما thread با پروسه چه فرقی میکنه؟
🔻اصطلاح execution contextچیه؟
🔻سی پی یو dispatch کار چیه؟
🔻زمان بند چیه؟
🔻تفاوت نخ های هسته و نخ های سطح کاربر یا همون goroutine ها توی go چیه؟
🔻حالت های گوروتین ها از نظر اجرا
🔻دلایل مختلف بلاک شدن یک گوروتین
🔻استراتژی hands off
🔻قتی syscall زده میشه نخ یا M جدید از کجا پیداش میشه؟
🔻چه زمانی thread ها در حالت spinning هستن؟
🔻اصطلاح hand off و spinning و netpoller چیه؟
👑 https://blog.snix.ir/posts/golang-scheduler-MPG-model
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
👍5🔥4🕊1🍾1
این سایت توضیح شغلی به AI اش میدید و ازتون با توجه به همون توضیحات مصاحبه میکنه.
#pythony
https://interviewsby.ai
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
#pythony
https://interviewsby.ai
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
❤7👍4🕊1
🔵 A Crash Course in CI/CD
🔴 https://blog.bytebytego.com/p/a-crash-course-in-cicd
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
🔴 https://blog.bytebytego.com/p/a-crash-course-in-cicd
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
❤2🕊2👍1🍾1
🔵یه تجربه با گولنگ که کدشو برای پردازش هزاران خط متن ورودی بهینه کرده.
مخصوصا در مورد memory allocationها دید خوبی میده و جالبه اگه به پرفورمنس علاقه دارید بخونید:
🔴 https://benhoyt.com/writings/go-1brc/
#terminal_stuff
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
مخصوصا در مورد memory allocationها دید خوبی میده و جالبه اگه به پرفورمنس علاقه دارید بخونید:
🔴 https://benhoyt.com/writings/go-1brc/
#terminal_stuff
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
👍3🍾2🔥1
🐧 نشست ۱۴ ام جامعه لینوکسی شیراز
🟢 موضوع ارائه : امنیت در کانتینرها
🐦 ارائه دهنده : سعید بستان دوست
🐧 رزومه ارائه دهنده : برنامه نویس و طرفدار دنیای اوپن سورس
🗓تاریخ : سهشنبه ۲۱ ام فروردین ماه
⏰ساعت : ۱۷:۰۰ الی ۱۹:۰۰
📍مکان: بلوار مدرس، بلوار آزادگان، کارخانه نوآوری شیراز طبقه دوم انتهای سالن اتاق آموزشی
حامی برگزاری : کارخانه نوآوری شیراز 🍀
حضور برای عموم رایگان میباشد
⭕️ با توجه به محدودیت های ظرفیت برای شرکت کنندگان و مدل رایگان بودن این رویداد، جهت حفظ ارزش آفرینی عدم حضور شما بعد از ثبتنام به منزله اضافه شدن نام شما به لیست شرکت کنندگان بد قول جامعه های فعال ما خواهد شد و در صورت تکرار مجدد، از حضور در رویدادهای رایگان جامعه لینوکسی شیراز به صورت رایگان محدود خواهید شد.
جهت ثبت نام روی لینک زیر کلیک کنید👇🏻
https://shirazlinuxcommunity.ir/event-14
📍Location
OSM : OpenStreetMap
GoogleMap : GoogleMap
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
🟢 موضوع ارائه : امنیت در کانتینرها
🐦 ارائه دهنده : سعید بستان دوست
🐧 رزومه ارائه دهنده : برنامه نویس و طرفدار دنیای اوپن سورس
🗓تاریخ : سهشنبه ۲۱ ام فروردین ماه
⏰ساعت : ۱۷:۰۰ الی ۱۹:۰۰
📍مکان: بلوار مدرس، بلوار آزادگان، کارخانه نوآوری شیراز طبقه دوم انتهای سالن اتاق آموزشی
حامی برگزاری : کارخانه نوآوری شیراز 🍀
حضور برای عموم رایگان میباشد
⭕️ با توجه به محدودیت های ظرفیت برای شرکت کنندگان و مدل رایگان بودن این رویداد، جهت حفظ ارزش آفرینی عدم حضور شما بعد از ثبتنام به منزله اضافه شدن نام شما به لیست شرکت کنندگان بد قول جامعه های فعال ما خواهد شد و در صورت تکرار مجدد، از حضور در رویدادهای رایگان جامعه لینوکسی شیراز به صورت رایگان محدود خواهید شد.
جهت ثبت نام روی لینک زیر کلیک کنید👇🏻
https://shirazlinuxcommunity.ir/event-14
📍Location
OSM : OpenStreetMap
GoogleMap : GoogleMap
➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
🍾5🎉3👍1
Golang 1.22 Redefines the For Loop for Easier Concurrency
https://thenewstack.io/golang-1-22-redefines-the-for-loop-for-easier-concurrency/
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
https://thenewstack.io/golang-1-22-redefines-the-for-loop-for-easier-concurrency/
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
👍4🍾2
1712416705304.pdf
489.2 KB
ممکنه تو مصاحبه ازتون در مورد Caching بپرسند
یا حتی بخواهید که برای سایتتون Caching راه بندازید تا سریع تر لود بشه
یا ممکنه Cache داشته باشه و تو invalidate کردن مشکل بخورید
تو این داکیومنت من به صورت ساده Caching رو توضیح دادم
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
یا حتی بخواهید که برای سایتتون Caching راه بندازید تا سریع تر لود بشه
یا ممکنه Cache داشته باشه و تو invalidate کردن مشکل بخورید
تو این داکیومنت من به صورت ساده Caching رو توضیح دادم
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
❤9👍5🍾2
9 best practices that you must know before building microservices:
🎯Design For Failure
A distributed system with microservices is going to fail.
You must design the system to tolerate failure at multiple levels such as infrastructure, database, and individual services. Use circuit breakers, bulkheads, or graceful degradation methods to deal with failures.
🎯Build Small Services
A microservice should not do multiple things at once.
A good microservice is designed to do one thing well.
🎯Use lightweight protocols for communication
Communication is the core of a distributed system.
Microservices must talk to each other using lightweight protocols. Options include REST, gRPC, or message brokers.
🎯Implement service discovery
To communicate with each other, microservices need to discover each other over the network.
Implement service discovery using tools such as Consul, Eureka, or Kubernetes Services
🎯Data Ownership
In microservices, data should be owned and managed by the individual services.
The goal should be to reduce coupling between services so that they can evolve independently.
🎯Use resiliency patterns
Implement specific resiliency patterns to improve the availability of the services.
Examples: retry policies, caching, and rate limiting.
🎯Security at all levels
In a microservices-based system, the attack surface is quite large. You must implement security at every level of the service communication path.
🎯Centralized logging
Logs are important to finding issues in a system. With multiple services, they become critical.
🎯Use containerization techniques
To deploy microservices in an isolated manner, use containerization techniques.
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
🎯Design For Failure
A distributed system with microservices is going to fail.
You must design the system to tolerate failure at multiple levels such as infrastructure, database, and individual services. Use circuit breakers, bulkheads, or graceful degradation methods to deal with failures.
🎯Build Small Services
A microservice should not do multiple things at once.
A good microservice is designed to do one thing well.
🎯Use lightweight protocols for communication
Communication is the core of a distributed system.
Microservices must talk to each other using lightweight protocols. Options include REST, gRPC, or message brokers.
🎯Implement service discovery
To communicate with each other, microservices need to discover each other over the network.
Implement service discovery using tools such as Consul, Eureka, or Kubernetes Services
🎯Data Ownership
In microservices, data should be owned and managed by the individual services.
The goal should be to reduce coupling between services so that they can evolve independently.
🎯Use resiliency patterns
Implement specific resiliency patterns to improve the availability of the services.
Examples: retry policies, caching, and rate limiting.
🎯Security at all levels
In a microservices-based system, the attack surface is quite large. You must implement security at every level of the service communication path.
🎯Centralized logging
Logs are important to finding issues in a system. With multiple services, they become critical.
🎯Use containerization techniques
To deploy microservices in an isolated manner, use containerization techniques.
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
🍾2🔥1🕊1
m := make(map[string]int, 3)
x := len(m)
m["Go"] = m["Go"] y := len(m) println(x, y)
x := len(m)
m["Go"] = m["Go"] y := len(m) println(x, y)
Final Results
39%
3 3
13%
3 4
13%
0 0
34%
0 1
👍3🍾2🕊1
🥳 Released PayGap v1.6.0
Payment gateway providers SDK Go for zarinpal, idpay, pay.ir, and other gateway providers.
- feat: add mellat provider
https://github.com/GoFarsi/paygap
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
Payment gateway providers SDK Go for zarinpal, idpay, pay.ir, and other gateway providers.
- feat: add mellat provider
https://github.com/GoFarsi/paygap
➖➖➖➖➖➖➖➖
🕊 @gopher_academy | @GolangEngineers
👍15🔥7🍾3❤1🕊1