Order book. Part 2.
Now let’s get to the implementation details of the order book - the main module, where the matching logic resides. There are five important functions that require an explanation. I’ll start with the smallest ones.
Software Engineer
Now let’s get to the implementation details of the order book - the main module, where the matching logic resides. There are five important functions that require an explanation. I’ll start with the smallest ones.
I had a desire to write a highload project in C++ with some application in high-frequency trading, finance, and related fields. My goal is not exactly to dive into the domain of a problem, but rather to carry out millions of operations per second and make a solid C++ project (with tests, scripts, and benchmarks).
I decided to update the project slightly by improving its code quality and adding CMake and GTest. Once those updates are complete, I’ll consider this learning project finished.
Now we come to an interesting topic: concepts. I’m going to delve into all the concepts I have defined and describe what each one does and why it is needed.
Recently, I finally decided to get my hands on C++20. I began reading A Tour of C++ (3rd edition) by Bjarne Stroustrup. After reading more than half of it, I can say that it’s pretty good — you can definitely find some cool new things for yourself.
Yeah, I’m back after a long break from posting anything here. I got a new job that required my full attention, and I was also dealing with university tasks and labs. But now I’m kinda free from university and have time to share my experience from the projects I was working on.
Here I am, after a few months of silence. Now I want to share my experience of making some sort of a compiler. The task is part of my studying at Master’s.
So, in my Master’s program, I took a course “Advanced Algorithms and Data Structures”. At first, you should set up an environment on your local machine the way it is set up in their Yandex Contest environment. The template project they provided for such a task can be found here. I forked from their repository and had to deal with a few problems to make the environment work on my machine. Namely, I changed: EOL symbols (because I am on Windows but the code is compiled and run on Linux), scripts a bit (used ‘bash’ instead of ‘sh’), and other little things.
I have dealt with few tasks related to the topic of Network Layer (on OSI) here: ICMP ping and routing via the distance-vector algorithm. At first, about the ICMP ping program. My task is to write a piece of code that processes the received message from ‘ping’ command - prints out the delay time or that the request is timed out. I am talking about this part:
So, after completing an RTP using the Alternating-Bit-Protocol, the next assignment is to complete it via the GBN (Go-Back-N) protocol. I won’t delve into the details of GBN but I’ll list a few important properties of this version of the lab:
I learned a lot about the network layer: IP, data and control planes, middleboxes, routing algorithms, and protocols. Now, I understand how forwarding works in routes with its queues, switch fabric, and other features. Finally, I got a grasp of IPv4 addressing - what 223.1.1.0/24 means and how all the networks are built around it.
One of the assignments in Chapter 3 is to implement your reliable transport protocol. There are two versions of this lab: the Alternating-Bit-Protocol (so, stop-and-wait) and Go-Back-N. At first, I will implement the Alternating-Bit-Protocol version and move on to the Go-Back-N (such an order is because of complexity: ABP is simpler than GBN). All the required data, resources, tasks, and details regarding this assignment can be found here.
So, whatever the protocol is used, these cases should be taken into consideration and handled:
After a bunch of theories I learned, I was doing questions and problems at the end of the chapter. I dealt with issues related to flow control protocols (GBN, SR, and TCP), congestion control mechanisms (TCP Reno, TCP Tahoe), speed limits, and optimal utilization of the link’s bandwidth concerning buffer size on the client and server.
I learned a lot about how reliable data transfer is implemented, and it’s terrific. All the pipelined protocols: GBN (Go-Back-N), SR (Selective Repeat), and the protocol in TCP; estimation of RTT (Round Trip Time) and deviations from it to calculate an appropriate timeout value; windows sizes, sequence and acknowledgments numbers, and more.
In chapter 3 of the book - Transport Layer - I learned that TCP and UDP are only implemented on end hosts. While transmitting messages across the network (through routers, links, etc.), no protocol higher than IP is used.
To continue the previous article, I learned about video streaming and techniques related to this - for example, the DASH (Dynamic Adaptive Streaming over HTTP). The main idea is that there are many versions of videos with different qualities on the server. The client dynamically (by measuring the available bandwidth) selects the appropriate version of the video for itself.
I learned that a socket is an interface between the application and transport layers. It’s like an API to deal with networks in your applications.
I’ve started reading a book on computer networking called “Computer Networking. A Top-Down Approach” by James F. Kurose and Keith W. Ross. From now on, I am going to tell you what I’ve learned from reading this book.
Transformations.
Hello Triangle.
This is the start of learning OpenGL. It’s not a complete tutorial but just my notes on interesting and complicated concepts of OpenGL (to better understand the subject by explaining the details of it). Everything here is based solely on the Learn OpenGL tutorial, so for the whole tutorial you can go there and come back here for another perspective (that can be easier to grasp) on OpenGL topics.
Recently I’ve encountered something incredibly amazing and at the same time straighforward and explicit. I was doing my job (yeah, it is) - writing software. And after completing assigned tasks the chief made a code review of my work of art.
Well, every one of us was a student back then. We didn’t know anything about computer science and programming. We were unfamiliar with this realm and were like infants taking their first steps (although it’s not entirely different now). But we were driven to learn and dive into the unknown.
When I was only thinking about getting into the Information Technology field and becoming a programmer I faced a problem that many newbies encounter as well - choosing the “right” programming language. Even though I’ve chosen the first language to learn without thinking much, some people that I know seem to be almost stuck by the variety of options to choose from and a ton of opinions about each of them going from every second YouTube programming video.
For the past few months, I’ve been reading and learning about algorithms and data structures in more detail. (As a side note - maybe sometime later I’ll list and rate all the resources I used/am using to learn programming and computer science-related topics). So, as further I was getting into this topic of algorithms I’ve noticed such a thing that there are so many specific cases and tasks that it seems almost impossible to have in mind all of the approaches to them simultaneously.
During a software engineer career, everybody faces the problem of dealing with the code they’ve written a long time ago. So was I. And recently this happened to me.