All Questions

Filter by
Sorted by
Tagged with
0
votes
5answers
183 views

Hypothetically if every scenario were covered by an end-to-end tests, would unit tests still have any value?

Note: I'm asking about the strategy behind unit / integration / end-to-end tests, not about classifying tests as one or the other. More so in the past than present, it was expensive to write and run ...
0
votes
1answer
61 views

Is it a good practice to have an endpoint URL with path parameter accepting different type of values according to an indicator in the HTTP header?

Assume a resource URL in the context of REST API: /sites/<site id or site code>/buildings/<building id or building code> The value of the two path parameters, <site id or site code> ...
0
votes
0answers
46 views

Best Architectural practices to combine Elasticsearch and Redis with MySQL

Idea: Multi-tenancy in 3 different layer Database: MySQL with multi database (database per tenant) Indexer: Elasticsearch Queue and Database load helper: Redis Problem: We have chosen to work with ...
1
vote
2answers
76 views

In Event Driven Architecture, do Microservices only communicate with Events/Commands?

Still getting to grips with EDA. Suppose in your system you have an Order Service, which first needs to check if the customer's account has enough credit from the Account Service. There are multiple ...
2
votes
4answers
158 views

A language design with variable qualifier

I am planning to design a programming language. One challenge I face with is whether it is a good idea to have const as a variable qualifier instead of a type qualifier. For example in C++: const int ...
0
votes
1answer
28 views

How do I decide an initial in-memory cache size given my DB size and expected load throughput?

(Purely for learning purposes) Say the DB contains 1 billion rows with 200 bytes per row = 200 GB of data. The traffic at peak is 1000 requests/s, with each request asking for one DB row. What cache ...
-1
votes
1answer
80 views

Is dynamically hiding specific parts of the input data passed to a function pythonic?

I have a design question regarding "dynamic information hiding" vs static typing. I have for the following python code class RuleInput: attr1 = ... atrr2 = ... ... def ...
0
votes
1answer
56 views

What kind of Relations should I have in my E/R Diagram

I am trying to create an Entity/Relationship Chen Diagram for a new APP. Scope is simple enough. I will have multiples types of users login through the same Login Form. What I decided to do... Is ...
3
votes
1answer
247 views

Clean Architecture use case testing

Use case interactors in the Clean Architecture consists of the application specific business rules. Interactors uses the Data Access Interface to fetch the required data from the data access layer. ...
2
votes
2answers
135 views

Programming a library in multiple languages

I am planning to implement a cryptographic library for several languages and looking for best practices. I have looked at several threads, especially this, this, and this one, which answer my ...
-3
votes
0answers
18 views

What should be a standard module structure in Spring BOOT for CRUD applications?

Most of the spring boot CRUD applications are very similar to each other. I have used the following module structure so far. - config - DB Config - Application Property Config - Bean Config - ...
-2
votes
1answer
66 views

An expression in the first line of the control flow statement

Is there a term or some short wording to refer to an expression in the "first" line of the control flow statement? func() { if (a == b) { var = 1 + 1 return True } else { var ...
0
votes
0answers
19 views

How to change response when token expire using AuthExceptionEntryPoint?

I'm facing issue in spring security custom response. I have asked question in stackoverflow community also, Here is link for Question, Can anyone help me out for this issue.
0
votes
0answers
15 views

Reading from SQS using AWS Lambda vs WebApp background worker

I'm writing a microservice (in .netcore) that will handle some requests using WebAPI, but also it needs to react to some external events. I see 2 possibilities how to solve it (on a very high level): ...
1
vote
4answers
175 views

Is thinking of an OOP object as a “small program” a good analogy?

I have read that we can think of an OOP object as a "small program" that send messages to other "small programs" (objects), but I am not sure if this is a good analogy. One reason ...
2
votes
2answers
117 views

How different are float numbers across different hardwares?

Firstly i am aware that different hardware architectures handle floats differently, so I can't guarantee the same result on different machines even with the same inputs. But in my case i do not have a ...
-2
votes
2answers
58 views

Is it okay to keep open the MySQL database connection open through out the Application or open and close connection query-wise?

I'm developing a REST API using Nodejs along with MySQL as the database.Is it okay to keep open the MySQL database connection open through out the Application or open and close connection query-wise ? ...
-5
votes
0answers
16 views

including and passing variables with php wordpress

I am using Wordpress for my clients to log into the site, put data in a customized table and save it in a database table. Through the code “example” that I put in funtions.php theme I can return my ...
5
votes
4answers
418 views

Is it a good practice to have an endpoint URL with parameter accepting different type of values? [duplicate]

In my current maintenance project, there is REST API resource URL like this: /sites/<site id or site code>/buildings/<building id or building code> In this endpoint URL, there are two ...
0
votes
3answers
156 views

Why is global state not considered as an example of dependency injection?

According to Why is Global State so Evil?, as I understand, global state is bad and I should use dependency injection instead. That means, for example, a mobile app that use bundles of app level data ...
-1
votes
1answer
47 views

How can we extend a packet in the case of an overflow?

I have asked this question in stackOverflow, but I guess that maybe softwareEngineering is more appropriate. (here is the question in stackOverflow) I have frames sized with a fixed size of 7 values (...
1
vote
1answer
65 views

How to decide on abstraction level and entity definitions?

I am working on a hobby project of mine where I want to make an application to doing my personal finances. Just for learning. I am trying to adhere and implement best practices and patterns to learn ...
-2
votes
2answers
77 views

Software Architecture: Repository Data grabs all the Data

We have the current software pattern below. Sql Server Db --> Repository --> Domain Layer---> Dto Layer The Dto layer filters sensitive data, and brings only required domain data to client ...
1
vote
1answer
47 views

Strictly only importing modules in subdirectories: is this a good rule?

I'm making my 1st official project. It's written in Python, is open-sources, and I'd like people to be able to freely and easily fork and modify the code. The project name is "shelf" and the ...
-5
votes
1answer
31 views

How is data stored prior to downloading?

I go to several sites that offer their data in XML, JSON, CSV formats. As shown here, https://www.space.org/basicspacedata/query/class/boxscore/format/csv, I choose the format. Question is how is ...
2
votes
2answers
101 views

Releasing from feature branches

My app is being deployed on various platforms, among which GNU/Linux, iOS and Android. I am contemplating the branching model of the central C++ code git repo, upon which all platform-dependent code ...
0
votes
2answers
69 views

How would an event driven architecture deal with agregating events over a time period?

Say I have a service that is producing events of the format type: SEND_MESSAGE, to: 'bob@foo.com', And I have another service, that is saying, "for the next four hours, I want to consume all ...
1
vote
3answers
86 views

What design pattern to be used for more duplicate elements

I have to create a class named Phone, which can be any phone like Android, iOS and Windows. Again in Android, I will have various types of phones. For me challenge is, I have to maintain more than 100 ...
0
votes
0answers
14 views

Drag and drop and handling huge amount of documents to update position

I'm having a series of data as documents in a document db (CouchDB) Sample of a document looks like below { _id: xxx _rev: xxx data: xxx position: 1 } These documents displays in a web front-end ...
1
vote
5answers
321 views

Why OOP languages use the syntax “object.function()” to send a message?

In C++ and Java and many other OOP languages, in order to send a message to an object, you have to use the object.function() syntax, for example: myCar.start(); // send the start() message to the ...
0
votes
1answer
72 views

Microservices Conditional API Call Design

I always think about this scenario where we need to perform a task conditionally and the task requires calling another microservice. What I am not able to understand is which microservice's ...
0
votes
0answers
16 views

How to handle nested reactive properties in reactive programming?

When building an application or program using the concepts of reactive programming, how does this work for nested reactive properties? I have an example using Swift, ReactiveKit, and Bond, however the ...
2
votes
1answer
83 views

How to handle db password change in a live service

Suppose I have a REST application running on a remote server which connects to a mysql database. Now let's say the password of the db has to be changed. What are the right methods and practices that ...
-3
votes
1answer
77 views

Sharing data among websites

I manage one middle sized website that uses Flask and PostgresSQL on the backend and some JS with Angular and Jinja2 templates on the fronted. Now we're going to create a second website that will be ...
0
votes
0answers
22 views

Is it ok to cache the user password in Hibernate two-level cache, if not, how to avoid it?

I am working on a blog system, and use Hibernate as my ORM framework. The blog system has Post and Comment entities. Both of them has a nested author field, associated with the User entity by a ...
1
vote
5answers
154 views

Is this an anti pattern or misusing the interface default method?

Instead of checking the null and throwing exception each time we call findByOrderNumber method, I came up with this pattern by taking advantage of a default method, are there any patterns misused here ...
0
votes
1answer
56 views

RESTful Response when the POST request results in the creation of different kind of resources?

I have been working on designing an API that lets client create a product (think of product as something like website domain, something that comes into existence when client makes order for it to the ...
-2
votes
2answers
160 views

Sending float over TCP

I need to send a series of floats over a TCP socket. Firstly, is it safe to assume that most platforms (e.g off the shelf Windows PC/Laptop) and architectures represent floats in the same way (i.e ...
0
votes
1answer
63 views

Remember initial order of list while editing it

The table Let's say we are running a webapplication for the Superhero Association. In there, there is a table of 1 000 000 super villains which need to be watched. Everytime a super hero gathers new ...
-3
votes
1answer
34 views

Using same algorithm in web and Android application

For my project I need to use same algorithm for both web and Android application. I thought about handling the algorithm server side but I feel this would put too much unnecessary load on the server ...
0
votes
0answers
37 views

Use debug-functionality without breaking architecture

note: This is of couse about software-architecture/design-principles, but as no architecture is completely detached from its language, please note that the language i am using is C++. I am using an ...
-3
votes
1answer
55 views

Might be inheriting a php spagetti project. Full rewrite in different tech stack? [duplicate]

I'm in dire need of some help. My background is from python, js and ruby, with using frameworks to provide good structure. A potential client has an internal app which does quite a bit of stuff. This ...
0
votes
1answer
40 views

Implementing a user ID system like Discords for a web app using Java Spring, JPA, Hibernate and MySQL

I’m trying to create a web application with a forum and user profile along with other functions. However I’m thinking about how I might implement an ID for each user. The best way I’ve seen other ...
1
vote
2answers
266 views

How to respond to a customer when their bug can't be reproduced

A customer has reported a bug that neither them nor us have been able to reproduce. This is the only report of this bug happening so far. We've spent a lot of time trying to replicate the issue (...
0
votes
2answers
113 views

Encoding const-ness on interfaces. Readers - Writers vs Const wrapper

This question is based on this separate question on stack overflow. I have a very low-level structure meant to compactly save presets on flash memory. For simplicity I am going to use stored_record as ...
-2
votes
0answers
30 views

Is there a way to split the db workload between multiple instances of the same service?

I have a service which on timer needs to look into a db table and go though each item individually and make some requests for it elsewhere. In order to make this service scalable, I need a way to make ...
-3
votes
1answer
64 views

How to test dependencies between microservices?

We have two microservices A and B that are developed inhouse. A provides an API that B consumes. Let's assume that B has some specific integration tests that ensure that B is compatible with A. We ...
0
votes
1answer
50 views

Performance problems with microservices that have high data coupling

I'm working on a relatively large system, that is about online transportation reservation. The system is decomposed into some services, that are interacting via REST interface with each other and the ...
1
vote
1answer
79 views

When keeping all state in an SQL DB, how to handle one-off variables?

I noticed this pattern in my programs: I'm building a system, like the one I'm building for my local hackerspace right now. It's using database as its "brain" - a scraper as a separate ...
52
votes
12answers
7k views

Is it common to have to iterate on a design due to overlooking problems with it?

When I'm designing a system for a program, I often make misjudgements that will prevent the design from either working, being maintainable, easy to use or all the above. This means I will usually have ...

15 30 50 per page