Skip to main content

Questions tagged [persistence]

In computer science, persistence refers to the characteristic of state that outlives the process that created it. From Wikipedia: http://en.wikipedia.org/wiki/Persistence_%28computer_science%29

Filter by
Sorted by
Tagged with
0 votes
2 answers
615 views

I’m still a Computer Science student, and recently I’ve had to develop a project using the MVC pattern, but without having learned in depth about how it actually works. And it’s not the first time I’...
MasterTJ123's user avatar
0 votes
2 answers
250 views

I have a few questions about the DAO design pattern. Let's suppose that I'm building a simple 2-tier MVC web app with a presentation layer and a persistence layer that communicates with a relational ...
Andrew Jackson's user avatar
-1 votes
1 answer
150 views

I am working on my DDD know-what/how and have the following questions related to the Specification Pattern, the Repository Pattern, persistence agnosticism, and performance. Consider, for the sake of ...
STHA's user avatar
  • 71
1 vote
1 answer
195 views

So I am working on this mobile application using MAUI, which is backed by a Rest API in ASP.NET Core. I want to be able to use the app offline, and the user can create/edit some data. This data is ...
Toto's user avatar
  • 155
1 vote
4 answers
516 views

Consider the domain entity, Order, which can be persisted by the OrderRepository. Orders maintain state that is stored in the database. However, it does not expose all of it directly. That is, parts ...
STHA's user avatar
  • 71
4 votes
9 answers
2k views

Domain Object, while not necessarily a design pattern, can at least be considered as a design "concept", and one of its points is: https://wiki.c2.com/?DomainObject Domain objects should ...
The_Sympathizer's user avatar
0 votes
1 answer
575 views

(I am facing this issue with code written in Swift, but would appreciate any high-level pseudocode solution, just so that I may wrap my head around the architecture) I need to find an architecture ...
Skwiggs's user avatar
  • 117
1 vote
0 answers
529 views

This seems pretty newby question but I still can't find a answer I'm ok with. I'm doing a microservice and decided to have a Message as an aggregate root. This Message represents a kind of ...
lavrik's user avatar
  • 111
3 votes
1 answer
526 views

In domain driven design A repository is a collection like "interface" that hides data source access. It furnish add, remove and retrieval method just like a collection would. It does it ...
Ced's user avatar
  • 609
1 vote
3 answers
1k views

I have the following problem - I write the code for object data manager, and one of requirements is being able to save/load data into some persistent data storage. I want to make it as the following: ...
Ch3shire's user avatar
  • 121
0 votes
1 answer
340 views

I'm developing a system in which a ClassA object can have multiple ClassB and ClassC objects. And for store these objects in a relational DB model I create the following tables: This is a simplified ...
Caeta's user avatar
  • 177
0 votes
1 answer
247 views

I am working on a C++ desktop application using the MVC design-pattern. In a nutshell, it allows to monitor the position of a real robot in a 3D environment and create tasks for it by modifying the ...
Hugal31's user avatar
  • 151
0 votes
1 answer
3k views

My question is about DDD, the Infrastructure layer, it's relation to the Domain, and specifically how we can take advantage of the ability to "swap out" one persistence implementation for ...
apriestley's user avatar
4 votes
3 answers
4k views

In the context of a web application where we handle only one command per request in a stateless fashion, do we always have to load/save aggregates as one atomic unit? Why is it recommended not to ...
geeko's user avatar
  • 256
0 votes
0 answers
71 views

In a case where we have multiple source of data, we need to : persist each source of data in its raw form. process the data source eventually with each other to transform them in a presentable state (...
Omegaspard's user avatar
0 votes
2 answers
2k views

I’m pretty sure I’ve made some wrong assumptions in my questions so bear that in mind. At some point, the methods inside objects that are part of the persistence layer will be called/accessed for say… ...
qUneT's user avatar
  • 53
0 votes
2 answers
163 views

I have an issue that I'm not sure how to handle regarding modeling. I'm using as my BPMS Flowable My situation: I have a flow (picture below) where are 2 user activities. Each activity manipulates on ...
PastorPL's user avatar
  • 129
1 vote
1 answer
45 views

I am trying to find an optimal way to handle the following scenario: I have an application where there are a lot of file uploads on a certain endpoint, but the validation is rather strict as per the ...
Daniel Pop's user avatar
4 votes
1 answer
567 views

Does a domain object have to be persisted, or does this violate some convention about domain objects? For example, let's say I'm using an object called AuthenticationState to represent authentication ...
Mixed_Signals's user avatar
1 vote
1 answer
2k views

In my applications users can perform actions on a few thousand aggregate root instances with a single click. The problem is that the UI is blocked for several seconds (~ 3) what feels too slow. So, I'...
deamon's user avatar
  • 886
0 votes
0 answers
375 views

I have a class that looks something like this: class Entity { public string Id { get; set; } public List<Entity> Children { get; set; } public void DoStuff(Data data) { ...
rytisk's user avatar
  • 109
1 vote
1 answer
178 views

I use xjc to compile XSD files to Java Classes, and want to edit/extend them to make them persistable through JPA. I cant figure out what the best "Coupling?" would be and how to organize it,...
Oblivial's user avatar
3 votes
5 answers
794 views

I might start by saying that I am aware that usually there's a Repository layer bookRepository.persist(book) that abstracts the interaction with the database, but something about using the model ...
Carlos Coelho's user avatar
0 votes
1 answer
155 views

I am currently developing a spring boot web application in which no entity is persistent, and hence will not be saved on a database. Although, I need to be able to query some business metrics from it. ...
Gabriel Robaina's user avatar
2 votes
1 answer
573 views

There is a number of questions about the differences between UML Association, Aggregation and Composition out there and many many answers, some practical and some phylosofical. Here I'm asking we talk ...
AlexSC's user avatar
  • 259
4 votes
1 answer
278 views

I've learned many ways to keep a domain model flexible over the years, but there is a remaining case where the setup resists change. Suppose that we have kept our domain model properly isolated: we ...
Timo's user avatar
  • 402
7 votes
1 answer
2k views

Considering that: when using the repository pattern you deal with entities - those are the atomic units you persist (regardless of Hibernate or "manually") when changing an entity you save it as a ...
Luís Soares's user avatar
4 votes
2 answers
4k views

I have a Customer which can have sereval address. Sereval customers can possibily live at the same address. So in my relational database a classic many to many relationship. As : An address can not ...
Christophe Debove's user avatar
2 votes
0 answers
240 views

I have a node js app, in which I need to perform background jobs. My plan is to use a data structure which will contain all the jobs needs done. My design also suggests that this data structure needs ...
Cap Barracudas's user avatar
4 votes
2 answers
2k views

If one wants to comply with the clean architecture principle 100%, they must not annotate the entities in the entities layer with database-specific annotations (like Hibernate, Neo4j, etc.). So, two ...
Shayan's user avatar
  • 209
3 votes
3 answers
322 views

I have a JSON object of arbitrary complexity, representing several entities (not my design choice). I want to partially persist it, only for the changed entities. What would be the best way to mark ...
JoseHdez_2's user avatar
-2 votes
1 answer
246 views

I am midway through my software development project in Node.js and have encountered a fork in the road. I need to create a "database" or a JSON file, that will automatically delete an entry after it ...
dir's user avatar
  • 115
1 vote
0 answers
241 views

The state of my TypeScript/Angular app contains objects from the UI layer and from the business domain layer. I'm exploring store-based solutions (eg ngrx, ngxs) to keep this state in memory. As ...
schrödingcöder's user avatar
1 vote
3 answers
1k views

I have decided to try to create my own board game implementation. Probably going to use a REST-api to expose the contract. I'll figure out what database, communication, ... tools I'm going to use once ...
abstract christmas tree's user avatar
2 votes
1 answer
1k views

Displayed data can be changed in the underlying database by any user. How do you show the change to all the other users? For instance, I have database tables for building and associated rooms. Any ...
dacracot's user avatar
  • 503
0 votes
0 answers
54 views

I am building a service responsible for sending email/sms communications. The service receives a request that contains information necessary to build an email/sms template and the recipient ...
Daniel Benzie's user avatar
-1 votes
1 answer
363 views

I'm working on eventual consistency. In short I have a bunch of promises and I want to make sure they get retried until they succeed. It would make my life a lot easier if I could just persist the ...
Ian Swift's user avatar
3 votes
2 answers
3k views

When I call paid() on my aggregate it sets all the properties internally that need to be changed based on this action. But at this time the change has not been saved to the DB, so I can't reliably ...
floriank's user avatar
  • 493
1 vote
0 answers
56 views

I have an app that already locally archives user created objects and has for several years. Each archived object can have several nested objects or arrays of objects in it--all of which conform to ...
Evan Gould's user avatar
-3 votes
3 answers
569 views

My teammate has this class which contains a lot of Strings: public class Config { /** * List of status */ public static final String IN = "bla*"; public static final String ...
Rigo Sarmiento's user avatar
16 votes
2 answers
4k views

I'm diving into the concepts to Domain-Driven Design (DDD) and found some principles strange, especially regarding the isolation of domain and persistence model. Here is my basic understanding: A ...
Double M's user avatar
  • 446
8 votes
4 answers
2k views

I am currently building a finance application that contains "accounts" Each account has a balance that is dynamically generated based on platform charges vs payments. e.g simplified example. $...
Daniel Benzie's user avatar
3 votes
2 answers
2k views

I need to implement a rollback system and the memento pattern gets mentioned regularly as a solution to this requirement, but in all cases a single object is used and it works in memory, persistence ...
dabadaba's user avatar
  • 2,266
0 votes
1 answer
6k views

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 ...
user3198603's user avatar
  • 1,896
4 votes
2 answers
3k views

We are coding a small game and have a Player class. This Player class has certain properties which you would persist in a database like Id, Level, Health. We would like a Player to be able to kill ...
brechtd's user avatar
  • 167
1 vote
1 answer
3k views

I'm looking to persist a stream of events and I want it to be: fast in both latency and throughput, looking at at least 100k events per second ordered (not by timestamp, as multiple events within the ...
ocf1's user avatar
  • 19
2 votes
1 answer
239 views

Working on a DDD application where I need to persist state. Here's a very simple example: public interface IRoot { public int Id { get; } void UpdateValue(int value); } public interface IState {...
aasukisuki's user avatar
2 votes
2 answers
273 views

We have an object-oriented database. So, our persistence is truly object oriented. The example is the object person and the attribute VIP. We have to store, if a person is a VIP or not. Usecase: ...
OneWorld's user avatar
  • 322
2 votes
1 answer
859 views

I have a system that interacts with a REST API as the data source. This system is based on DDD and all of my current models are CRUD models. There is one model that the REST API is only able to query ...
Allenph's user avatar
  • 149
1 vote
2 answers
260 views

We're using a similar concept to Event Sourcing to store the data/actions of a collaborative system we have running. The system has some 2-3k users that use it daily and it's growing. As time goes ...
nicholaswmin's user avatar
  • 2,134