Re-creating threading and concurrency knowledge in increasingly popular languages

I am primarily a Java developer, and I've been reading a lot of in-depth work on threads and concurrency. Many very smart people (Doug Lea, Brian Goetz, etc) have authored books on these topics...

How to implement Snapshot Isolation correctly and tempdb issues?

The Snapshot Isolation feature helps us to solve the problem where readers lock out writers on high volume sites. It does so by versioning rows using tempdb in SqlServer. My question is to...

Two way communication through a HTTP proxy

I'm trying to come up with the most appropriate way to make a two way socket connection through a HTTP proxy - lets say it's a telnet style protocol. Unfortunately I also need to support NTLM...

Sort a file with huge volume of data given memory constraint

Points: We process thousands of flat files in a day, concurrently. Memory constraint is a major issue. We use thread for each file process. We don't sort by columns. Each line (record) in the...

C++ libraries that implement Go goroutines or Go channels?

I'm working with a medium-sized C++ code base which is currently entirely single-threaded. The time has come, however, to pursue concurrency and parallelism for performance gains. I'm very...

What is the difference between concurrency, parallelism and asynchronous methods?

Concurrency is having two tasks run in parallel on separate threads. However, asynchronous methods run in parallel but on the same 1 thread. How is this achieved? Also, what about...

Count concurrent Calls from Calllog

there is a list of Calls, with starttime, stoptime, duration, caller and some other Attributes. Now I try to visualize the concurrent Calls from this list, but I don't know how to start with this...

Gitlab repository mirroring

Is it possible to have gitlab set up to automatically sync (mirror) a repository hosted at another location? At the moment, the easiest way I know of doing this involves manually pushing to the...

Synchronized and the scope of visibility

I've been reading up on Java concurrency and had forgot the fact that synchronization blocks in two threads using the same lock also affect the visibility of variables, even though they were not...

how to understand appengine ndb.tasklet?

From documentation: An NDB tasklet is a piece of code that might run concurrently with other code. If you write a tasklet, your application can use it much like it uses an async NDB function: it...

Concurrency in Hashtables, and fail-safe behavior

I was reading about Hashtables and this question struck me. Hashtables are synchronized, so is an iterator on a Hashtable fail-safe? Also, for fail-safe Collections, when multiple threads try to...

Volatile variable explanation in Java docs

when a thread reads a volatile variable, it sees not just the latest change to the volatile, but also the side effects of the code that led up the change This is mentioned at...

Lock-free C++ data structures, impossible?

I really dont understand how you can make some data structures lock-free. For example, if you have a linked list then either you surround the operations with mutexes, OR you can end up with a race...

4 bit magnitude comparator VHDL

I have to make a 4bit magnitude comparator in VHDL with only concurrent statements (no if/else or case/when). library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity Exercise is port ( A : in...

Can num++ be atomic for 'int num'?

In general, for int num, num++ (or ++num), as a read-modify-write operation, is not atomic. But I often see compilers, for example GCC, generate the following code for it (try here): void f() { ...

Moodle : Database connection failed. It is possible that the database is overloaded or otherwise not running properly

The error below is displayed when 10 users are concurrently taking quiz in Moodle .Database Name:Postgres sql Error: Database connection failed. It is possible that the database is overloaded or...

Spark Structured Streaming, multiples queries are not running concurrently

I slightly modified example taken from here - https://github.com/apache/spark/blob/v2.2.0/examples/src/main/scala/org/apache/spark/examples/sql/streaming/StructuredNetworkWordCount.scala I added...

Understanding performance impact on a concurrent server because of GIL

I am bit confused with what is happening with my code below. I have created a concurrent server to find nth number in fibonacci series. Server creates a thread for each client connection and...

Java 11 HttpClient Http2 Too many streams Error

I am using HttpClient of Java 11 to post the request to an HTTP2 server. The HttpClient Object is created as a Singleton Spring bean as shown below. @Bean public HttpClient getClient() { ...

I don't understand why session_regenerate_id is dangerous with low connection?

I'm working on security of my website and I would understand why session_regenerate_id should be use carefully. In the php manual doc...

Java scheduleAtFixedRate + Thread.sleep

I'm just exploring method scheduleAtFixedRate of class ScheduledExecutorService in Java. Here is my suspicious code: ScheduledExecutorService scheduledExecutorService =...

uWebSockets concurrent sessions

for the sake of simplicity, let's assume I have only one uWebSockets instance running on my server: struct UserData { uWS::WebSocket<true, uWS::SERVER> *ws; bool logged_in = false; ID...

Aborted the task because of a task failure or a concurrent HA_RESTORE_DB request. while restored S3 to RDS

I have uploaded the backup file to S3 using CLI I am I am getting an error while restoring the database from amazon s3 I have using below commands to restore the database exec...

Getting error "CUDA backend requires cuDNN" when configuring OpenCV cmake build with cuda backend turned on

My goal: My goal is to configure a build of OpenCV 4.5.1-dev with support for cuda, tesseract and QT without any cmake error.. The problem I am having: I am getting the following error when I...

How to enumerate an IAsyncEnumerable<T> and invoke an async action for each element, allowing concurrency for each iteration/action pair?

I have an IAsyncEnumerable<string> stream that contains data downloaded from the web, and I want to save asynchronously each piece of data in a SQL database. So I used the ForEachAwaitAsync...

Golang grpc: how to determine when the server has started listening?

So I have the following: type Node struct { Table map[string]string thing.UnimplementedGreeterServer address string } func (n *Node) Start() { lis, err := net.Listen("tcp",...

How can I connect Jmeter with Databricks spark cluster

I want to connect Jmeter with Databricks (Spark Cluster) using JDBC connection associated with that spark Cluster I need to perform a concurrency test using Jmeter's JDBC request on a apache spark...

linker command failing for particular golang test involving "net/http" and "time" packages

I'm new to web development and golang. I'm trying to learn go from here. Without any issues I was able to learn till concurrency part, however, I'm facing issues while trying to learn select...

Postgres concurrent updates on a cumulative sum query

The answer to this previous question demonstrates a method to select rows until a cumulative threshold is reached: select t.* from ( select t.*, sum(amount) over (order by date desc) as...

Golang - race condition using go-routine

I tried to use the race flag to my program and issue found :( The func is the following func (g *WaitingErrorGroup) Start(run func() (bool, error)) { g.g.Start(func() { requeue, err :=...