All Questions

Filter by
Sorted by
Tagged with
2
votes
3answers
342 views

Is “Transactional outbox” an anti-pattern?

"Transactional outbox" is a pattern for distributed systems which makes use of a single db transaction to do both, persist changes to the domain model and send a domain event message to the ...
5
votes
2answers
210 views

What is a “lock ordering inversion”?

I am looking into Eric Lippert's answer to this Stack Overflow question. In his answer, he uses the phrase "lock ordering inversions" in regard to deadlocks. I've searched the web and have ...
-2
votes
2answers
62 views

Why does the cpu store the current instructions into a stack once a system interrupt happens? [closed]

I was reading about it and was thinking surely the queue first in first out system would make more sense than using a stack because the last instruction will become the first right because it's lifo?
0
votes
1answer
33 views

Database design: use a single “Author” associative entity related to different entities

My application deals with multiple entities (Articles, Files, Images, Documents, ...) and multiple Users (another entity). Every entity must have one or more "Author" User(s) associated to ...
0
votes
0answers
16 views

Designing a Js lib, dependencies and peerDependencies

I create a new lib that I want to use in all of my projects. It will contain wrappers on famous libraries such as VueJS and Axios. How should I reference these libraries, from the specs I see that I ...
-4
votes
1answer
65 views

Design a login system

I have a task of designing login system with the requirement below: If the user login over three times, lock account for the first 5 minutes. The next failed 3 times login-in will lock the user ...
0
votes
1answer
42 views

Should we use an Identity server for our core?

We are currently making the codebase for our company. In this project we upload user data like users ID card, drive license, bills for identity confirmation and a lot of other sensitive data. My ...
0
votes
1answer
55 views

Eventing: Determine if Set of Messages has been Processed

Given a Set of messages sent to a Queue, what are good ways to determine all of the messages have been processed? Constraints: Large number of messages Other messages besides those in the Set will be ...
0
votes
3answers
88 views

How do I create a second App in git where only a few files throughout the Tree are different from the first app

I will have to create a second app based on the first app. The second app shares 98% of the code (Some of the UI is different). I am wondering how to set up the second app without creating a merging ...
-1
votes
1answer
49 views

Deep Object Graph Hierarchy: access an object which belongs to that hierarchy

Consider we have something like this: A person, which has a physical body with arms, each arm has a hand, each hand fingers, and each finger a fingernail. Another example: we have a car and a car-...
-1
votes
0answers
33 views

Alternative verbs for a factory style operation

What verbs, other than 'new' and 'create', are being used for factory style operations? The reason I'm asking is that I'm not quite happy with my current way of naming the family of functions ...
0
votes
0answers
27 views

Internal behavior VS external behavior with the count of method-parameter

Inspired by my own question + a fragment of Robert Bräutigams answer there: Tell one, but ask the others? i came up with this question here: let's take us the write method of a chatroom or any other ...
0
votes
3answers
206 views

Are C# unit tests running independently from each other?

I'm using C# with NUnit. Let's say you have a class public class MyClass { private int classMember; [Test] public void Test1() { classMember = 1; Assert.That(classMember ==...
0
votes
1answer
85 views

How can I represent a graph for a visual programming language in JSON?

I am in the process of implementing a visual programming language similar to Blender's node editor or Unreal Engine Blueprints. It will be implemented as a SPA that will communicate with a JSON based ...
-2
votes
1answer
35 views

authentication flows for secured applications

There are many secured applications developed in node.js. However, I could not find any framework (like Spring-security in Java) that can be used to save the trouble of managing the authentication (...
-3
votes
0answers
24 views

Best practices for defining multiple variables w/JavaScript

In JavaScript, I often define my initialization variables like so: const em = require('../../error_messages.json'), db_queries = require('../db_queries'), db = new db_queries(); or const ...
0
votes
3answers
130 views

Is it good practice to put comment headers into each file?

I have an Unity project with countless of C# script files and I'm working on it solely. Although nobody else is working on it, I'm aware that some form of code documentation is crucial for my future ...
0
votes
2answers
66 views

Is there a common Python pattern for the scenario “run code, save the output and load it on a rerun”?

I've been using different ad-hoc variations on this, especially in numpy / pandas / data science-y applications. For example let's say I've done some intensive processing that outputs a numpy array ...
1
vote
2answers
104 views

6 week fixed timeline for build phase - waterfall?

Context: I am talking about a new program from Microsoft for Microsoft Teams based app development called "SLATE". This program requires 6 weeks fixed timeline for the "Build" ...
-2
votes
3answers
183 views

Feasibility of a service oriented concept for a device architecture

Assume a device using Raspberry Pi to control some hardware. This diagram tries to clarify the components: SOA concept feasibility is being explored right now. The motivations are: Components in ...
39
votes
8answers
6k views

Getting buy-in for cleaner and more structured code

I am at my company for half a year now and think that I have gotten a fair idea of their codebase. Initially I didn't dare to form strong opinions, but now I start to feel that the code could benefit ...
-1
votes
1answer
41 views

Model design for `Team`s and `Member`s

Say we have to create a model for a company, where employees can be part of many different teams. A team can have member members. Members can be part of many teams. How to design database tables for ...
0
votes
1answer
66 views

C++: Broadcast/observer pattern with polymorphic events

I'm currently trying to implement an event-system following a broadcast/observer scheme. I have events/notifications that contain information about what is happening: class Event { public: Event(...
2
votes
3answers
117 views

domain model logic behavior (ddd)

How domain model capture business logic / domain logic since i cannot access repository? I see many posts saying that domain model = business objects But Business objects live in application layer (...
5
votes
1answer
214 views

Event Storming: How to represent a loop?

I recently ran an Event Storming session and a scenario came up where we needed to represent a loop within the process. The events and commands needed to happen iteratively until a condition is meant ...
0
votes
3answers
122 views

Confusion about basic exception handling and rethrowing exception [duplicate]

I came across this question and super confused about rethrowing concept in the following example: try { // code that may throw exceptions } catch(Exception ex) { // add error logging ...
-1
votes
2answers
60 views

Do I need to use Apache Kafka alongside another DBMS in my use case?

I have a project that relies on getting data from IoT devices. then I display the data analytics using a graph (in real-time) and also the state of the machines (are they working or not and the reason ...
-3
votes
0answers
53 views

Why in java package names follow the convention that has this form: org.^something^.^rest_of_package_name^? [duplicate]

Both in my Android Java project and in Junit's documentation I noticed that package names follow the following convention: For example in junit4 there's the org.hamcrest prefix on each package name ...
0
votes
0answers
42 views

Idiomatic Golang Unit Testing

Currently I have some code which is structured like this: type Service struct { // some dependencies } func (s *Service) FindStuff(ctx Context) { // this signature cannot be changed // some ...
-3
votes
3answers
192 views

Confused between HAS-A and representation [closed]

I'm currently working on a game in which a maths module is being used, here is one of the classes called Vertex. I'm getting confused with the relationship between HAS-A and objects representation. I ...
-1
votes
1answer
48 views

How do I know if my nodejs application is stateless or not?

According to documentation from PM: https://pm2.io/docs/runtime/guide/load-balancing/ To make use of its load balancing feature which uses node's clustering to spawn multiple node processes, I need a ...
0
votes
1answer
100 views

Is it any more efficient to reuse a variable than to create a new object?

In a project I am working on we load various entities from the database, do some work then attempt to save the resulting entities. If saving the result is not successful, we return a Result object ...
-1
votes
1answer
45 views

How to objectively monitor REST APIs perofrmance based on the request/response size

We recently integrated a monitoring solution (Data Dog) for our REST-APIs based microservices. The monitoring solution gives us many useful metrics. For example, we can see the average response time ...
1
vote
2answers
79 views

Efficient and correct way to store image data in Java? [closed]

To clarify, I'm having to develop a GUI application that stores information about clients (for a course) where one of the fields is the logo of the client. I'm currently using serialization to persist ...
-1
votes
1answer
72 views

What's the best architecture to run scheduled jobs (max. every hour) and jobs initiated by users, both of which do same processing?

I own a library that reads a file (large or small) and converts it to a special format that one of our vendor's application needs. This conversion can take anywhere between 5 seconds to 10 minutes ...
-1
votes
0answers
89 views

Adapt a code for two different hardwares

I have on my local machine Intel hardware. On HPC, I have an access to Nvidia hardware. My code contains a lot of matrix multiplications, so using CUDA (which is only supported by nvidia hardware) ...
1
vote
0answers
50 views

Near Real-Time Data Aggregation using Complex Queries

We are working on a multi-tenant SaaS product that has a ledger of all tenant customer transactions, which we use to track invoice states on a line-item level. This particular application will result ...
-2
votes
0answers
30 views

User-centric / Permission-based API-Design

I'm currently researching on how a user-centric/permission-based api could be designed. I have a few ideas but they all have their pros and cons, so i'm seeking for advice + wondering whether there ...
3
votes
3answers
189 views

What would be a good analogy for explaining higher order functions?

I am teaching a beginners course on JavaScript programming and web development. Passing a function as a value into another function is a very common thing in JS from the very beginning. As the ...
-2
votes
1answer
124 views

Is it a good idea to implement a software application in C# and then convert it to Python? [closed]

My project is about an automatic HTML documentation generator. The final product can't be in C# because of some organizational and legal constraints. To my experience, Python is harder to debug than C#...
1
vote
0answers
22 views

Best way to store webshop item data as a snapshot when an order is created

I'm designing the architecture of my application and I'm running into an issue. For the webshop every Order entity has a relationship with a Store and many StoreItem's. This allows for quick fetching ...
-1
votes
1answer
75 views

Design Pattern for accessing data over RestAPI calls

I am looking out for a general design strategy or pattern designing various components in my client application. Here are high level details: The data is accessed my making a RestAPI call. The data ...
-1
votes
0answers
68 views

What is the best way to map the json response to Java POJO models?

I am currently working on a spring boot api Java project which returns a JSON response from a rest template call. I am in the process of mapping the JSON response to my api POJO(DTO objects) which are ...
0
votes
0answers
14 views

how to manage global variables cookies localStorage sessionStorage etc across large organization [javascript, mostly]

Specific details on my current situation I think would be best. This is mostly focused on javascript. The one grey area would be httpOnly cookies. We should probably include httpOnly cookies at the ...
0
votes
1answer
60 views

How does Lamé's Theorem give us an order-of-growth estimate for Euclid's Algorithm?

I'm reading SICP, and I don't understand how Lamé's Theorem gives us an estimate for the order-of-growth of Euclid's algorithm (the relevant passage is below). It would make sense to me if the ...
-1
votes
1answer
130 views

Modeling a workout schedule using OOP(DDD specifically)

I am just getting into DDD, and I am trying to model a very basic exercise schedule. I have a Schedule and I have a Slot the slot takes 0 - many Exercise entities. The schedule is composed of Slots ...
0
votes
2answers
50 views

Is it better (or preferred) to initialize allocate and free structures used by a thread, “inside the thread”

Let's say we are building a threaded program in C, for example a message queue system where a thread is spawned to manage one end of the queue, and (re)connect sockets. This can roughly be set up in ...
0
votes
1answer
26 views

Sync customers between shop and CRM-system (two-way)

I have a shop system that is based on a MySQL database and over which I have full control. On this system runs my synchronization plugin. And then there is an external CRM system with a fixed API. ...
-1
votes
1answer
49 views

How would you define a domain model for an offer/booking system?

I want to design a domain model for the following system: a customer asks a hotel for rooms availability and prices on a date the hotel send several offers: room type x, price Y, etc the customer ...
0
votes
0answers
27 views

How should I think about infrastructure as code when using Kubernetes?

I'm trying to better think about our IaC configuration. I work in a large enterprise, so our Kubernetes infra is managed by the Kubernetes team. We have our application deployments automatically ...

15 30 50 per page