All Questions

Filter by
Sorted by
Tagged with
2
votes
2answers
106 views

Strategy for offering a library both a single-header and as a header + compiled implementation

I am maintaining a FOSS library which, for the sake of discussion, consists of a small .h file and a larger .c file (plus build-related files, see below) I've been requested to offer this library as a ...
-4
votes
1answer
54 views

Is there a way to use a third party Python or C API through C#? [closed]

I will receive a hardware which will have native Python API to communicate through USB. The device will continuously send image data. The vendor only supports Python and C APIs to communicate with the ...
2
votes
1answer
156 views

How to unit test code which is run asynchronous?

I have a bean which executes a method doStuff asynchronous, which of I am uncertain what is the best way to test the logic of that method doStuff. public class MyBean { private final ...
1
vote
3answers
286 views

If PRs are not being approved, when do you stop branching off of master?

I prefer to create linear git history that can all be merged with fast-forward strategy, that was particularly necessary at my previous job, which used BitBucket and required all PRs to be fast-...
2
votes
1answer
83 views

Modelling multi-device manufacture machinery software

We are building a multi-device (different vendors, different types) manufacture machinery where these device work together orchestrated by our software and operated by a human being to create various ...
1
vote
1answer
150 views

What is the common practice to serve a REST API based request asynchronously?

I am building a microservice app where the client sends requests through REST APIs to the backend server, and the backend will communicate with other services using gRPC. I am aware that this is ...
0
votes
1answer
101 views

Is it reasonable to pass file URLs to microservices instead of the file contents?

In microservices oriented architecture, service A receives a file and stores it. Later Service A has to pass the data in the file to Service B. We have a choice to send the data, as: batches of rows ...
-2
votes
0answers
34 views

Establishing a new content server as a buffer to improve overall content storage performance

Our current production landscape is as following: Several application servers (AS) instances and a single external content server (CS). Application processes (Background/Foreground) read and write ...
0
votes
2answers
92 views

How to solve an issue when a decorator needs variables from the base class?

I have a service class that does some magic. I want to introduce a new type of functionality - raise an event. I am absolutely sure that decorator pattern is great for this scenario. The problem is ...
6
votes
2answers
252 views

Should I gitignore env files in my private repo?

I have some .env files for my backend application and the usual recommendation is to put all .env files in gitignore to not share it in the repo and use something like Github Secrets to store the .env ...
-1
votes
2answers
90 views

Database responsibility segregation

I have the following architecture: Database (Postgres), Batch(java app - long running operations that delete, update, insert lots of data in the database), Rest API(java app - provides rest services ...
-1
votes
2answers
70 views

Transactional and eventual consistency together -- which operations MUST be transactionally consistent?

I find a lot of resources regarding strong consistency versus eventual consistency, and when to choose one or the other. I'm wondering how and when you would have both together. Consider this specific ...
-2
votes
2answers
138 views

Is there any other reason to Null-terminate a string besides to find out the length of the string? [closed]

I have looked at the source code of some standard C functions and wondered what the reason is for null-terminating a string other than to find out its length. e.g. The strlcat() function which is ...
-1
votes
1answer
89 views

Query language for python dictionary

I have a list of python dictionaries (let's assume each dict is flat for the time being). The keys are all strings and the values are strings or real numbers. I would like the user to have the freedom ...
-1
votes
2answers
102 views

Unit testing inside the main project [closed]

Usually, unit tests are built in a separate project/executable. Ideally, components under tests should have a small number of mockable dependencies, allowing us to do this, among other benefits. But ...
0
votes
2answers
106 views

Front end (or View) classes compared to back end classes

I am developing an E-Commerce Web application using C# (back-end) and JavaScript (front-end) for a computing shop. This application mainly displays each stored computer, and all information about it (...
0
votes
0answers
37 views

Context Mapping and Open Host Services

I have a question regarding the modelling of bounded contexts and the context mapping. I have to evaluete and document an existing architecture where two bounded contexts are exchanging information ...
-2
votes
1answer
66 views

rest api design for bulk post [closed]

Is it OK for an API to accept either an object or an array on the same endpoint? I want to allow the user to post multiple items at once. I am thinking of creating a different endpoint, but then it ...
-3
votes
4answers
112 views

How to detect user location and divide your APP / website up by Country? [closed]

So here is the problem that I need to solve for my APP / website. It will be available for everyone on the planet. But Users will only interact with and see content from other Users of the same ...
2
votes
4answers
151 views

How to design around webapp Out of Memory crashing on export from SQL DB to Excel?

I have a monolith CRUD application with a feature - possibility to export some DB entires to an Excel file. The export is done within a background task. Often, however, when user presses the button ...
0
votes
1answer
114 views

Appropriate naming for (GitHub) repositories belonging to the same project [closed]

I have some issues selecting an appropriate naming scheme for GitHub repositories that belong to the same project. The main package repo relies on additional repos to generate documentation or run ...
2
votes
2answers
237 views

DDD - how to avoid the 'God' aggregates?

I'm working on a project which utilizes DDD, Hexagonal Architecture and Microservices. While working on StorageService, the implementation was quite easy since the features were: CRUD of media files ...
2
votes
2answers
113 views

Implementing a method to achieve faster image acquisition

I hope I can explain my question clearly. I'm planning to do some real time 2D grayscale image acquisition, and after reading some articles, I noticed that many are using buffers or multithreading or ...
0
votes
3answers
254 views

What is the difference between Facade and God?

A Facade is a higher level API over a whole subsystem. A God is class that violates SRP. Where do we draw the line? Does the following code represent any of the two: enum UnitType{Demon, Paladin}; ...
5
votes
3answers
194 views

Better to store references to an object, or to store its ID and retrieve it with a hashMap

Given the classes: public class SocialNetwork { private final Map<String, User> users; ... } public class User { private final String user; private final LinkedList<String>...
0
votes
0answers
50 views

What scaling options are available to me when RAM is getting full in Redis?

My goal is to manually configure a redis cluster that can scale in and out the number of shards in the cluster based on RAM consumption Please skip to the TLDR section to get straight to the questions ...
0
votes
11answers
715 views

Testing : Why is it necessary?

Hello I will try to explain what is my actual understanding of tests and why I have problems to grasp it's utility. Even if I try my hardest to understand the concept of TTD, unit test, integration ...
1
vote
2answers
75 views

What do you call a process which transforms objects of complex types into simple objects of primitive types? [closed]

My first thought was that I'm "serializing" the complex object, but from what I understand that means I'm reducing it down to a string or binary format which could be passed over a network. ...
2
votes
3answers
257 views

Is it good practice to use try catch for data validation [duplicate]

In my current development task, I want to validate whether a string is in JSON format or not. When I checked for solutions from resources like StackOverflow I saw many of answers are as below, try{ ...
0
votes
0answers
33 views

Handling Events Across Multi-Server Application

My situation is that I have an application suite that runs across several potential server configurations, which include web-site servers, windows-service servers, and web-service servers. An example ...
-1
votes
0answers
48 views

How does a repository access an entity in clean architecture?

I have decided that I will be using a similar approach to this video for an upcoming project: https://www.youtube.com/watch?v=CB9ejEsmTZY What I don't quite understand is how the repository directly ...
0
votes
0answers
66 views

Is there an optimal strategy for placing rectangles inside a window without overlapping?

My specific problem is that I have a vertically scrollable window into which I need to place rectangular <div> elements that are locked horizontally and have different widths and heights. ...
-3
votes
1answer
41 views

Is it possible to add a unique identifier to the shared Data via bittorrent (P2P)?

I know that P2P sharing is copying the exact content between the peers. Everyone has the same data. Let's assume the content is very important and I don't want anyone to distribute outside the group. ...
3
votes
2answers
492 views

Is inheritance constraint on Generics redundant? If not what is its recommended use?

I've recently found myself using a generics with constraint that a type should inherit from a specific base class, but now I've just realised that this is redundant and unnecessary because the ...
0
votes
1answer
46 views

TCP sequence space and modern 1 gigabits/sec switches?

A modern world is full of gigabit/sec switches. There are 2^32 octets (bytes) of the sequence space as per TCP standard. Let's calculate. 1_000_000_000 is 125_000_000 bytes. Conceptually, each byte ...
1
vote
2answers
65 views

Should I avoid putting Id's in a contract/response model?

Here is the scenario: Let's assume that we have a Telephone and a Driver. Here is the definition of the classes (Pseudocode): Telephone: { Id: number, [Unique] TelephoneNumber: string } Driver: { ...
-3
votes
1answer
65 views

Combining Strategies (Design Patterns) [closed]

If I have two boolean variables B1 and B2 whose value combinations cover four independent behavior functions (MFF, MFT, MTF, MTT), then how many concrete strategy (design pattern) classes should I ...
0
votes
1answer
60 views

Am I understanding OAuth2 correctly and is what I am trying to achieve possible?

I am creating a web application which has three distinct components as far as I understand. A Nuxt frontend, and Spring Boot backend and Google OAuth2 for authentication using OpenID Connect. Nuxt can ...
0
votes
0answers
37 views

How could i reduce compilation time without using less templates? [duplicate]

I am part of a small project that is doing some research code in C++. Our work involves a lot of mathematics and due to its nature we often need to temporarily use other people's code/libraries. To ...
1
vote
1answer
91 views

Naming convention for the classes holding REST APIs [closed]

Our new team suffixes class names with API to indicate that they encapsulate RESTful methods. Eg: "PaymentTemplateAPI", "FeeTemplateAPI" classes. I find it odd since API is a ...
0
votes
4answers
143 views

Should I Decompose Client Classes?

I'm writing an SDK for the European Space Agency's DISCOs API. This has around 10 endpoints with different sets of query parameters, each of which returns a different payload type with different link ...
1
vote
2answers
58 views

Difference between Front Controller and Mediator patterns [closed]

I was reading about these patterns and noticed that they seem to be basically the same, but in different contexts? If that's the case, why isn't Front Controller just considered as a Mediator pattern ...
0
votes
1answer
103 views

Should I cache database requests made in validation layer?

Imagine an http request in a RESTful API that needs to request the database to perform validations before proceeding, but some of those database requests would need to execute again if the validation ...
-3
votes
3answers
149 views

C# implement .bat file functionality, call bat file or implement from scratch in C#? [closed]

I have a bunch of scripts written in .bat files that I'm trying to implement into one big program using C#. These .bat files mostly do simple operations like copying files into network drives etc. ...
1
vote
1answer
114 views

Streaming Market Data Over The Public Internet

I'm currently working on a design for a system that can service market data to external clients over the internet. The current solution involves consuming market data from a feed (Feed Handler), this ...
0
votes
0answers
56 views

Order notification system in distributed systems

I'm working in a company that has a driver management product. To deliver purchases there is a job in the current system that sends notifications to couriers, stating there is a new purchase to be ...
5
votes
2answers
856 views

Design classes to model 3D scanned faces of ancient Greek/Roman sculptures: is multiple inheritance a good design solution?

I would like to deepen the topic of multiple inheritance using Python and I usually find examples that are too simple. I love art and I imagined the following problem and I want to understand if ...
3
votes
1answer
90 views

UML activity diagram modeling for multiple input/output Program

I have to create a overview documentation for a simple PLC (programmable logic controller aka industrial automation controller) program (happens to be written in Step 7 but not really important). The ...
-2
votes
1answer
76 views

How often should I request a token when communicating with a third-party API?

I have an ASP.net web API. I would like to call another API that has an authentication token inside my API. The code flow is as follows: My API is called → Get authentication token from 3rd party API →...
1
vote
1answer
72 views

Sharing business validation cross Vertical Slices

I’m doing an task based application using Vertical Slice Architecture (VSA) and domain driven design (DDD). Tasks split into commands and queries and using Mediator pattern. Say I’m having an Order ...

15 30 50 per page