Questions tagged [architecture]

10289 questions
1

votes
1

answer
2.4k

Views

Clean Architecture, UseCases and Entities

Okay, so I just started a new Android project and wanted to try implementing the Clean Architecture by Uncle Bob. I have a nice beginning using RxJava and stuff from GitHub samples & boilerplates and Fernando Cerjas' blog (like this article), but still have some questions on how to implement some Us...
w00ly
1

votes
3

answer
507

Views

Do modern CPU's have compression instructions

I have been curious about this for awhile since compression is used in about everything. Are there any basic compression support instructions in the silicon on a typical modern CPU chip? If not, why are they not included? Why is this different from encryption, where some CPUs have hardware support...
Trevin Corkery
1

votes
1

answer
211

Views

Strange behavior of android's ViewModel

When I try to simulate configuration change in my app by enabling 'Don't keep activities' in developer options every time I leave an activity and return, the ViewModel is recreated! Aren't ViewModels supposed to handle these situations? I can handle this problem by saving my activity's state in onS...
Mostafa
1

votes
1

answer
24

Views

What is non-idempotent memory-mapped I/O meaning?

In RISCV privileged spec page 75 mention a term 'non-idempotent memory-mapped I/O'. What is non-idempotent memory-mapped I/O? Is it about non side effect?What is design concern about non-idempotent memory-mapped I/O?
tommycc
1

votes
3

answer
978

Views

An OSGi use case - am I right or not?

I am just familiar with OSGi technology - never used but heard of it so many times. I've read several articles 'for dummies' but I think I still fail to understand its use case completely. Maybe some of you could confirm if I understood it correctly. Here is an example of what I might want to do. Le...
ezamur
1

votes
0

answer
5

Views

How to design auto-assign content coming from SQS?

I have build the app that is responsible to moderate incoming content before letting it go to the main application. After someone has shared an alert, it falls into the sqs-in-queue. My app has a separate container that is responsible for executing background tasks, including checking queues for new...
petrush
2

votes
0

answer
14

Views

How to implement continuous delivery on a platform consisting of multiple applications which all depends on one database and each other?

We are working on old project which consists of multiple applications which all use the same database and strongly depend on each other. Because of the size of the project, we can't refactor the code so they all use the API as a single database source. The platform contains the following application...
Roberto Geuke
1

votes
1

answer
846

Views

Net core MVC clean architecture without repository pattern

I'm trying to create a MVC application in net core 2.1 using the eshoponweb example application. Ive read that in entity Framework core there's no great benefit of putting a repository layer in and to just use the ef dbcontext directly. How would I do this in a clean architecture scenerio. In the ex...
JimmyShoe
1

votes
1

answer
102

Views

About data hazard and forwarding with beq in MIPS?

Why the first add needs forwarding? # stage: add $1, $2, $3 # WB add $4, $5, $6 # MEM nop # EX beq $1, $4, target # ID Since beq needs the $1, if the first add is about to execute WB-stage, isn't that no forwarding needed since beq at ID-stage, which is about to read the r...
BinaryTreeee
1

votes
1

answer
96

Views

What would be the best way to format JSON data consumed by a SPA?

I'm working with a friend on a single page application (in React, but I believe that the framework doesn't really matter, the same question applies to Angular as well). There is a database with 2 tables: Feature Car Both tables are connected in the database with many-to-many relation. We differ in...
Patryk
1

votes
1

answer
50

Views

DDD Microservices

I've been researching DDD pattern for a few weeks ago and I got no answer for a question. Following Eric Evans principles, the Domain module should have no dependencies with other modules, packages or anything. And here should be included all the models such as errors, entities, interfaces... My que...
Cristian Batista
1

votes
2

answer
29

Views

What are the pros n cons of Multicore Processors and Multithreaded Processors (SMT) [closed]

With SMT parts of the one processor are shared between threads, while other parts are duplicated between them On the other hand, multi-core processors embed two or more independent execution cores into a single processor package. My question: What are the Pros n Cons of each architecture's in differ...
Zinedin Zidane
1

votes
1

answer
892

Views

About android architecture?

Anybody can explain to me about this diagram How can Android application which run on Dalvik call a native lib from VM?
asedra_le
1

votes
3

answer
8.8k

Views

Designig an ERP system [closed]

I am providing a top level technical design of an ERP system. I have come up with an draft , but would need help to decide if I am on the right track. I am taking baby steps, so I am concentrating on the HR module, as we all are familiar with it. An HR module mainly has Payroll, Leave, Appraisal, Em...
Sujay Ghosh
3

votes
1

answer
105

Views

How to manage unicity in my buisness logic layer?

In a aspnetcore mvc executing context . I have this simple entity. public class Foo { public int Id { get; private set; } public string Name{ get; private set; } public string Code { get; private set; } private Foo() { } public Foo(string Name, string Code) { GuardClauses.IsNullOrWhiteSpace(Name,nam...
Christophe Debove
2

votes
2

answer
101

Views

Recipe Database Design

I am trying to create a database to store my recipes. However, I am not sure how to implement it. I looked at other questions like this but they do not have the same focus as I. I assume any dish is actually just an ingredient, which can then be used in other dishes, or in this case in other ingredi...
Halhex
1

votes
0

answer
65

Views

MIPS memory model: Compiling software to run in KSEG0 or KSEG1

In the MIPS memory model both KSEG0 and KSEG1 map to the same physical addresses but KSEG1 is uncached while KSEG0 is cached. The argument for this is that you can dynamically decide to run code either Cached or Uncached. My question is: how do you actually compile code which runs in either virtual...
FourierFlux
1

votes
0

answer
379

Views

function to perform swapping in an array

The basic flow of the program is as follows: 1. Print the original content of array. 2. Ask the user for two indices X and Y. 3. Swap the two elements if Array[X] > Array[Y]. 4. Print the modified array only if swapping occurs. .data array: .word 8, 2, 1, 6, 9, 7, 3, 5, 0, 4 newl: .ascii...
greenland
1

votes
1

answer
118

Views

should backend handle email verification request?

I am creating a web app and need to send an email verification to users after they registered in the system. When the user receives a verification email, they need to click on the link in that email to verify their email address. My question is whether the link points to my backend server or to my f...
Zhao Yi
1

votes
1

answer
57

Views

Is it better to wrap chain of responsibility functionality than have it directly in a class?

I have been focusing on learning programming principles and patterns but the chain of responsibility examples I have found all seem to contradict other principles/patterns. The placement of sethandler and nexthandler directly in a class that will do more than just that seems like a really really bad...
Dusky Pixel
1

votes
0

answer
337

Views

View not updating after first time triggering LiveData when using background job in Android

I'm building a debt application in Android using Dagger 2, Room and MVVM. My problem lies with the reactivity of my main view, where a list of debts are shown and you can tick them off. When this activity is launched all the debts are loaded correctly, however when I insert a new debt the view is no...
César Alberca
1

votes
1

answer
66

Views

IoT Big Data design on AWS

I'm trying to design a big IoT solution of millions of devices starting from zero. That's why I need a highly scalable platform like AWS. My devices are going to report data using AWS IoT, and that's the only thing I've really decided. I need to store a lot of data like a temperature measure every 1...
HdAlabama
1

votes
1

answer
104

Views

What mime type should be used for squashfs files?

In my API, I need to provide a file/directory resource (call it a thing) in different formats including a tar.gz and as a squashfs file. I have been looking at the 'official' mime types and it looks like application/x-compressed-tar is appropriate for a thing.tar.gz file. But what about if thing is...
Randy
1

votes
0

answer
146

Views

Insert data into external source/DB while using Android Architecture Components and Room

All I read about Android Architecture Components with Room and a Single Point of Truth is about caching data in the local DB by using Room. I've crawled through countless repos but none seem to come close to solving my problem: 'Pushing data to an external source while making use of ARCH and Room' W...
SubChord
1

votes
0

answer
203

Views

How can I update Reyclerview after async-call with ViewModel

I use Android Architecture Components(LiveData + ViewModel, MVVM). I have a list of items as news feed, which I represent over recyclerview. The user can like an item on this feed, and then after retrofit success, this certain item should be then updated (count of likes & viewclicks are observable-f...
BestPractice2Go
1

votes
0

answer
887

Views

Paging Library - DataSource didn't invalidate itself after BoundaryCallback called

In the given PagingWithNetworkSample ,: @Query('SELECT * FROM posts WHERE subreddit = :subreddit ORDER BY indexInResponse ASC') fun postsBySubreddit(subreddit : String) : DataSource.Factory Here they use LimitOffsetDataSource extends TiledDataSource as provider, it will invalidate when the specific...
Sinyuk
1

votes
0

answer
22

Views

Using Service to broadcast to Controllers or 2 way bind to Service from Controllers

I have an architecture question. Let's say I have a notifications list that will be interacted with by many different type of controllers. I know of 2 ways to do it, but can't seem to decide: service('Notifications', function(){ var self = this; self.notificaitons = []; self.getNotificaitons(){ ......
Nazariy1995
1

votes
0

answer
113

Views

Breakup of MEM_LOAD_UOPS_RETIRED.L3_MISS event in Intel Broadwell-EP

I am trying to compare the coherence and DRAM access cost for an application. For this, I am thinking of measuring L3_MISS (specifically MEM_LOAD_UOPS_RETIRED.L3_MISS) events and compare it to HITM events (specifically MEM_LOAD_UOPS_L3_HIT_RETIRED.XSNP_HITM and MEM_LOAD_UOPS_L3_MISS_RETIRED.REMOTE_...
YetAnotherPseudoName
1

votes
1

answer
19

Views

Where to keep and how to propagate in memory data in iOS project using VIPER pattern?

I have a flow in my project where I have different screens to edit different parts of an entity, that is created only in the end of this flow. How do I organize the code in VIPER in this scenario? Example: I want to create a Test entity. It has a Title and Description, questions and some auxiliar te...
GustavoAzOl
1

votes
0

answer
82

Views

MIPS assembly - subroutines and functions inquiry

I'm fairly new at this type of 'programming' so I've encountered some problems while creating a program. The program that I'm trying to create accepts two integers, n and r. If n is equal to r, OR r is equal to 0, the value of the output is 1. Otherwise, it will implement an f(n-1,r) + f(n-1,r-1) fu...
Kim Chaeyoung
1

votes
0

answer
211

Views

How to select model with its 1:1 relation with ROOM?

Let's assume the following simple schema: Item | item_id, category_id, name Category | category_id, name With room, it could be described with the following entities. @Entity(tableName = 'item', foreignKeys = {/* fk to category */}) public class Item { @PrimaryKey @ColumnInfo(name = 'item_id') publi...
ddinchev
1

votes
0

answer
85

Views

Finding CPU Platform Name and Family

I’ve been Googling all morning trying to find a way to use VB.Net code to find the platform and family of my CPU. For instance: Intel Xeon (Haswell) OR Intel Xeon (Sandy Bridge) I have a program I’ve been working on that has several different versions specifically optimized for certain CPU plat...
user854695
1

votes
1

answer
116

Views

Page table size, virtual memory size and physical memory size

The memory architecture of a machine has: +-----------------------+-------+ | Virtual address: | 48-bit| | Page size | 8 KB | | Page table entry size | 32 bit| +-----------------------+-------+ Let's pretend that 4 bits from page table entry are used by OS to determine the access r...
greenland
1

votes
0

answer
81

Views

The implementation of a ContentProvider just feels wrong

A bit of history: I used to code on main frames with COBOL back in the 90s when top down programming was all that was needed. I then lived through 2-tier, 3-tier and n-tier programming, so I understand abstracting the UI layer from the data layer, but the use of a content provider seems very restric...
Aaron Bar
1

votes
1

answer
30

Views

Rails architecture account has many accounts

I need to implement following architecture for forex trading(pamm accounts) where account(pamm account) has many accounts(other trading accounts) I think i need to add new entity for compose accounts. am i right? something like this? class Investment < ActiveRecord has_and_belongs_to_many :accounts...
sibukejo
1

votes
0

answer
107

Views

Strategy Pattern with versions - UML Design

Currently I'm working on a webshop implementation in PHP (Aimeos, Laravel). I've arrived at the point where I need to create an import script. I started designing the UML class diagram and now I'm a bit stuck. The import script that will be running will have a lot of possible implementations. There...
qvotaxon
1

votes
1

answer
319

Views

Missing callback to view with pagination?

I'm attempting to get pagination up and workning with Google's new library, but seeing some odd behavior. I'm not sure where I am going wrong. I'm followig MVP and also using some dagger injection for testability. In the view: val adapter = ItemsAdapter() viewModel.getItems(itemCategoryId, keywords...
isuPatches
1

votes
0

answer
47

Views

Building architecture on top of abstraction

I am developing a .NET Core Web API project and experiencing the following issue: I have a simple domain of one base class and three derived classes. For simplicity let me name them in the following manner - Design1, Design2, Design3 and the abstract class Design public abstract class Design { } pub...
Georgi Karavasilev
1

votes
2

answer
221

Views

Multi chatbot architecture

I am thinking to build a multichatbot architecture but I don't know what is the best. I have like 10 chatbots specialized in many fields (customers with phone problems, sellers, help with this or that product, etc...) and potentially 30 more. What is the best design to go with to centralize all of t...
lrosique
1

votes
0

answer
40

Views

AngularJS module architecture - in the middle of two approaches

I went deep into investigating of modern approaches and stuck with a problem. One approach is to split application modules depending on purpose: angular.module('controllers', []) angular.module('directives', []) angular.module('services', []) Another approach is to split modules by feature angular.m...
Lunin Roman

View additional questions