✅ پکیج context
اگر هنوز پکیج context را کامل یادنگرفتید یا اینکه عمیقا نتوانستید درک کنید ما در بخش context داخل کتاب آمدیم به بحث context بطور خیلی عمیق پرداختیم و کلی تجربه را برایتان قرار دادیم.
توضیح مختصر در خصوص context :
در واقع context مانند یک درخت می باشد که کلی شاخه دارد و هر شاخه به شاخه های ریزتری تقسیم شده و در نهایت به برگ ها و میوه های درخت منتهی می شوند. حال شما می توانید در هر ناحیه شاخه والد را قطع کنید تا شاخه های فرزند از بین برود. در زبان گو context یک اینترفیس است که یکسری متد دارد که هریک از متدها می تواند عملیاتی را انجام دهد و این امکان را فراهم می کند هر وقت یک درخواست از سمت کلاینت به سرور می آید این درخواست می تواند در لایه های مختلف منتهی شود و داخل context می تواند یکسری key/value های مهم باشد که شما می توانید در هر لایه دسترسی داشته باشید و هچنین می توانید سیگنال cancel بفرستید که درخواستی که تا هرجا رفته اس کنسل شود.
https://book.gofarsi.ir/chapter-3/go-context/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
اگر هنوز پکیج context را کامل یادنگرفتید یا اینکه عمیقا نتوانستید درک کنید ما در بخش context داخل کتاب آمدیم به بحث context بطور خیلی عمیق پرداختیم و کلی تجربه را برایتان قرار دادیم.
توضیح مختصر در خصوص context :
در واقع context مانند یک درخت می باشد که کلی شاخه دارد و هر شاخه به شاخه های ریزتری تقسیم شده و در نهایت به برگ ها و میوه های درخت منتهی می شوند. حال شما می توانید در هر ناحیه شاخه والد را قطع کنید تا شاخه های فرزند از بین برود. در زبان گو context یک اینترفیس است که یکسری متد دارد که هریک از متدها می تواند عملیاتی را انجام دهد و این امکان را فراهم می کند هر وقت یک درخواست از سمت کلاینت به سرور می آید این درخواست می تواند در لایه های مختلف منتهی شود و داخل context می تواند یکسری key/value های مهم باشد که شما می توانید در هر لایه دسترسی داشته باشید و هچنین می توانید سیگنال cancel بفرستید که درخواستی که تا هرجا رفته اس کنسل شود.
https://book.gofarsi.ir/chapter-3/go-context/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
❤3🗿2⚡1
❎ Designing Go Libraries: The Talk: The Article
https://abhinavg.net/2022/12/06/designing-go-libraries/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
https://abhinavg.net/2022/12/06/designing-go-libraries/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍2❤🔥1
❎ Embedding Our New React UI in Go
https://www.flipt.io/blog/embedding-react-in-go
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
https://www.flipt.io/blog/embedding-react-in-go
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍1🐳1
❎What’s New in Go 1.20, Part I: Language Changes
https://blog.carlmjohnson.net/post/2023/golang-120-language-changes/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
https://blog.carlmjohnson.net/post/2023/golang-120-language-changes/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍1🏆1
❎ How to Use //go:embed
https://blog.carlmjohnson.net/post/2021/how-to-use-go-embed/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
https://blog.carlmjohnson.net/post/2021/how-to-use-go-embed/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔥2👍1💋1
❎ How to Use //go:generate
https://blog.carlmjohnson.net/post/2016-11-27-how-to-use-go-generate/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
https://blog.carlmjohnson.net/post/2016-11-27-how-to-use-go-generate/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍2🎃2
❎ Google Go: The Good, the Bad, and the Meh
https://blog.carlmjohnson.net/post/google-go-the-good-the-bad-and-the-meh/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
https://blog.carlmjohnson.net/post/google-go-the-good-the-bad-and-the-meh/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
✍1🕊1
✅ الگوها و تکنیک های همزمانی
در زبان گو ما برای همزمانی یکسری تکنیک ها و الگوها داریم که می توانید برای usecase های مختلف استفاده کنید و این الگوها همانند سایر الگوهای طراحی حاصل تجربه چندین و چندساله برنامه نویسان زبان گو می باشد که امروزه در پروژه های بزرگ و کوچک درحال استفاده است و شما با یادگیری این الگو و تکنیک ها می توانید برای سناریوهای مختلف استفاده کنید.
الگوهای همزمانی : https://book.gofarsi.ir/chapter-3/go-concurrency-patterns/
تکنیک های همزمانی : https://book.gofarsi.ir/chapter-3/go-concurrency-teqniques/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
در زبان گو ما برای همزمانی یکسری تکنیک ها و الگوها داریم که می توانید برای usecase های مختلف استفاده کنید و این الگوها همانند سایر الگوهای طراحی حاصل تجربه چندین و چندساله برنامه نویسان زبان گو می باشد که امروزه در پروژه های بزرگ و کوچک درحال استفاده است و شما با یادگیری این الگو و تکنیک ها می توانید برای سناریوهای مختلف استفاده کنید.
الگوهای همزمانی : https://book.gofarsi.ir/chapter-3/go-concurrency-patterns/
تکنیک های همزمانی : https://book.gofarsi.ir/chapter-3/go-concurrency-teqniques/
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
❤3🕊1😈1
🥳 فصل سوم کتاب تمام شد!!!
یکی از پرچالش ترین و مهمترین فصل در کتاب بحث همزمانی (Concurrency) می باشد که بطور عمیق به تمامی عناوین نظیر گوروتین, کانال, پکیج sync, پکیج context، الگوها و تکنیک ها که در بحث همزمانی نیاز هست یادبگیرید پرداختیم.
امیدوارم بخوبی تجربه هایم را در این بخش از کتاب منتقل کرده باشم تا عزیزانی که هنوز نگرانی در یادگیری در همزمانی دارند, نگرانیشان رفع شود.
سعی کردم نکات خیلی مهمی رو داخل هر بخش از این فصل ارائه بدم تا تجربه خوبی را درخصوص همزمانی کسب کنید.
نقل و قول از خودم :
با اینکه ۳ ماه از شروع این کتاب میگذرد برای من لذت بخش ترین کار در اوقات فراغتم شده است که وقت را بیهوده هدر نمی دهم و سعی می کنم با مطالعه در کتاب های مختلف در خصوص هر بخش, آن بخش را بخوبی آموزش و نکات کاربردی و مفید را ارائه دهم. در هر صورت امیدوارم با ادامه دادن این کتاب به جامعه برنامه نویسان زبان گو در ایران کمک کرده باشم.
- مخزن کتاب : https://github.com/GoFarsi/book
- کتاب آنلاین : https://book.gofarsi.ir/
- کتاب آنلاین (سرور ایران) : https://ir1-book.gofarsi.ir/
- نسخه های آفلاین برای پلت فرم های مختلف : https://github.com/GoFarsi/book/releases
فصل چهارم در بزودی شروع می کنم اگر هنوزم مایل هستید مشارکت کنید کافیه به اینجا سربزنید تا از تجربه های شما استفاده کنیم.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
یکی از پرچالش ترین و مهمترین فصل در کتاب بحث همزمانی (Concurrency) می باشد که بطور عمیق به تمامی عناوین نظیر گوروتین, کانال, پکیج sync, پکیج context، الگوها و تکنیک ها که در بحث همزمانی نیاز هست یادبگیرید پرداختیم.
امیدوارم بخوبی تجربه هایم را در این بخش از کتاب منتقل کرده باشم تا عزیزانی که هنوز نگرانی در یادگیری در همزمانی دارند, نگرانیشان رفع شود.
سعی کردم نکات خیلی مهمی رو داخل هر بخش از این فصل ارائه بدم تا تجربه خوبی را درخصوص همزمانی کسب کنید.
نقل و قول از خودم :
با اینکه ۳ ماه از شروع این کتاب میگذرد برای من لذت بخش ترین کار در اوقات فراغتم شده است که وقت را بیهوده هدر نمی دهم و سعی می کنم با مطالعه در کتاب های مختلف در خصوص هر بخش, آن بخش را بخوبی آموزش و نکات کاربردی و مفید را ارائه دهم. در هر صورت امیدوارم با ادامه دادن این کتاب به جامعه برنامه نویسان زبان گو در ایران کمک کرده باشم.
- مخزن کتاب : https://github.com/GoFarsi/book
- کتاب آنلاین : https://book.gofarsi.ir/
- کتاب آنلاین (سرور ایران) : https://ir1-book.gofarsi.ir/
- نسخه های آفلاین برای پلت فرم های مختلف : https://github.com/GoFarsi/book/releases
فصل چهارم در بزودی شروع می کنم اگر هنوزم مایل هستید مشارکت کنید کافیه به اینجا سربزنید تا از تجربه های شما استفاده کنیم.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
GitHub
GitHub - GoFarsi/book: کتاب آزاد (آنلاین/آفلاین) زبان برنامهنویسی گو فارسی
کتاب آزاد (آنلاین/آفلاین) زبان برنامهنویسی گو فارسی - GoFarsi/book
❤13🕊2🎉1
همیشه از دیدن این تصویر شگفت زده میشم (پشمام میریزه).
خانم مارگارت همیلتون، برنامه نویس ارشد ناسا برای پروژه ی آپولو که کنار کدهای دست نویسی ایستاده که انسان رو در سال 1969 به ماه فرستاد.
سیستم هدایت کامپیوتری آپولو 11 به صورت اوپن سورس روی گیتهاب هست، زبان فارسی هم داره
https://github.com/chrislgarry/Apollo-11
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
خانم مارگارت همیلتون، برنامه نویس ارشد ناسا برای پروژه ی آپولو که کنار کدهای دست نویسی ایستاده که انسان رو در سال 1969 به ماه فرستاد.
سیستم هدایت کامپیوتری آپولو 11 به صورت اوپن سورس روی گیتهاب هست، زبان فارسی هم داره
https://github.com/chrislgarry/Apollo-11
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👀7👍2❤1⚡1💔1🍓1
📥 دریافت شده از: Alex Xu
-------------
𝐖𝐡𝐚𝐭 𝐢𝐬 𝐭𝐡𝐞 𝐩𝐫𝐨𝐜𝐞𝐬𝐬 𝐟𝐨𝐫 𝐝𝐞𝐩𝐥𝐨𝐲𝐢𝐧𝐠 𝐜𝐡𝐚𝐧𝐠𝐞𝐬 𝐭𝐨 𝐩𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧?
The diagram below shows several common 𝐝𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭 𝐬𝐭𝐫𝐚𝐭𝐞𝐠𝐢𝐞𝐬.
𝐁𝐢𝐠 𝐁𝐚𝐧𝐠 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
Big Bang Deployment is quite straightforward, where we just roll out a new version in one go with service downtime. Preparation is essential for this strategy. We roll back to the previous version if the deployment fails.
💡 No downtime ❌
💡 Targeted users ❌
𝐑𝐨𝐥𝐥𝐢𝐧𝐠 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
Rolling Deployment applies phased deployment compared with big bang deployment. The whole plant is upgraded one by one over a period of time.
💡 No downtime ✅
💡 Targeted users ❌
𝐁𝐥𝐮𝐞-𝐆𝐫𝐞𝐞𝐧 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
In blue-green deployment, two environments are deployed in production simultaneously. The QA team performs various tests on the green environment. Once the green environment passes the tests, the load balancer switches users to it.
💡 No downtime ✅
💡 Targeted users ❌
𝐂𝐚𝐧𝐚𝐫𝐲 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
With canary deployment, only a small portion of instances are upgraded with the new version, once all the tests pass, a portion of users are routed to canary instances.
💡 No downtime ✅
💡 Targeted users ❌
𝐅𝐞𝐚𝐭𝐮𝐫𝐞 𝐓𝐨𝐠𝐠𝐥𝐞
With feature toggle, A small portion of users with a specific flag go through the code of the new feature, while other users go through normal code. This can be used in combination of other strategies: either the new branch of code is upgraded in one go, or only a few instances are upgraded with new code.
💡 No downtime ✅
💡 Targeted users ✅
#systemdesign #coding #interviewtips
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
-------------
𝐖𝐡𝐚𝐭 𝐢𝐬 𝐭𝐡𝐞 𝐩𝐫𝐨𝐜𝐞𝐬𝐬 𝐟𝐨𝐫 𝐝𝐞𝐩𝐥𝐨𝐲𝐢𝐧𝐠 𝐜𝐡𝐚𝐧𝐠𝐞𝐬 𝐭𝐨 𝐩𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧?
The diagram below shows several common 𝐝𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭 𝐬𝐭𝐫𝐚𝐭𝐞𝐠𝐢𝐞𝐬.
𝐁𝐢𝐠 𝐁𝐚𝐧𝐠 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
Big Bang Deployment is quite straightforward, where we just roll out a new version in one go with service downtime. Preparation is essential for this strategy. We roll back to the previous version if the deployment fails.
💡 No downtime ❌
💡 Targeted users ❌
𝐑𝐨𝐥𝐥𝐢𝐧𝐠 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
Rolling Deployment applies phased deployment compared with big bang deployment. The whole plant is upgraded one by one over a period of time.
💡 No downtime ✅
💡 Targeted users ❌
𝐁𝐥𝐮𝐞-𝐆𝐫𝐞𝐞𝐧 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
In blue-green deployment, two environments are deployed in production simultaneously. The QA team performs various tests on the green environment. Once the green environment passes the tests, the load balancer switches users to it.
💡 No downtime ✅
💡 Targeted users ❌
𝐂𝐚𝐧𝐚𝐫𝐲 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
With canary deployment, only a small portion of instances are upgraded with the new version, once all the tests pass, a portion of users are routed to canary instances.
💡 No downtime ✅
💡 Targeted users ❌
𝐅𝐞𝐚𝐭𝐮𝐫𝐞 𝐓𝐨𝐠𝐠𝐥𝐞
With feature toggle, A small portion of users with a specific flag go through the code of the new feature, while other users go through normal code. This can be used in combination of other strategies: either the new branch of code is upgraded in one go, or only a few instances are upgraded with new code.
💡 No downtime ✅
💡 Targeted users ✅
#systemdesign #coding #interviewtips
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍6
Log parsing commands are helpful for:
🔹Searching patterns in text files
🔹Analyzing network packets
🔹Parsing fields from delimited logs
🔹Replacing strings in a file
🔹Sorting a file
🔹Displaying differences in files by comparing line by line
By Thomas Roccia on Twitter.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔹Searching patterns in text files
🔹Analyzing network packets
🔹Parsing fields from delimited logs
🔹Replacing strings in a file
🔹Sorting a file
🔹Displaying differences in files by comparing line by line
By Thomas Roccia on Twitter.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍5
https://jobinja.ir/companies/ramooz/jobs/CIx5/%D8%A7%D8%B3%D8%AA%D8%AE%D8%AF%D8%A7%D9%85-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D9%86%D9%88%DB%8C%D8%B3-golang-%D9%85%D8%B4%D9%87%D8%AF-%D8%AF%D8%B1-%D8%B1%D8%A7%D9%85%D9%88%D8%B2?_ref=16
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
جابینجا، شغلی رویایی خود را پیدا کنید
استخدام برنامهنویس Golang (مشهد) در راموز | جابینجا
استخدام برای فرصت شغلی برنامهنویس Golang (مشهد) در Ramooz,
توانایی هایی که باید داشته باشید: • به زبان golang تسلط داشته باشید و یا اگر به یکی از زبان های php و یا c...
توانایی هایی که باید داشته باشید: • به زبان golang تسلط داشته باشید و یا اگر به یکی از زبان های php و یا c...
🌚3😈2
How can Redis be used?
There is more to Redis than just caching.
.
Redis can be used in a variety of scenarios as shown in the diagram.
🔹Session
We can use Redis to share user session data among different services.
🔹Cache
We can use Redis to cache objects or pages, especially for hotspot data.
🔹Distributed lock
We can use a Redis string to acquire locks among distributed services.
🔹Counter
We can count how many likes or how many reads for articles.
🔹Rate limiter
We can apply a rate limiter for certain user IPs.
🔹Global ID generator
We can use Redis Int for global ID.
🔹Shopping cart
We can use Redis Hash to represent key-value pairs in a shopping cart.
🔹Calculate user retention
We can use Bitmap to represent the user login daily and calculate user retention.
🔹Message queue
We can use List for a message queue.
🔹Ranking
We can use ZSet to sort the articles.
#systemdesign #coding #interviewtips
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
There is more to Redis than just caching.
.
Redis can be used in a variety of scenarios as shown in the diagram.
🔹Session
We can use Redis to share user session data among different services.
🔹Cache
We can use Redis to cache objects or pages, especially for hotspot data.
🔹Distributed lock
We can use a Redis string to acquire locks among distributed services.
🔹Counter
We can count how many likes or how many reads for articles.
🔹Rate limiter
We can apply a rate limiter for certain user IPs.
🔹Global ID generator
We can use Redis Int for global ID.
🔹Shopping cart
We can use Redis Hash to represent key-value pairs in a shopping cart.
🔹Calculate user retention
We can use Bitmap to represent the user login daily and calculate user retention.
🔹Message queue
We can use List for a message queue.
🔹Ranking
We can use ZSet to sort the articles.
#systemdesign #coding #interviewtips
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔥1🕊1
یه مقاله خیلی جذاب از #netflix در رابطه با #false_sharing
ماجرا از این قراره که نتفلیکس اینستنس های یکی از میکرو سرویس هاش رو ارتقا میده
از m5.4xl (16 vCPUs) به m5.12xl (48 vCPUs)
خب چون این دو تا ماشین یه اختلاف سه برابری توی قدرت پردازش دارند انتظار میرفت که یه عدد نزدیک سه برابری هم توی خروجی داشته باشند. (RPS)
اما نتیجه فقط بهبود 25 درصدی رو نشون میداد!
حتی بدتر از اون #latency یه افزایش 50 درصدی هم پیدا کرد!
اینکه مشکل از کجا بود و چه خاکی به سر ریختن
از اینجا خودتون بخونید 😁
https://lnkd.in/eYh5Q46J
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
ماجرا از این قراره که نتفلیکس اینستنس های یکی از میکرو سرویس هاش رو ارتقا میده
از m5.4xl (16 vCPUs) به m5.12xl (48 vCPUs)
خب چون این دو تا ماشین یه اختلاف سه برابری توی قدرت پردازش دارند انتظار میرفت که یه عدد نزدیک سه برابری هم توی خروجی داشته باشند. (RPS)
اما نتیجه فقط بهبود 25 درصدی رو نشون میداد!
حتی بدتر از اون #latency یه افزایش 50 درصدی هم پیدا کرد!
اینکه مشکل از کجا بود و چه خاکی به سر ریختن
از اینجا خودتون بخونید 😁
https://lnkd.in/eYh5Q46J
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
Medium
Seeing through hardware counters: a journey to threefold performance increase
By Vadim Filanovsky and Harshad Sane
👍3👌1
Why is Nginx called a “𝐫𝐞𝐯𝐞𝐫𝐬𝐞” proxy?
.
.
The diagram below shows the differences between a 𝐟𝐨𝐫𝐰𝐚𝐫𝐝 𝐩𝐫𝐨𝐱𝐲 and a 𝐫𝐞𝐯𝐞𝐫𝐬𝐞 𝐩𝐫𝐨𝐱𝐲.
🔹 A forward proxy is a server that sits between user devices and the internet.
A forward proxy is commonly used for:
1️⃣ Protect clients
2️⃣ Avoid browsing restrictions
3️⃣ Block access to certain content
🔹 A reverse proxy is a server that accepts a request from the client, forwards the request to web servers, and returns the results to the client as if the proxy server had processed the request.
A reverse proxy is good for:
1️⃣ Protect servers
2️⃣ Load balancing
3️⃣ Cache static contents
4️⃣ Encrypt and decrypt SSL communications
—
#systemdesign #coding #interviewtips
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
.
.
The diagram below shows the differences between a 𝐟𝐨𝐫𝐰𝐚𝐫𝐝 𝐩𝐫𝐨𝐱𝐲 and a 𝐫𝐞𝐯𝐞𝐫𝐬𝐞 𝐩𝐫𝐨𝐱𝐲.
🔹 A forward proxy is a server that sits between user devices and the internet.
A forward proxy is commonly used for:
1️⃣ Protect clients
2️⃣ Avoid browsing restrictions
3️⃣ Block access to certain content
🔹 A reverse proxy is a server that accepts a request from the client, forwards the request to web servers, and returns the results to the client as if the proxy server had processed the request.
A reverse proxy is good for:
1️⃣ Protect servers
2️⃣ Load balancing
3️⃣ Cache static contents
4️⃣ Encrypt and decrypt SSL communications
—
#systemdesign #coding #interviewtips
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
⚡2👍1🏆1