what is thread interference:
There is no problem when multiple threads have their own memory. Each thread will be reading or writing into its own memory. There is a challenge when multiple threads share the same memory. Every thread will be reading or writing into the same memory. This creates inconsistent data in the memory
If a thread reads a memory while another thread writes into it, what value will be the first thread end up reading? is it the old value or value written by the second thread? If two threads are writing into the same memory, then what value will be stored in that memory? is it value written by the first thread or the value written by the second thread?
Thread interference in java is a condition that occurs when more than one thread, executing simultaneously, access the same piece of data. When more than one threads have access to the same data, it is possible that data may get corrupted or one may not get the desired output. Thread interference occurs when code is written that is not thread-safe
@developerDiaries
There is no problem when multiple threads have their own memory. Each thread will be reading or writing into its own memory. There is a challenge when multiple threads share the same memory. Every thread will be reading or writing into the same memory. This creates inconsistent data in the memory
If a thread reads a memory while another thread writes into it, what value will be the first thread end up reading? is it the old value or value written by the second thread? If two threads are writing into the same memory, then what value will be stored in that memory? is it value written by the first thread or the value written by the second thread?
Thread interference in java is a condition that occurs when more than one thread, executing simultaneously, access the same piece of data. When more than one threads have access to the same data, it is possible that data may get corrupted or one may not get the desired output. Thread interference occurs when code is written that is not thread-safe
@developerDiaries
what is the thread consistency problem?
Memory consistency errors occur when different threads have inconsistent views of what should be the same data. The causes of memory consistency errors are complex and beyond the scope of this tutorial. Fortunately, the programmer does not need a detailed understanding of these causes. All that is needed is a strategy for avoiding them.
For example, if you have two statements:
x = y + z;
r = x + z;
in a single thread then you have no problem because the value of r will always be consistent. In multiple threads, however, it is possible for either statement to occur first and the value of r is harder to predict.
@developerDiaries
Memory consistency errors occur when different threads have inconsistent views of what should be the same data. The causes of memory consistency errors are complex and beyond the scope of this tutorial. Fortunately, the programmer does not need a detailed understanding of these causes. All that is needed is a strategy for avoiding them.
For example, if you have two statements:
x = y + z;
r = x + z;
in a single thread then you have no problem because the value of r will always be consistent. In multiple threads, however, it is possible for either statement to occur first and the value of r is harder to predict.
@developerDiaries
Just because you spend a lot of time doing something, doesn’t mean that it’s adding value to your knowledge portfolio.
@developerDiaries
@developerDiaries
what is the deferent between thread consistency and thread interference?
Thread interference deals with interleaving of the execution process of two threads.
Memory inconsistency is about visibility and deals with hardware memory.
Thread interference can be avoided by granting exclusive access to threads, that is only one thread at a time should access the shared memory
@developerDiaries
Thread interference deals with interleaving of the execution process of two threads.
Memory inconsistency is about visibility and deals with hardware memory.
Thread interference can be avoided by granting exclusive access to threads, that is only one thread at a time should access the shared memory
@developerDiaries
Talk to the duck
You’re stuck with a difficult bug. You’ve
already spent a lot of time on it, and the
deadline is looming. So, you ask a coworker for help. They walk over to your screen, and you begin
to explain what’s going on—and what’s going wrong. Before you
get very far into the denoscription, a flash of insight smacks you in
the head, and you exclaim, “A-ha!” You’ve found the bug. Your
bemused co-worker, who never had to say a word, shakes their
head and walks back to their own office. To save some wear and
tear on the carpet (and your co-worker), we suggest you place a
surrogate—a yellow rubber duck, for instance—near your screen
and, when you get stuck, just “talk to the duck.”
Another useful approach is to try to explain your
material to a child or someone outside your field
of expertise. The trick is to do so in terms they
can understand. This is a great opportunity to
explain what you really do for a living to your great
Aunt Edna, and it’s a great exercise to start to see
things from your audience’s point of view and to develop metaphors
that will help explain and clarify the material you’re working with.
You may be surprised by what you learn and what insights come
to you during the process
pragmatic learning and thinking, Andy Hunt
@developerDiaries
You’re stuck with a difficult bug. You’ve
already spent a lot of time on it, and the
deadline is looming. So, you ask a coworker for help. They walk over to your screen, and you begin
to explain what’s going on—and what’s going wrong. Before you
get very far into the denoscription, a flash of insight smacks you in
the head, and you exclaim, “A-ha!” You’ve found the bug. Your
bemused co-worker, who never had to say a word, shakes their
head and walks back to their own office. To save some wear and
tear on the carpet (and your co-worker), we suggest you place a
surrogate—a yellow rubber duck, for instance—near your screen
and, when you get stuck, just “talk to the duck.”
Another useful approach is to try to explain your
material to a child or someone outside your field
of expertise. The trick is to do so in terms they
can understand. This is a great opportunity to
explain what you really do for a living to your great
Aunt Edna, and it’s a great exercise to start to see
things from your audience’s point of view and to develop metaphors
that will help explain and clarify the material you’re working with.
You may be surprised by what you learn and what insights come
to you during the process
pragmatic learning and thinking, Andy Hunt
@developerDiaries
just “doing” alone is no guarantee of success; you have to learn from the doing for it to count
Functional programming is writing pure functions
And a function without side effects is a pure function. A very simple definition of functional programming is this: writing a program only in pure functions. Pure functions never modify variables, but only create new ones as an output.
@developerDiaries
And a function without side effects is a pure function. A very simple definition of functional programming is this: writing a program only in pure functions. Pure functions never modify variables, but only create new ones as an output.
@developerDiaries
The mind is our most powerful tool. There's nothing it can't do. According to numerous studies, it actively generates new ideas even when we rest or do nothing. Often we can come up with solutions to difficult problems simply after a full night's sleep.
Just as our physical state depends on what we feed to our bodies, our mental state depends on the quality of information we feed to our brain. If we nourish our brain with real-life data that allows it to solve fundamental problems, it will process this data in the background and come up with unexpected solutions.
It is unfortunate that most people prefer to feed their minds not with real-life facts that can let us change the world, but with random Netflix series or TikTok videos. On a deep level, our brain can't tell fiction from reality, so the abundance of digital entertainment keeps our subconscious mind busy producing solutions to problems that do not exist.
To be creative and productive, we must first clear from our minds the sticky mud of irrelevant content with which “recommendation algorithms” flood it on a daily basis. If we are to reclaim our creative freedom, we must first take back control of our minds.
Just as our physical state depends on what we feed to our bodies, our mental state depends on the quality of information we feed to our brain. If we nourish our brain with real-life data that allows it to solve fundamental problems, it will process this data in the background and come up with unexpected solutions.
It is unfortunate that most people prefer to feed their minds not with real-life facts that can let us change the world, but with random Netflix series or TikTok videos. On a deep level, our brain can't tell fiction from reality, so the abundance of digital entertainment keeps our subconscious mind busy producing solutions to problems that do not exist.
To be creative and productive, we must first clear from our minds the sticky mud of irrelevant content with which “recommendation algorithms” flood it on a daily basis. If we are to reclaim our creative freedom, we must first take back control of our minds.
Novices, by definition, have little or no previous experience in this skill area. By “experience,” I mean specifically that performing this skill results in a change of thinking. As a counterexample, consider the case of the developer who claims ten years of experience, but in reality it was one year of experience repeated nine times. That doesn’t count as experience.
@developerDiaries
@developerDiaries
Developer diaries
بماند به یادگار 😕😥 @developerDiaries
رفع فیلتر شد به همین سرعت. خوب شد این عکسو گرفتم مگه نه کسی حرفمو باور نمی کرد 😅😅
Forwarded from TondTech
ما در Khanoumi.com به یک Devops Engineer در تیم مون نیاز داریم
خیلی خوب میشه که تجربه کار در تیم هایی با تعداد کاربر آنلاین بالا داشته باشه و یه Team Player خوب باشه
شرح نیازمندی های ما به شکل زیر هست :
- تعامل با تیم توسعه
- تسلط بر مفاهیم لود بالانس و HA
- تجربه عملیاتی Swarm یا Kubernetes
- تسلط بر Gitlab و CI/CD
- توانایی استقرار Automation
- مهارت برنامه نویسی یا Scripting
- تسلط بر سرویس های مانیتورینگ و TSDB
- تسلط بر سرویس های Queuing
- آشنایی با مفاهیم میکرو سرویس
- آشنایی با متدولوژی چابک
- آشنایی با توزیعهای لینوکس به خصوص Ubuntu و Debian
- آشنایی با وبسرورها
- تسلط به محیط Bash و Shell Scripting
- آشنایی با مفاهیم امنیتی سرورهای لینوکسی
- تسلط بر ابزارهای Deploy مانند Gitlab-CI, Ansible, Vagrant, Jenkins و ..
- مسلط به داکر
- مسلط به کوبرنتیز
- دانش قوی در زمینه نصب CI/CD
- دانش کار با سیستم های نظارت
در صورتی که دوست دارید هم تیمی ما باشید حتما رزومه تون رو از طریق لینک زیر ارسال کنید
و یا به خود من در لینکدین یا تلگرام پیام بدین
https://lnkd.in/eH969_JU
خیلی خوب میشه که تجربه کار در تیم هایی با تعداد کاربر آنلاین بالا داشته باشه و یه Team Player خوب باشه
شرح نیازمندی های ما به شکل زیر هست :
- تعامل با تیم توسعه
- تسلط بر مفاهیم لود بالانس و HA
- تجربه عملیاتی Swarm یا Kubernetes
- تسلط بر Gitlab و CI/CD
- توانایی استقرار Automation
- مهارت برنامه نویسی یا Scripting
- تسلط بر سرویس های مانیتورینگ و TSDB
- تسلط بر سرویس های Queuing
- آشنایی با مفاهیم میکرو سرویس
- آشنایی با متدولوژی چابک
- آشنایی با توزیعهای لینوکس به خصوص Ubuntu و Debian
- آشنایی با وبسرورها
- تسلط به محیط Bash و Shell Scripting
- آشنایی با مفاهیم امنیتی سرورهای لینوکسی
- تسلط بر ابزارهای Deploy مانند Gitlab-CI, Ansible, Vagrant, Jenkins و ..
- مسلط به داکر
- مسلط به کوبرنتیز
- دانش قوی در زمینه نصب CI/CD
- دانش کار با سیستم های نظارت
در صورتی که دوست دارید هم تیمی ما باشید حتما رزومه تون رو از طریق لینک زیر ارسال کنید
و یا به خود من در لینکدین یا تلگرام پیام بدین
https://lnkd.in/eH969_JU
آمازون، توئیتر و گوگل هم مختل شدند
پس از قطعی سرویسهای فیس بوک، اینستاگرام و واتس اپ اکنون گوگل، آمازون و توئیتر نیز دچار اختلال شده اند.
@developerDiaries
پس از قطعی سرویسهای فیس بوک، اینستاگرام و واتس اپ اکنون گوگل، آمازون و توئیتر نیز دچار اختلال شده اند.
@developerDiaries
مشکل اختلال در سرویسهای فیسبوک از جمله اینستاگرام و واتساپ ناشی از DNS هست که ظاهرا به دلیل ناپدید شدن BGP فیسبوک از اینترنت ناشی شده.
ناپدید شدن BGP فیسبوک از اینترنت، باعث میشه سرویسهای DNS نتونن IP سرورهای فیسبوک رو پیدا کنن که نتیجه اون این هست که کاربران هم امکان وصل شدن به سرورهای فیسبوک رو نخواهد داشت که اثراتش همین قطع شدن اپهای فیسبوک، اینستاگرام و واتساپ برای اونهاست.
این مورد توسط شرکت کلاوفلیر که صاحب یکی از شلوغ ترین DNS های جهان یعنی 1.1.1.1 هست، تایید شده و این شرکت به خاطر پیدا نشدن IP های فیسبوک، درخواستهای بسیار زیادی از کاربران دریافت کرده و نرخ خطاهای این سرویس بالا رفته.
طبق گفته یکی از مهندسان فیسبوک در ردیت، در اشتباهی بزرگ، اپدیتی که مهندسان فیسبوک امروز برای تجهیزات شبکه فیسبوک ارسال کردن باعث مشکلی در تنظیمات این تجهیزات شده، بنابراین این تجهیزات نمیتونن IP سرورهای فیسبوک رو به بقیه BGP ها مخابره کنن، این مشکل ناپدید شدن BGP فیسبوک رو از اینترنت به دنبال داشته که باعث شده سرویس های فیسبوک توسط کاربران قابل دسترسی و پیدا کردن نباشن.
این اپدیت جدید باعث شده که مهندسان نتونن از راه دور تجهیزات شبکه فیسبوک رو اصلاح کنن و از شبکه بیرون بیافتن. در نتیجه تنها کسانی که دسترسی فیزیکی به این تجهیزات دارن امکان تغییر در تنظیمات و اصلاح اونهارو دارن. اما همین افراد، که به این تجهیزات دسترسی فیزیکی دارن، دارای اعتبار لازم برای دسترسی نرم افزاری به اونها نیستن.
در نتیجه این قضیه باعث مشکلات لجستیکی زیادی شده چون کسانی که دسترسی لازم برای اعلام تغییرات دارن از اون دورن و باید حضوری در محل حاضر بشن و کسانی که حضوری در محل هستن، دسترسی های لازم برای اعمال تغییرات رو ندارن.
علاوه بر این که به خاطر پاندمی، تعداد افراد حاضر در دیتاسنترهای فیسبوک کم هست که این قضیه رو بیش از پیش بدتر میکنه.
@developerDiaries
ناپدید شدن BGP فیسبوک از اینترنت، باعث میشه سرویسهای DNS نتونن IP سرورهای فیسبوک رو پیدا کنن که نتیجه اون این هست که کاربران هم امکان وصل شدن به سرورهای فیسبوک رو نخواهد داشت که اثراتش همین قطع شدن اپهای فیسبوک، اینستاگرام و واتساپ برای اونهاست.
این مورد توسط شرکت کلاوفلیر که صاحب یکی از شلوغ ترین DNS های جهان یعنی 1.1.1.1 هست، تایید شده و این شرکت به خاطر پیدا نشدن IP های فیسبوک، درخواستهای بسیار زیادی از کاربران دریافت کرده و نرخ خطاهای این سرویس بالا رفته.
طبق گفته یکی از مهندسان فیسبوک در ردیت، در اشتباهی بزرگ، اپدیتی که مهندسان فیسبوک امروز برای تجهیزات شبکه فیسبوک ارسال کردن باعث مشکلی در تنظیمات این تجهیزات شده، بنابراین این تجهیزات نمیتونن IP سرورهای فیسبوک رو به بقیه BGP ها مخابره کنن، این مشکل ناپدید شدن BGP فیسبوک رو از اینترنت به دنبال داشته که باعث شده سرویس های فیسبوک توسط کاربران قابل دسترسی و پیدا کردن نباشن.
این اپدیت جدید باعث شده که مهندسان نتونن از راه دور تجهیزات شبکه فیسبوک رو اصلاح کنن و از شبکه بیرون بیافتن. در نتیجه تنها کسانی که دسترسی فیزیکی به این تجهیزات دارن امکان تغییر در تنظیمات و اصلاح اونهارو دارن. اما همین افراد، که به این تجهیزات دسترسی فیزیکی دارن، دارای اعتبار لازم برای دسترسی نرم افزاری به اونها نیستن.
در نتیجه این قضیه باعث مشکلات لجستیکی زیادی شده چون کسانی که دسترسی لازم برای اعلام تغییرات دارن از اون دورن و باید حضوری در محل حاضر بشن و کسانی که حضوری در محل هستن، دسترسی های لازم برای اعمال تغییرات رو ندارن.
علاوه بر این که به خاطر پاندمی، تعداد افراد حاضر در دیتاسنترهای فیسبوک کم هست که این قضیه رو بیش از پیش بدتر میکنه.
@developerDiaries
هجوم کاربران واتس اپ، تلگرام را با اختلال مواجه کرد
@developerDiaries
@developerDiaries