Questions tagged [architecture]

10241 questions
1

votes
1

answer
153

Views

Why is there no serving layer for the speed layer in the lambda architecture?

Nathan Marz uses the following picture for explaining the lambda architecture Lambda Architecture Visualization by Marz However, on the internet I often find the following architecture, in which the serving layer is not only the next step after the batch layer, but also the streaming layer, i.e. DZo...
Franz
1

votes
0

answer
13

Views

Questions about the responsbilities of each component in Android Architecture Components

I've been using MVP for a long time now and I'm starting to transfer to a hybrid state between MVP and MVVM In detail my apps will go like this: Each Activity has a 0 to x Fragments that represent its views Each Fragment will request the Activity's ViewModel so that they can retrieve data using Live...
Cruces
1

votes
0

answer
6

Views

When KOIN graph reassembling, delegate function viewmodel() not refreshing viewmodel instance

we are using in our project KOIN like DI library. I have some case, when ViewModel instance not refreshing when Koin context is killing and recreating again. We need to implement feature like 'reassembling dependency graph in runtime', and this issue very critical for us. I have ViewModel module...
Scrobot
1

votes
0

answer
49

Views

Best way to deal with component terminating intents in MVI

I´m a huge fan of the MVI pattern, that I have recently implemented in one of my android projects, using mosby. There is one problem I haven´t figured out so far how the best way would be to deal with it. It is about finishing intents, eg. a 'save and finish activity/fragment' intent, that would b...
Lemao1981
1

votes
1

answer
95

Views

How can I decouple my models when I'm using Room

To preface this, I'm fairly new to Android development and I'm currently trying to learn by building an app while following Clean Architecture. I currently have a model called 'Card' and the Room library for storing all 'Card' data. However, the only way I've found to implement the Room library in m...
boiledbuns
1

votes
1

answer
2.1k

Views

Filtering RecyclerView's list with LiveData content using SearchView

I've created RecyclerView which contains simple list of words (String names of GroupVc objects). As list can be very long I want to make it filterable with SearchView in Toolbar. Architecture of my application is based on Android Architecture Components, where all GroupVc objects exist in Room datab...
LA_Homie
1

votes
0

answer
178

Views

How to organize architecture of displaying two different Fragments in activity?

I have some sort of architecture issue: I have Activity in which I need to show one of 3 views (one view at one moment in time): 1. One view with stable AppBarLayout + another part of the screen is NestedScrollView that needs to be in separate fragment. 2. One view with stable AppBarLayout + another...
yozhik
1

votes
0

answer
22

Views

Detect 32 or 64 bits architecture from .exe file programmatically on Windows and C++

Does anyone know how to find out what is the processor architecture (x86 or x64) of .exe file programmatically without executing it? I have been trying to find a way and the only way i can find is running it and analyzing it at runtime but i need to know the architecture prior to running it, is it p...
user1428926
1

votes
1

answer
143

Views

Updating object properties returned by LiveData

I have a question around the best practice for updating object properties of an object fetched from Room by LiveData. Currently when my observer is triggered in my activity, I take the returned object and pass it back to the view-model to keep a reference and then update the properties through the s...
d199224
1

votes
1

answer
54

Views

How can I have 2 users logged in at the same time in a Laravel App

Please help me architect the following case in Laravel: Every instance of the Laravel app (ex. a company) will have a single username (super-user) who can control the sub-users. The super-user will log into the app once to allow the sub-users to log in and out many times throughout the day. The sub...
Kazi
1

votes
0

answer
106

Views

Microsoft.Owin.Host.SystemWeb with bootstrapper project throwing error

Since I was trying to learn Onion Architecture, I faced an error at bootstraper project (Class Library Project) which includes IOC Configuration and a startup class. Boostrapper Startup class fired when i uninstall Microsoft.Owin.Host.SystemWeb. But When i install this package App throws For the app...
Deepak Raj
1

votes
0

answer
86

Views

LRU Clock Replace Algorithm - What are reference bits initialized to?

Suppose I have a 2 entry TLB and am using LRU Clock replacement. Further suppose that I have a TLB miss and its a page fault, so I load in a page into memory and update TLB, now my TLB has 1 entry. Next, I have another TLB miss and its a page fault, so I load in a page into memory and update TLB now...
Harman Tatla
1

votes
1

answer
36

Views

What is a correct RESTful service response to a PUT request on successful update?

What is a correct RESTful service response to a PUT request on successful update? There are two possible responses that seem to comply with REST architectural style: Return only a header without body with the status 204. Header: content-type: application/json; charset=utf-8 status: 204 No Content ra...
Pavel
1

votes
0

answer
52

Views

downloading 32-bit vs 64-bit software

I have done a course that touches computer architecture a little bit, so I have a basic understanding of difference between 32 bit and 64 bit machine. What I don't understand is, why users sometimes are asked to download a correct version (32 bit or 64 bit) software? isn't that JVM (if the software...
amjad
1

votes
0

answer
106

Views

Android Room - Relationship With Constraints

I have the following relations setup in a database I would like to select every user that has at least one time for a particular job, with that time. We are using the Android Room sqlite wrapper. What I have tried so far @Query('SELECT * FROM users INNER JOIN times ON times.userId = users.id WHERE (...
Josh
1

votes
2

answer
70

Views

Java web Restful client don't work

errors appear in the java web client, but I do not understand the reason why those errors appear. the the rest resource on the server project package model.rest; import javax.ejb.Stateless; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; @Stateless @Path('/factorial')...
Ives Rodriguez
1

votes
1

answer
174

Views

Pass object via parcelable or load from DB [duplicate]

This question already has an answer here: Is it more efficient to pass large parcelable or pass id and query db? 1 answer I am practicing the MVVM model along with the Room and LiveData libraries. One implementation question bothers me is while I starting a new activity (for example, product list...
Liam.L
1

votes
1

answer
56

Views

Laravel: Controller send to C

I'm not that experimented in software architecture, so sorry in advance if my question seems strange or simply dumb. (Or if it is the wrong forum ...) We have a webserver working great with the Laravel framework but we will need to proceed to advanced mathematics functions. We also have a program wr...
Raccoon
1

votes
0

answer
80

Views

java web Restful HTTP 404 Not Found

the java web client. this is index.jsp Calcular factorial Numero : Resultado: this is the Calcular.java package controlador; import Webservicce.ClientRest; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; impor...
Ives Rodriguez
1

votes
2

answer
29

Views

Action in a REST API

The web service for my app is an Express server that I'm trying to keep as RESTful as possible. I have a /timesheets route. Here a GET request obviously fetches a list of timesheets. Also, POST naturally creates a timesheet. I need to, however, send an instruction to my web service to 'sign off' on...
Ed Colyer
1

votes
0

answer
30

Views

How to trigger an event in an EventListener?

I'm writing a PHP application and want to implement the Mediator pattern for the core part of my business logic. This 'core' is actually some kind of game with a lot of events and statuses. So the event driven handling of it seems to be the optimal approach. The mediator pattern itself is no problem...
automatix
1

votes
1

answer
148

Views

Had anyone success with using Room over multi-module Kotlin setup?

Had anyone success with using Room over Android multi-module Kotlin setup. @Entity data class School(@Embedded val student: Student) data class Student(val age: Int = 0) Whenever I have both above classes in main module everything compiles properly. But if I move the Student class to another android...
user2422047
1

votes
0

answer
37

Views

how does a modulus allow a negative number to be encoded

if x represents the value to be encoded and y is the number of decimal places to encode a decimal integer_to_big_endian(x * 10**y) % 2**64 how would the modulus ensure that negative numbers can also be encoded? Wouldn't a % of anything bigger than 2**64 give a remainder So I'm guessing if x * 10 **...
jim li
1

votes
1

answer
90

Views

MPICH2 on a machine with two NUMA nodes

I am new to MPI. I am using MPICH2 on a Linux machine with the following information: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 40 On-line CPU(s) list: 0-39 Thread(s) per core: 2 Core(s) per socket: 10 Sock...
Jian Zhou
1

votes
0

answer
241

Views

Authorisation layer for multi-tenant express applications

I've an express API application. The app's structure is as follows :- Models :- Company.js User.js Controllers :- companies.js users.js authentication.js Services :- passport.js authorisation.js Routers :- companies.js users.js My User model has a column called role which can be either of the follow...
Ashish Pandey
1

votes
1

answer
24

Views

How should I handle failure between API calls

I have encounter a problem where a action can be done through either a sequence of existing Http requests like the following: api1() -> api2() -> api3() Or I will have to create a new API that does it at once so its something like: apiNew() { api1(); api2(); api3(); } Then I will just send request t...
Chen
1

votes
1

answer
462

Views

Android ViewModel onChanged called when data isn't changed

I have a Fragment, with a dynamic number of a custom views, consisting in an EditText and a Button. What I do is that every time the user types a price in the EditText and clicks the Button, I make an API request through a ViewModel, and my Fragment observes the LiveData in the ViewModel. So far so...
noloman
1

votes
1

answer
23

Views

REST api desing. Retrieving and saving child records

I am designing a rest api and I have some doubts about exposing and consuming children from relation. Assuming I have an entity A with a one to many relation to entity B (so A can have some Bs attached) and I design an endpoint to create entity A and DTO for entity A includes a list for entity B and...
Strk89
1

votes
1

answer
609

Views

MIPS pipeline registers length (IF/ID, ID/EX, EX/MEM, MEM/WB)

I am currently studying for my Computer Architecture exam and came across a question that asks to illustrate (bit by bit i would assume) the values contained in the mips pipeline architecture after the 3rd stage of the sub (before the clock commutes) given the following instructions. add $t0,$t1,$t2...
1

votes
0

answer
46

Views

Why is convention-based routing less efficient in RESTful API URI patterns?

My question is about why convention-based routing is less efficient in RESTful API URI patterns
Rock Shan
1

votes
1

answer
39

Views

SaaS Architecture - Data Contamination

Working with a startup in the home improvement industry. Its a SaaS model - multi-tenant system. Each account is uniquely identified and all customers, projects, and other data are identified using the unique account number. We are using a MVC framework and the queries use the session of the acco...
Sam Winston
1

votes
0

answer
28

Views

Why is my [Op.or] only partially working?

I am trying to write an endpoint for searching for a user with a username or id that matches the passed string. Below is the current code I have set up for an endpoint on localhost at .../api/users/:search. //GET user by id or password router.get('/:search', (req, res, next) => { User.findOne({ wher...
Andres Rosales
1

votes
1

answer
708

Views

Mongoose 5.0.15 / MongoDB 3.6.4 Cast to Array Failed for value [NaN, NaN]

Context This is not a duplicate of this As explained in detail below I scoured the web and read about 20 similar bugs or articles and nothing out there has solved this issue, as yet. I am developing a location-based application in two different OS, Windows 8.1 and Linux/Ubuntu (16.4) The following...
rags2riches
1

votes
0

answer
54

Views

The Necessity of Descriptors for RestfulAPI

I was searching the Restful API versions, and I finally know the basic differences between v1 and v2. v1 supports only XML descriptors while v2 supports JSON descriptors. Then, I researched descriptors and I realised that they look like UML Class Diagrams. But I didn't understand this: Do we have t...
uerden
1

votes
0

answer
219

Views

How to authenticate one microservice into another(spring cloud)

I am learning microservice architecture and currently I have following architecture: User can access as hello-service as hello-world-service. It is clear for me how to implement user authorization using oauth2. For achieve it I use oauth2 (spring-security-oauth2). But it is not clear for me how to...
gstackoverflow
1

votes
0

answer
722

Views

Android Room multiple embedded fields of same type

Let's suppose I have the below model: @Entity public class Session { @Embedded Student student; @Embedded Tutor tutor; String location; Long timestamp; } public class student { Person person; double rating; } public class Tutor { Person person; double rating; double hourlyRate; } public class Person...
PampaZiya
1

votes
0

answer
94

Views

Spoof Chrome & Mozilla from getting my actual screen resolution

How do can i send different info from my original ones? I would like to change the monitor resolution only for the browsers, and if its possible and the fps too. I don't want to do the developer tool of browsers, i need to change something at my computer so the browser took that info and show it. I...
spplakas620
1

votes
0

answer
397

Views

Android paging library retry loadRange() or loadAfter()

I am trying to implement the new paging library from android architecture components. Basic functions are working fine but I need to add a retry function for loadRange() or loadAfter(). I need to retry these in case a network error occurs or if the device is offline. I already tried dataSource.inval...
1

votes
0

answer
51

Views

Which is the best development/production environment for Django projects?

A bit of background I work for a little company as Django developer. The previous developer left the company and I am the only developer (that is the reason they were looking for a Django developer). The company has a simple web application that needs to be mantained and scaled. It seems that the co...
oz19
1

votes
0

answer
29

Views

How to bind adapter list item view with boolean in service

I have a recyclerAdapter with multiple view types, in one row I have a button which starts a service and I replace the button by a spinning wheel when the service starts. The service sends a broadcast when it starts and stops so I can update the list row. Is there a way to use architecture component...
David

View additional questions