Thursday, 30 March 2017

POSIX Threads Synchronization in C | SoftPrayog

POSIX Threads Synchronization in C | SoftPrayog: "POSIX Threads provide multiple flows of execution within a process. The threads have their own stacks but share the global data and heap. So the global variables are visible to multiple threads. Also, the threads need to synchronize their actions so that they jointly realize the overall objectives of the process they belong to. The core problems of concurrent programming, mutual exclusion and synchronization are relevant for threads just like these problems are relevant for multi-process systems."



'via Blog this'

Queue implementation in C using linked list | SoftPrayog

Queue implementation in C using linked list | SoftPrayog: "A queue is a data structure with two end points, its head and the tail. Initially, the queue is empty. There are two basic operations available for a queue, enqueue and dequeue. The enqueue operation adds an element to the queue. Elements are added to a queue at its tail. The dequeue operation takes an element off the queue. The element at the head of a queue is dequeued. The elements are dequeued in the order they are enqueued making queue as a first-in, first-out (FIFO) data structure."



'via Blog this'

Interprocess communication using POSIX Shared Memory in Linux | SoftPrayog

Interprocess communication using POSIX Shared Memory in Linux | SoftPrayog: "Shared memory, message queues and semaphores form the suite of interprocess communication (IPC) mechanisms available under Linux and other Unix-like systems. In case of shared memory, the system provides a shared memory segment which the calling process can map to its address space. After that, it behaves just like any other part of the process's address space.



 If we look at the other IPC mechanisms like message queue or the older mechanisms like the pipe or the fifo, the work required for passing message involves, first copying the message from the address space of the first process to the kernel space via a send-like system call and, then, copying the message from the kernel space to the address space of the second process during a receive-like call. In the case of shared memory, the first process writes data in the shared memory segment and the data becomes available to the second process immediately. This makes shared memory faster than other mechanisms and is, in fact, the fastest way of passing data between two processes on the same host system"



'via Blog this'

Tuesday, 28 March 2017

C: It’s time for a memory safety intervention

It’s time for a memory safety intervention: "Programming in C means you are using an unsafe memory model 100% of the time. It is the programming equivalent of trying to walk a tightrope over a lake full of alligators while trying to avoid getting electrocuted by dangling power lines. The slightest mistake in your arithmetic at any one place in the code can be the difference between a perfectly safe program and remote code execution."



'via Blog this'

Sunday, 26 March 2017

Linux: Bash scripting quirks & safety - Julia Evans

Bash scripting quirks & safety - Julia Evans: "Yesterday I was talking to some friends about Bash and I realized that, even though I’ve been using Bash for more than 10 years now there are still a few basic quirks about it that are not totally obvious to me. So as usual I thought I’d write a blog post"



'via Blog this'

Wednesday, 22 March 2017

MIT Structure and Interpretation of Computer Programs, 2e: Top

Structure and Interpretation of Computer Programs, 2e: Top:



The material in this book has been the basis of MIT’s entry-level computer science subject since 1980. We had been teaching this material for four years when the first edition was published, and twelve more years have elapsed until the appearance of this second edition. We are pleased that our work has been widely adopted and incorporated into other texts. We have seen our students take the ideas and programs in this book and build them in as the core of new computer systems and languages. In literal realization of an ancient Talmudic pun, our students have become our builders. We are lucky to have such capable students and such accomplished builders.

'via Blog this'

Tuesday, 21 March 2017

Docker/Containers demand new data center designs: 5 steps to survive | TechBeacon

Containers demand new data center designs: 5 steps to survive | TechBeacon: "Containers are gaining traction for production use in data centers, but data center architectures were not specifically designed to support them. This raises several questions.

Datadog reports massive adoption of Docker. Its study tracked 10,000 companies and their use of Docker and found that two-thirds of companies that try Docker end up adopting it. Additionally, those companies quintuple their usage after nine months.The report makes it clear: Things in the data center need to change. "



'via Blog this'

Donne Martin/system-design-primer: Learn how to design large-scale systems. Prep for the system design interview.

GitHub - donnemartin/system-design-primer: Learn how to design large-scale systems. Prep for the system design interview.: "Motivation

Learn how to design large scale systems.

Prep for the system design interview.
Learn how to design large scale systems

 Learning how to design scalable systems will help you become a better engineer.

System design is a broad topic.

There is a vast amount of resources scattered throughout the web on system design principles.

This repo is an organized collection of resources to help you learn how to build systems at scale."



'via Blog this'

Sunday, 12 March 2017

Linux C/C++: Object Files and Symbols - Nick Desaulniers

Object Files and Symbols - Nick Desaulniers: "What was supposed to be one blog post about memory segmentation turned into what will be a series of posts. As the first in the series, we cover the extreme basics of object files and symbols. In follow up posts, I plan to talk about static libraries, dynamic libraries, dynamic linkage, memory segments, and finally memory usage accounting. I also cover command line tools for working with these notions, both in Linux and OSX."



'via Blog this'

Friday, 10 March 2017

Building Microservices with Python , Part I – Medium

Building Microservices with Python , Part I – Medium: "In this basic setup we are going to include those packages:



  • Flask (as a Framework) 
  • connexion (helpful tool to generate routes and Swagger docs) 
  • Flask-Injector (Dependency Injection package)
  •  Avro (or any data serialization package)




In this case, I chose Flask because I find it super useful to build small services without all the learning curve of Django. I just need something to help to do the routing and I will include whatever I need on it."



'via Blog this'

Building Microservices with Python , Part I – Medium

Building Microservices with Python , Part I – Medium: "In this basic setup we are going to include those packages:



  • Flask (as a Framework) 
  • connexion (helpful tool to generate routes and Swagger docs) 
  • Flask-Injector (Dependency Injection package)
  •  Avro (or any data serialization package)




In this case, I chose Flask because I find it super useful to build small services without all the learning curve of Django. I just need something to help to do the routing and I will include whatever I need on it."



'via Blog this'

Data structures and algorithms problems in C++ using STL and Java

Data structures and algorithms problems in C++ using STL: "Data structures and algorithms problems in C++ using STL"



'via Blog this'

Diagnosing and Fixing Memory Leaks in Python | Fugue

Diagnosing and Fixing Memory Leaks in Python | Fugue: "In the fall, our metrics reported that a Python component of Fugue called the reflector was experiencing random restarts and instability after a few days of uptime. Looking at memory usage showed that the reflector's memory footprint increased monotonically and continuously, indicating a memory leak. tracemalloc, a powerful memory tracking tool in the Python standard library, made it possible to quickly diagnose and fix the leak. We discovered that the memory leak was related to our use of requests, a popular third-party Python HTTP library. Rewriting the component to use urllib from the Python standard library eliminated the memory leak. In this blog, we'll explore the details."



'via Blog this'

Diagnosing and Fixing Memory Leaks in Python | Fugue

Diagnosing and Fixing Memory Leaks in Python | Fugue: "In the fall, our metrics reported that a Python component of Fugue called the reflector was experiencing random restarts and instability after a few days of uptime. Looking at memory usage showed that the reflector's memory footprint increased monotonically and continuously, indicating a memory leak. tracemalloc, a powerful memory tracking tool in the Python standard library, made it possible to quickly diagnose and fix the leak. We discovered that the memory leak was related to our use of requests, a popular third-party Python HTTP library. Rewriting the component to use urllib from the Python standard library eliminated the memory leak. In this blog, we'll explore the details."



'via Blog this'

Wednesday, 8 March 2017

From dotCloud to Docker

From dotCloud to Docker: "This is a quasi-archeological account of some of the early design decisions of dotCloud, some of which have shaped how Docker is today (and how it is not). “How is this relevant to my interests?” you ask. If you are not using containers, and not planning to, ever, then this article will not be very useful to you. Otherwise, I hope that you can learn a lot from our past successes and failures. At the very least, you will understand why Docker was built this way."



'via Blog this'

C++ web: : Comparing The Performance Of Synchronous Versus Asynchronous Network IO

Comparing The Performance Of Synchronous Versus Asynchronous Network IO: "Given the popularity of certain asynchronous web servers, I’ve decided to use my first research post to look into performance comparisons between asynchronous and synchronous servers. All the benchmarks I’ve seen involve comparing different types of web servers to each other, without a clear apples-to-apples comparison between the two networking models. So, I’ve written two identical web-like servers: an asynchronous event-based server (async_server.cc) and a synchronous thread-based server (sync_server.cc). Both servers would clearly perform equally well handling a single-connection-at-a-time client, so the real test is to see how well each server performs while handling a large number of clients concurrently."



'via Blog this'

Tuesday, 7 March 2017

BuzzFeed Tech Blog - Introducing the Deep Exploration Series on Python

BuzzFeed Tech Blog - BuzzFeed News: "This post is the first in a series intended to dig deep into the Python interpreter. Python is a mature language, with commits dating back to August 1990. Along the way, the developers have evolved a series of processes for contributing that allow them to move relatively quickly with few issues/errors."



'via Blog this'

Friday, 3 March 2017

CodingGame

https://www.codingame.com "At CodinGame, we believe in a world where programming knowledge is free and accessible to everyone. Whether you are an industry speaker, a teacher, or a passionate programmer, we’re opening the platform collaborative architecture for you to create courses and demos on any kind of technology. Yes, any :)"



'via Blog this'

Hardware: AMD’s moment of Zen: Finally, an architecture that can compete | Ars Technica

AMD’s moment of Zen: Finally, an architecture that can compete | Ars Technica: "Before the company's new Zen offerings, it's fair to say that AMD's last attempt at building a performance desktop processor was not tremendously successful.

The Bulldozer core released in 2011 had a design that can, at best, be described as idiosyncratic. AMD made three bets with Bulldozer: that general purpose workloads would become increasingly multithreaded, that floating point intensive workloads would become increasingly GPU-driven, and that it would be able to aggressively scale clock speeds."



'via Blog this'