All Questions

Filter by
Sorted by
Tagged with
4
votes
1answer
99 views

Real-world scenarios for protected inheritance

C++ supports protected inheritance: A class can derive from a base class B in a way that the "outside" world doesn't see that class "as a B" but the class itself and it's derived ...
0
votes
0answers
15 views

What is the recommended way to start a long-running containerized analysis in R from NodeJS?

I have a frontend through which users can submit analysis requests, which are inserted into a database. These analysis requests are received in a NodeJS server using Postgres notify/listen. Using ...
0
votes
1answer
133 views

Is it ok to Inject a whole object instead of only the dependencies

I'm working with the Dependency Injection Pattern in Unity3D (an engine which uses MonoBehavior, a class that doesn't have a constructor, as the base class for all of its game components), and I ended ...
5
votes
5answers
656 views

Does software which implements scientific models require unit tests?

I work in a field where lots of code is written, but hardly ever tested. This is because we are foremost scientists who try to solve problems with code. The few coding courses we had, focused on the ...
0
votes
1answer
60 views

How to handle authentication & authorization inside microservices

Example Application I will try to explain my problem by using a familiar application. Lets'say I'm building a Discord / Slack / Microsoft Teams clone; and for simplicity’s sake, it will contain 2 ...
-1
votes
2answers
56 views

DDD, service and localization best practices?

I'm building HTTP API with DDD principles. The end goal is that the server runs on some chosen language X but the clients can use what ever language the software supports. Service has state, but HTTP ...
-1
votes
1answer
24 views

Inserting dissimilar excel files in SQLdatabase

I have a bunch of excel files(Multiple sheets) with some data of similar types, but i'm having troubles when this data has to be inserted in SQL DB. the data in these files are unordered (eg: the ...
-2
votes
1answer
52 views

Unexpected shutdown before a saga completion

Suppose we have some microservices and a saga will run to do a transaction in 6 microservices. What if the whole system dies(unexpected shutdown), on middle of saga process in the step number 4?(...
0
votes
0answers
14 views

Reactjs + nodejs external authentication flow

I am developing a RESTful application with nodejs in the backend with express.js as middleware. I am also developing a client in Reactjs. I want to use an external authentication service (LDAP/AD/ADFS)...
-4
votes
1answer
47 views

How to Handle Out of memory?

We are developing a mobile app where consumers (companies) create AR content for their products. The content ranges from simple pictures to gifs and embedded videos. We already released versions ...
-3
votes
0answers
60 views

Are multiplications in Short type quicker as in int type ( in Java)? [closed]

I have seen on this forum that performing the same operations with long (type of variables) takes more time as they are declared as int. See , for example: https://stackoverflow.com/questions/19844048/...
1
vote
1answer
82 views

How to manage 2 libraries that do mostly the same things in a project?

I am encountering a design problem on a new project. I have chosen the library Luxon (https://moment.github.io/luxon/) because I think it suits this project perfectly. Date-fns (https://date-fns.org/) ...
-3
votes
1answer
38 views

How to store and query multi selection options?

An example would be an Automobile sales application where Autos are stored with their Make and FuelTypes. An application user would save their search criteria in a SearchCriteria table which would be ...
0
votes
1answer
25 views

add function to input of builtin python logger

For simplicity, assume my application logs only dictionaries. I want to add a step to Python logging for my application to prevent logging any dictionary with the key password, i.e., def clean_log(...
33
votes
8answers
6k views

In code review, should I ask to do a refactor outside of the scope in a pull request?

I have been studying the best practices for a code review, and I was wondering what to do in the following scenario: During a code review, I see potential improvements, but decide that they are ...
1
vote
2answers
113 views

Confusion about layered architecture

Given a layered architecture consisting of presentation layer business logic layer data (access) layer and a SPA web application communicating through REST endpoints with the backend (eg Angular and ...
0
votes
1answer
17 views

Package management & DTAP: how to keep overview?

We have an application which contains of multiple composer packages. A default structure of the site is: src/ application/ vendor/ vendorname/ framework/ filemanagement/ ... Each package has its ...
2
votes
3answers
73 views

Is it an anti pattern to have service to service dependency in the layered architecture? [duplicate]

Is it a bad practice (or maybe anti-pattern) to have service to service dependency in the layered architecture? I've noticed that when an application is designed in a way that a service can call ...
3
votes
2answers
138 views

How to mock a class not implementing an interface or having virtual methods

I'm trying to write unit tests for business logic classes I have control on, but which operates over some services that are not designed with the testability in mind. Currently I’ve extracted the ...
16
votes
3answers
2k views

When to add version numbers to documentation

It is often useful to document when (i.e. in which versions) a feature was added, marked as deprecated, etc. For example: Function FooBar(x, y, z) Foos x with y and bars them with z. (Parameter z was ...
-1
votes
1answer
64 views

What is “scoped logging” defined as?

I hear this term from time to time but haven't found any well defined precise technical definitions posted online. They all seem to use the notion as if the term scoped has been defined elsewhere. I ...
4
votes
5answers
200 views

How to fix a pair of tightly coupled classes that store references to each other?

I have the following situation: class User { public Thing curThing; } //each thing can only belong to one user at a time //And vice versa class Thing { ...
-1
votes
1answer
56 views

Making a GUI for receiving/checking user input - how to arrange GUI and validation checks

Sorry if my question sounds general, I'm new to GUI and frontend/backend ideas and all that (mostly I just do scripts for math hw and such) but I make it more specific here. I have a program that runs ...
1
vote
2answers
90 views

Is it reasonable to ask API consumer (client) to provide sync response to notification/callback?

We have an API platform which allows user to create and manage a certain type resource. Client is expected to provide a callback url where our server will send notification to when the resource is ...
-2
votes
0answers
15 views

Periodic jobs in express api

I want some advice about project structure and architecture. Context: I've been looking into building a news aggregate; postgres->expressjs+typescript->React (at this scope). For the moment I'm ...
0
votes
0answers
39 views

How to design a logger to support different flows with different behaviours

I have a huge project. Inside, I have many flows, such as purchasing flow, search flow etc. I am aiming to publish logs inside these flows to S3 (for simplicity, S3 is not relevant here.) I have a ...
1
vote
1answer
61 views

HTTP(S) API authentication: why not many services require signing (HMAC)?

I am currently researching existing authentication/authorization solution that are used for REST APIs. More specifically I'm interested in backend-to-backend interactions but client-to-backend is ...
0
votes
1answer
58 views

Extract Exception handling MVVM

I noticed a pattern in my code, where im repeating a solid amount of code. Let's say my application has 2 layers. UI and Services. I have a FileService class, that has a CopyTo method. Now there are 2 ...
1
vote
1answer
62 views

DDD - Is creating logically dependant aggregate roots that don't make sense on their own a bad practice

I'm developing real-time chat functionality as part of an application. As per my initial structure I had 3 Domain Objects as part of this new context: Thread (aggregate root) ThreadMessage (entity, ...
2
votes
1answer
436 views

Should a large number of system tests be part of the build?

I believe extensive automated unit tests should be part of the build. However the testing pyramid suggests that there should be a much smaller number of system tests. Should an automatic build include ...
-6
votes
1answer
97 views

Which software architecture style can be applied for sequential execution problem? [closed]

I have a problem scenario in which a list containing activities to be performed is prepared before hand for future execution. Activities in the list need to be executed sequentially. The activities ...
0
votes
1answer
42 views

Using external APIs to build a dashboard

I have a website that is based around some external APIs related to a certain theme. It combines data of responses from multiple APIs before returning to the frontend. With that said, my server side ...
-3
votes
0answers
40 views

S3 Lifecycle Policy Clarification

I have a S3 bucket which gets ~5000 entries added to it per day. This S3 bucket will start out with a 2 year retention(lifecycle) policy. This retention period might change in the future either ...
-4
votes
0answers
26 views

creating websocket connection in GO

I am trying to create a connection with a wss endpoint. My assumption is I make an endpoint on my system (socket) and listen on it, and create a client to connect to the endpoint of the website. I am ...
1
vote
3answers
135 views

Why are code readability and debugging arguments often expressed as a counter-argument for the use of generated LR parsers?

When it comes to using an LR parser generated by a tool, such as Bison, a disadvantage that often comes up as counterarguments is that the resulting parser will be unreadable and complicated to debug, ...
-2
votes
2answers
82 views

Caching expensive sql queries on first page load

I have a web application with an express/node backend using typeorm and PostgreSQL. The home page in my app is a query with lots of inner joins that shows the user a complex report. This query takes ...
3
votes
3answers
248 views

Why not use SQL to query an API instead of GraphQL?

nalzok posted an interesting question over a year ago: "Why not use SQL instead of GraphQL?". Respondents seem to suggest three main problems: One should not directly expose one's database ...
1
vote
1answer
51 views

Shared immutable state between actors

What are the drawbacks of sharing immutable state between actors in a non-clustered system? It's clear as to why a mutable shared state works against a lot of the guarantees that the actor model ...
1
vote
3answers
210 views

How to architecture the big files download?

I have a website where new requirement came up where user can download a zip file of 500MB from the server. I am expecting max 10 concurrent users(CU) will be performing this activity . Webservers ...
0
votes
1answer
25 views

How to launch a detached child process in Node, and reuse it on subsequent executions if already running?

I want to write a Node CLI that leaves a server/daemon running in the background, so subsequent calls to the CLI are much faster, as it can just print the latest info from the daemon (which is already ...
0
votes
1answer
28 views

Remotely monitoring bash terminal progress

I'm thinking of creating a system which would help me transfer the output of my bash terminal to an app in a remote device(like my Android smartphone). I was thinking of tackling this problem as just ...
3
votes
1answer
75 views

Monolith to microservices - Staging / UAT environments

In our organization we're looking to adopt a service oriented architecture where new requirements (that are natural bounded contexts) are being built as separate services that integrate into the main ...
1
vote
1answer
77 views

What is the best way to decouple and define the orchestration (coordination) of concurrent tasks?

I have a data synchronisation concurrent algorithm. It does the following: get data and files from server, send data and files to server, save them to database / filesystem. Imagine the system like ...
2
votes
1answer
107 views

Where should I place more complex business logic related to what a Web API does but consumed by a single client?

I have been debating with my colleagues about the following and we still did not reach consensus. The architecture is as follows: medium size monolith application for intranet usage a small ...
38
votes
1answer
3k views

How to design a REST API that can “prompt” the client about long-running operations?

Say you were to develop a REST API that provides access to a set of complex, long-running, operations. The typical paradigm for an API like this (as I understand it) usually involves (the client) ...
-2
votes
1answer
35 views

A Recipe for Handling an AWS Network Request from Start to Finish at Global Scale

I have been reading the AWS documentation for a solid 2 weeks, and configuring a terraform system to deploy a multi-region network. I have it mostly wired up, but I am not sure I have accounted for ...
2
votes
2answers
147 views

Control flow vs. Flow control

When it comes to name things like if, else, or return, many developers and a lot of documentation calls it control flow or control flow statements. https://docs.oracle.com/javase/tutorial/java/...
1
vote
2answers
61 views

What does the inode point to in case of a device file other than the disk?

I know that the inode points to the actual disk blocks in the case of the normal file system. But what does it point to in the case of .... say .... the terminal device file. Does it point to the ...
2
votes
0answers
20 views

In a multi-region network, how do you organize requests through VPNs for atomic database transaction requirements?

I am trying to setup a multi-region (global) AWS system, where each region (which has multiple availability zones) has its own VPC. In theory these VPCs all use different portions of the private IP ...
-1
votes
0answers
31 views

Refactoring Bad Code [duplicate]

I have inherited a lot of bad code at my current position. By legacy, I mean WinForms projects written in VB.net where ALL of the logic is written directly in the form code, with no classes, tons of ...

15 30 50 per page