All Questions

Filter by
Sorted by
Tagged with
-2 votes
1 answer
70 views

Spring/Java multiple shared modules for different databases

I'm implementing a software based on the micro-service architecture using Spring/Java. Each micro-service connects to either a PostgreSQL or a MongoDB database. Is it standard practice to have a ...
Amirhosein Al's user avatar
11 votes
7 answers
4k views

How to maintain dependencies shared among microservices?

There is a dependency jar containing tons of service classes mostly used to retrieve data from database, and this jar is used among several different micro services in one cluster. There is a big ...
Rui's user avatar
  • 1,865
2 votes
12 answers
5k views

Are comments obsolete in favor of Generative AI?

With generative AI, you can just ask it to explain the code to you. In my experience, it is reliable and accurate - which cannot always be said about manual comments. I am specifically referring to ...
Evorlor's user avatar
  • 1,550
2 votes
1 answer
99 views

C++: Good approach to handle libxml2 resource management in a wrapper

I try to write a C++ wrapper to a well-known C library, libxml2. In libxml2, an xmlDocPtr represent an XML document and xmlNodePtr represents a node. An xmlDocPtr contains a root xmlNodePtr and every ...
Zoltán Várnagy's user avatar
1 vote
0 answers
75 views

Cache aware job placement algorithm

I am looking for an advise on selecting or building a job placement algorithm. In my company we have a simple computing platform built on top of kubernetes. Multiple clients, send compute jobs to a ...
AG14's user avatar
  • 119
2 votes
1 answer
702 views

Approach to software testing with docker

When discussing the testing approach, we had disagreements. We develop software that we package into an image and distribute. We have two suggestions for testing: Build a separate image with a test ...
Vladimir's user avatar
1 vote
7 answers
442 views

How do I cleanly keep track of the type of various objects implementing a common interface without reflection?

In my multiplayer game I keep track of each player's inventory. I have a class for each inventory action that extends the abstract class InventoryItem. I then polymorphically call use() on the ...
Marvin's user avatar
  • 222
6 votes
4 answers
1k views

Separate unidirectional streams vs single bidirectional stream

Over the years I've run into (and created) APIs around device communication (Serial, USB, TCP, Bluetooth, etc). At the bottom of these APIs are usually byte streams that can send data to the device ...
Rick de Water's user avatar
1 vote
1 answer
109 views

Long dictionary/map key vs shorter key + equality check for an auth cache

I'm implementing an API key based authentication scheme and I'm caching valid API key entries (hash, scope etc.) in a memory cache. For the cache key, I had been using the first 8 characters of the ...
Kyohei Kaneko's user avatar
1 vote
2 answers
109 views

DDD Model to handle Localizations

I'm trying to refine my domain model for the internationalization feature, I wanted to get your input on the best approach to structuring Culture and Localization entities following Domain-Driven ...
Hélder's user avatar
  • 121
0 votes
0 answers
55 views

Most efficient way to maintain versioned business rules files for an Amazon ECS service?

I have an Amazon ECS service that relies on configuration files that contain business rules. The business rules are changed periodically by non-programmers. Total size of the rules files is ...
Ivan Krivyakov's user avatar
2 votes
2 answers
233 views

What's the value in exposing the dependencies you used for your tests?

In Java, there's the fairly ubiquitous notion of a POM file which provides the dependencies of your modules. For example https://repo1.maven.org/maven2/org/typelevel/cats-core_2.13/2.12.0/cats-core_2....
daniel purdew's user avatar
1 vote
0 answers
48 views

BPMN: How can messages cross sub-process borders?

I need to send messages from within a subprocess. Now I read about the booking example and boundary events to and fro. But I am missing the concept how to pass information into and out of a sub-...
MaK's user avatar
  • 87
0 votes
1 answer
97 views

How to handle data when source of truth is through API

I am making a webapp that deals with money movement. All the financial actions are done through an API. For example, right now I can create an account for a user, add funds to their account, transfer ...
Mitchell Jeppson's user avatar
6 votes
6 answers
1k views

Is a callback function with `this` as an argument a bad practice?

I have a class that has a callback function that gets triggered on some event. The user of the class instance is expected to do stuff on the instance itself, inside this callback function. So I am ...
doca's user avatar
  • 245
2 votes
1 answer
125 views

For N and NBuilder, should N be an instance variable of NBuilder, or all parameters of N be instance variables of NBuilder,finally new N() in build()?

As far as I know about builder pattern, for example, an object, Student: public class Student{ private String name; private int age; //setter and getter } to apply builder pattern to ...
wcminipgasker2023's user avatar
1 vote
2 answers
278 views

How to Handle Large File Uploads in Angular and Hibernate Without Exceeding HTTP Request Size Limit?

Description I am working on an application using Angular (front-end) and Hibernate (back-end). My use case involves uploading multiple images, which I convert to base64 format and send as JSON with ...
Alejandro Corral's user avatar
0 votes
2 answers
146 views

Load Balancing of requests coming from a single client

I have a question regarding load balancing of a service. My load balancing requirement is as follows: I will have multiple application servers for a non-http service. Application servers will be ...
dsingh's user avatar
  • 111
3 votes
2 answers
123 views

In MVVM, how do you scale your viewmodels as your UI becomes larger, more complex, and more nested?

In MVVM, the viewmodel communicates to the views by exposing observable values that the views subscribe to. As your UI grows and becomes more complex, the number of these observables grows and the ...
Malachi Holden's user avatar
0 votes
1 answer
33 views

how about using kubernetes statefulset to mapping the snowflake datacener id and worker id

I am developing a distribution id project, now using the twitter snowflake id as the fundation of the distribution id. In kubernetes cluster, to fetch the uniq and non-conflict datacenter id and ...
Dolphin's user avatar
  • 103
1 vote
2 answers
72 views

How to design user-defined ordering of items?

I've got a site (here) that lets users publish labs. I'm looking at adding a feature where users can customise the order that their labs appear in. To be clear, I mean that they can manually control ...
paj28's user avatar
  • 1,665
-1 votes
2 answers
134 views

Text files vs. MySQL Performance for Large Dataset

I am currently making a system for users to generate flashcards for Languages. This involves adding information such as the definition, pronunciation, and example sentences for a word. So far, I have ...
Jarvis Coghlin's user avatar
0 votes
0 answers
24 views

Structure for jupyter notebook to python module conversion

When working with AI models because of the long load times, I want do develop with juypter notebook. However, I want to release/publish as a normal python script. You can use the jupyter nbconvert --...
Tom Huntington's user avatar
17 votes
8 answers
5k views

When should a function be given an argument vs getting the data itself?

When is it better to pass data to a function in a parameter, and when is it better for the function to just fetch the data itself? Here's some simplified examples in PowerShell: Option 1 (give the ...
Nova's user avatar
  • 181
2 votes
1 answer
113 views

Why memento is required while originator can do the job?

One thing is disturbing me about the Memento Design Pattern. Why should we use the Memento object to replicate the Originator state to store it for future restoration? Can't we use the Originator ...
Shikhor Roy's user avatar
2 votes
1 answer
231 views

Problem with data consistency in Microservice architecture(2pc transaction) when external dependency envolved

I have microservice architecture. I implement a distributed transaction flow (2-phase commit), kafka, and 1 coordinator service. So, my problem is in each step of preparation I am calling an outside ...
babak abadkheir's user avatar
6 votes
4 answers
1k views

How to avoid init methods when 2 objects need the reference of each other?

According to https://softwareengineering.stackexchange.com/a/334994/432039, I know init is a code smell and should be avoided, and one of the solutions is to use a builder to hold the state first ...
wcminipgasker2023's user avatar
0 votes
1 answer
65 views

Advice on data structure for an analysis and visualisation tool (javascript)

I am writing a browser-based tool to manipulate and visualise data (with D3.js). Currently, I store data in a JSON format, where each table is an object and columns are arrays. eg: { "data&...
user1505631's user avatar
0 votes
1 answer
86 views

Resource protection for static webpages

I'm new to web developement so I'm sorry in advance because I assume this is a pretty simple question. I'm currently hosting a website on hostinger - deployed straight from my github repo. Currently, ...
serbra's user avatar
  • 9
1 vote
1 answer
84 views

Single-source data warehouse permissions management

We (Data Platform team) are reviewing how we configure and apply permissions against our data warehouse objects, and I'm curious what tools or custom systems you might be using for this. For context ...
Zé Pinhao's user avatar
0 votes
0 answers
68 views

How to store OAuth2.0 tokens without any authentication logic on the backend

I was looking for some advice as I am tipping my toes into the world of web development, the question might be broader than the title suggests, so any tip that may be in a different direction is also ...
Gonçalo's user avatar
1 vote
0 answers
90 views

DDD -Can an aggregate consumes its own events?

I'm facing to an issue with my design in DDD with "Always valid Domain Model" principale and eventual consistency. I have an aggregate with several public methods to mutate its state. class ...
Paul Contremoulin's user avatar
0 votes
1 answer
100 views

Best practices for setting up a test suite for a python library?

note: here library means a package that is installed from some wheel/egg/tar file. as opposed to a regular package which is just a container of modules basically. package usually is used for both as ...
gnarlyninja's user avatar
1 vote
1 answer
87 views

Is providing a method of a domain entity with a data/ service provider object a bad design?

I have an entity called User, and it has a method to change the user's email address. I'm using a strongly typed object for representing the email address. public class User: BaseEntity { // Some ...
Critical Failure- Core Dumped's user avatar
-4 votes
1 answer
125 views

Architecture of a scientific software [closed]

First things first, I was not sure it was the right place to seek advice and feedback about software architecture, but this post on meta.stackexchange conviced me to do so. I hope my question finds an ...
Nicolas C.'s user avatar
0 votes
1 answer
253 views

Is IRepository allowed to know about database entities?

I am trying to apply Robert Martin's Clean Architecture on my .NET project. In one of chapters about boundary, it talks about that database interface should reside in business logic component rather ...
Afshar's user avatar
  • 223
0 votes
1 answer
136 views

Serving part of a web application as a python package for people to install, ok to do?

Background To preface, I am building a database for the construction of a timing detector. However, I am very new to software engineering and database development. I have been building a website using ...
jfwinston32's user avatar
5 votes
1 answer
512 views

Confused on how abstraction and encapsulation is helpful

Using assimp I've created a function to load 3D models and it does everything I need and I don't plan to use another library or write something custom, however, I am curious how techniques such as ...
Konjointed's user avatar
1 vote
1 answer
96 views

Is it appropriate to include a "select all" function in a Class Diagram?

Background Working towards my final project at University, team project and we're stuck with a disagreement on a point in our Class Diagram. We have a class, called "Road". In here with have ...
Simon's user avatar
  • 113
0 votes
2 answers
151 views

Is it a good idea to have a fork of a library's public repo in my solution?

My company's project uses an open source library, of which I have made a fork for some customizations. My idea is to clone this fork into my solution and to keep pushing my changes into it, as well as ...
Frank Z.'s user avatar
3 votes
2 answers
146 views

Simplifying model interface while using diff undo-redo?

Introduction & context I am working (hobby) on a CAD/CAM (mostly CAM) solution. It is a desktop application in C++, Qt, OpenGL, JavaScript and CMake. General Undo/Redo strategies Most desktop ...
Adrian Maire's user avatar
0 votes
2 answers
137 views

Why do you need to use pass by reference in C++ to change the value of the arguments inside the function?

I'm new to coding and am currently trying to learn C++ myself. I just learned about function parameters and pass by value vs pass by reference. Everywhere I read, they say that one of the reasons pass ...
Karanveer A's user avatar
3 votes
1 answer
157 views

Seeking Clarification on the Abstract Factory Pattern

I am seeking clarification on the exact purpose and definition of the Abstract Factory pattern. According to the GoF (Gang of Four) book, the intent of the pattern is to: Provide an interface for ...
Codisattva's user avatar
2 votes
2 answers
174 views

Why does a Java lambda need to explicitly mention the method of the functional interface?

import java.util.function.Function; public interface Printable { public String print(String s); public static void main(String[] args) { Function<String, String> fn = p -> p +...
releseabe's user avatar
  • 539
1 vote
0 answers
42 views

How can I use django to render a rotating view of a database?

As a toy problem for learning Django, I am trying to create a simple web app that tracks encounters and initiative for one of my D&D campaigns. I have a database with models for combatants: class ...
Brandon Smith's user avatar
1 vote
1 answer
123 views

Deciding between logic on the front-end or back-end

Before I begin, I want to say I am very new to this and I am a junior but also solo developer with no seniors to ask for guidance. Please feel free to explain to me that I am not approaching it ...
Zayd_MP's user avatar
  • 11
5 votes
3 answers
503 views

C++ and memory safety

At my tiny org, the core engine is C++ due to a compute heavy workload. I need to internally react to NSA's recommendation about replacing C++ with a memory safe language. They're highlighting the ...
Dr Phil's user avatar
  • 159
2 votes
3 answers
172 views

How to decouple spagheti code for unit tests [duplicate]

A little background on the project: we as a company receive a spaghetti source code, and into that we add even more spaghetti code. So with that I want to say that complete restructuring and ...
Tomáš Viks Pilný's user avatar
-2 votes
1 answer
112 views

What is the difference between Eventual Consistency, Strong Eventual Consistency, and Causal Consistency?

I read articles about CRDTs and frequently come across the terms 'Strong Eventual Consistency,' 'Eventual Consistency,' and 'Causal Consistency.' What is the relationship between these consistency ...
Ershetz's user avatar
  • 11
0 votes
1 answer
76 views

Using both websocket and REST for the application requiring two-way communication

I am currently implementing front-end part of the collaborative application requiring two-way live communication between server and the web app. Cloud service responsible for the data exchange will be ...
helloFromTheOtherSide's user avatar

15 30 50 per page