Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions about problem solving and planning for a solution through software design.

1
vote
1answer
20 views

How to design a simple UDP server which could handle >10000 req/sec?

Currently I have implemented a simple UDP server using java sockets, as soon as the packet is received it is added to the queue and there are four consumer threads which process the queue. This ...
-4
votes
0answers
24 views

What is the good and logical, modern architecture for specific scenario? [on hold]

consider a scenario: For 1000 store branches that need web-based solution (receive data at first use from server and put it locally and after that use minor central update and save sold product list ...
0
votes
0answers
18 views

What to specify as interfaces in component diagrams

I am following the textbook Object oriented software specification using UML, patterns and Java (3rd edition) and I am defining interfaces between system components (subsystems). But I encountered a ...
0
votes
3answers
69 views

Abstract Parent and Inheritance vs. Strategy Pattern and Composition

I'm currently refactoring a class that looks (after some refactoring and very much simplified) somewhat like this: class Foo { public: Foo(bool someFlag) : m_flag(someFlag) { }; void ...
2
votes
0answers
46 views

Microservices loose coupling using distributed business logic or centralized?

How do we achieve loose coupling in the below scenario: N microservices (let's call them Callers) needs a logic or business( let's call it Worker) to be executed with different contracts. Although ...
-2
votes
1answer
46 views

Relational Database Design with a table having redundant information

I am creating a database table that will store a single number 1 thru 16 in 2 fields (there will be many rows of data). I'm trying to avoid duplicating a lot of data and make my dbase most ...
0
votes
1answer
49 views

Would you implement an interface to connect to a database?

I found in a book (Learning PHP Design Patterns, Chapter 2, page 25) a text explaining the importance of interfaces in OOP design. The author ended up by giving this example: <?php interface ...
1
vote
0answers
27 views

Message Queues and Multiple Subscribers

My team is discussing using RabbitMQ for microservice to microservice communication (among other things). We are also supporting a SAP backend that will be pushing data to us in a method undecided at ...
0
votes
0answers
18 views

What are some design ideas for a data mapping and transformation application?

Here is a high level outline of the project: We frequently need to convert data from a new incoming system to our in house system (sort of a basic ETL process) We would prefer to do this dynamically, ...
0
votes
0answers
21 views

Private/Hiding dependencies between Maven modules

Given three project modules X, Y and Z on a Maven based project, and Y depends of Z and X of Y and X should not know that Y depends of Z, being this: X -> Y Y -> Z X -X> Z What is the best way to ...
2
votes
1answer
66 views

Using SPA ( Single-page-application) in production with separate configuration file/module

Problem statement dev team Dev team wants to pre-build the SPA's (Angular App & React App) and provide single package containing JS, CSS, & HTML file. There's no server-side rendering / lazy ...
0
votes
1answer
97 views

Microservice to access databases [on hold]

Our company is designing a new ERP based on microservices. The reason we want to implement microservices is because we noticed that some critical parts of the old ERP are being heavily used by our ...
1
vote
3answers
40 views

Calculating Journey Summary made by a vehicle and Cache them to database

This is more of a point me in the right direction kind of question, I have 2 solutions but both of them are invalid because the data calculated is invalid in some scenarios. I am working on a system ...
2
votes
0answers
28 views

Putting some business logic in repositories versus keeping it out of repositories entirely?

I know most (if not all) business logic should reside in its own layer, but what is the general consensus of putting some basic business logic inside of the repository layer itself? My scenario: We ...
0
votes
2answers
114 views

What are some strategies for eliminating switches in polymorphic dynamic code spread across multiple layers?

Context: design with correlated polymorphic classes For example, let's consider the following class definitions for representing messages that we would get from some remote service: class ...
2
votes
1answer
40 views

Balancer that delegates requests to servers and problem with Websockets

Lets have an application that has real-time chat feature. The chat requires websockets in order to function real-time. Now imagine we have "balancer" and 3 application servers. Instance of ...
1
vote
1answer
74 views

A performant and robust way to reset multiple files to its original state (TDD)

In our automated Java tests, we sometimes encounter issues, such as: Test A creates a custom file A.sh, that is then added on classpath Automated testsuite cleanup does not know about random file A....
-2
votes
0answers
32 views

Reusable widgets and their communication with the backend

We have use cases to build reusable widgets that have both a frontend and backend. Its not just a UI component. Examples are: an authentication form, a search widget, a payment form, etc. These are ...
1
vote
1answer
111 views

Best practice regarding interfaces between “typed” and untyped" languages?

Our frontend JavaScript / Vue code makes uses of a number of "internal" REST endpoints, which are implemented in Java using Jersey/jax-rs. We have an "informal" specification that lists the ...
2
votes
2answers
61 views

WCF vs ASP.NET - Binary IPC

I have a windows service and a remote IIS server that need to communicate without any user interaction. As I can’t guarantee the two machines will be on the same network; the service will connect to ...
-2
votes
0answers
51 views

OOP in Computer vision project

I am trying to understand how object oriented programming works. Until now I used functional programming in a computer vision software but while the project is growing, I realized it's limitations (...
0
votes
1answer
56 views

Cache vs DB design decision?

Number of times this question comes to my and my team mind, should we persist or cache the data. I understand some time there is functional requirement that we need to persist in DB. But in my case ...
0
votes
1answer
31 views

Which scenario is the best for service worker architecture?

We know about using service workers in modern web sites. Consider a scenario back-end as node.js and SQL Server. Data is loaded from central database to local customer web app (DB is about 700 MB) ...
1
vote
1answer
118 views

Handling hardware dependency while unit testing

I am writing a driver for an IMU sensor using test driven development approach. Communication protocol of choice is SPI. Using CubeMX and STM32F415 processor, SPI interface is implemented in ...
2
votes
1answer
56 views

Race conditions in client synchronization

I have a web app whose server creates a Client for each websocket connection. A Client acts as an intermediary between the websocket connection and a single instance of a Hub. The Hub maintains a set ...
3
votes
4answers
577 views

C# has no friend class - what are better options

I return to this question every couple of years, so now i decided to solve it once and for all, by asking here. So, the sequence: I'm writing a simple application that parses Json file (...
-1
votes
1answer
84 views

Parsing and handling large byte array [closed]

I'm working on a feature in my project, where I have a large array of bytes received. The array has size of 65536 bytes. The structure looks like this: On the beginning there's header with ...
0
votes
1answer
67 views

Querying MongoDb after scheme change

The database schema of an application is rarely fixed, due to new development the schema has to change. This also applies to a schema-less solution like MongoDB. There is documentation on how to ...
3
votes
1answer
93 views

How to design a storage backend for a cloud spreadsheet?

As a personal project to learn key technologies, I am trying to build a spreadsheet on the cloud (something like Google Sheets). How would you design the storage backend to power something like this? ...
2
votes
1answer
55 views

Data points to use cache or database for these three major features under scalable ecommerce?

Auto-completion :- When we start typing, does system suggest the product from cache or hit the DB every time or hit the DB only when no result found in cache ? Search:- When enter any product, does ...
1
vote
1answer
59 views

Inventory management with limited time hold strategy - How do I protect from bad actors?

Some sites, like theater ticket reservations, place a limited-time hold on the item , while the order is being processed. As soon as you select the seat and proceed to pay, Seat is reserved say for 10 ...
-1
votes
2answers
234 views

How to refactor code with if statements which scattered everywhere in the code?

I have a serious problem with application which i working on. It has a lot of procedural code and now it needs to refactoring now.. The problem: we have two different application in general, but they'...
4
votes
3answers
113 views

Create a single class to map different object to a target object?

I have a service (S) that receives an object of type 's', this service will be called by several classes (maybe 6) and each class has their own object a,b,c, etc. with the information necessary to ...
1
vote
2answers
114 views

What is the best algorithm for implementing a system with a complex execution path?

I am currently working on an implementation that based on a set of user configurations should output a final decision. The multiple configurations are evaluated several times at different stages of ...
-1
votes
0answers
26 views

What are the advantages and disadvantages of using a proxy-server for SaaS

What are the advantages and disadvantages of using a proxy-server for SaaS (Software as a Service), like IBM Watson, for commercial consumer applications, and what is the common practice? I found ...
2
votes
1answer
206 views

Java web development

I started to develop web applications not so long ago, and therefore there are a lot of unknown things in this field for me. My question concerns web development using the Java language. Assume that ...
0
votes
2answers
40 views

Passing storage location to factory function vs storing it yourself

I have run across a bunch of code where they are essentially doing void CreateFoo(string foo_param_1, int foo_param_2, vector<Foo> *foo_storage) { Foo new_foo = FooFactory(); new_foo....
1
vote
1answer
69 views

Event Driven Microservice Architecture & Dealing with synchronous external neighboring systems

Let’s say I have an event driven microservice system - a microservice cluster - that takes orders and works with them. Orders are placed by an external neighbor system that is working synchronously ...
0
votes
1answer
62 views

Method for loading and running user defined code in .NET windows application

Are there any patterns that address how to have and application load and run user defined code at run-time? I am looking into developing a C# library that the users of a Test Executive application (...
0
votes
0answers
7 views

Hbase Spout or read all data from Hbase in Apache Storm

I have a Hbase table with around 200 million rows with keys as sha hash, so distributed from 00...00 to ff...ff. I want to either write a spout which gives me all the rows(preferable in batches of n) ...
3
votes
1answer
271 views

NodeJS (ES6): Design Pattern with bind usage

The question is related to the resolution of the this operator in Javascript classes. NodeJS now supports ES6 classes. The problem faced during this is that when a new instance of the class is created ...
-2
votes
1answer
95 views

what are the external dependencies that a class should have

from my class I include all dependencies in the constructor. to decide which dependencies to pass what rules should I follow? when I decide to use the parameters of a method instead of the ...
-3
votes
0answers
80 views

Doubt about design

I'm designing a simple software. I have a database class and another file to handle the algorithm. Algorithm work with Event objects. My doubt is about changing information between database and ...
-3
votes
1answer
89 views

test class that include another class - Only one test or both

i have a sytem a that include system b and return the result. simple!. concrete example an API, one controller that internally call another class then perform the operation. route --> controller ...
0
votes
3answers
104 views

Should the name in the codebase always match how users refer to it? (example inside)

We have an internal tool where our account management teams can say "whenever we send this type of SMS message, use this text I specify instead of the default text". They would call this 'configuring ...
0
votes
0answers
25 views

Design of RecyclerView app in Android

I'm working on my first app that uses RecyclerView and while I am making great progress, I strongly suspect that my design needs some changes. I've asked in several places over recent weeks for ...
-2
votes
1answer
130 views

Design for 'inbox' with 'unread' feature

I am implementing a similar feature like the StackExchange Inbox and I have many considerations about the resource usage. My system has inbox messages, system health notifications and Achievements. ...
0
votes
3answers
77 views

Abstract responsibility from caller without introducing complexity

I have two classes: public class Child { public List<Vector2> localPoints; public List<Vector2> localEdges; } public class Parent { public List<Child> children; ...
1
vote
0answers
33 views

Separate UI applications vs single with logic for showing/hiding functionality

Currently my company has a single internal application that our support agents use. It only supports one product at this time. Tech stack is angular on the front end and spring micro services for ...
0
votes
2answers
190 views

If I modify a private field using another setter, is it a bad practice?

I have a java class where I have few booleans and one arraylist. If the boolean field is set to true, I need to add it to the arraylist. One of the ways I can do this is to use the setters of each ...