Stack Exchange Network

Stack Exchange network consists of 175 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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [design]

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

5
votes
0answers
182 views

Finger Paint path gets huge over time and slows the app

So I am writing a Finger paint app. I have multiple color which user can select. I save the path and paint information inside an array. ArrayList<PaintPath> arrayPaintPath = new ArrayList<...
4
votes
0answers
146 views

Implementing new project to communicate with old ones. The correct way

I'm not sure if this is the right place to post this (I'm fairly new, but Stackoverflow and Superuser suggested this site for my question), but here goes. I currently have the following: A frontend -...
3
votes
0answers
156 views

How to avoid points of critical failure?

Background We have a ton of GPS devices in vehicles. These devices need to communicate with our system. To achieve this, we need to parse the device's messages before proceeding. The following ...
3
votes
0answers
45 views

Layer below Service and NetworkingManager to handle received data

I'm in the early stages of building a cryptocurrency tracking app for iOS and looking for a scalable design. My question specifically relates to the element of the app which retrieves data from an API ...
3
votes
0answers
113 views

How do large scale permission systems work with membership expansion?

Let's say you have a permission system with which you can specify things like: user U is a member of group A, which is a subgroup of group B, which is a subgroup of group C, and all members of group C ...
3
votes
0answers
228 views

Submitting to a leaky-bucket service: Keep track of bucket level myself or use quota data in response

I'm designing software that will connect to a remote service and send it requests from a local application. This remote service implements a leaky-bucket algorithm to determine whether to process the ...
3
votes
0answers
195 views

Redis set of sets - Is there a better Design?

I have a telegram bot that alerts whenever a price of certain asset reach a certain price. I have the following table in a DB: AlertId ChatId Price Asset So each Asset will have several ChatId (...
3
votes
0answers
530 views

Symfony2 - Best aproach for a plugin system

Symfony2 is handling all its things in bundles in /app or in /vendor. This is fine if you are handling and managing all by yourself or Ops that handle all needed things. But I haven't found a good ...
3
votes
0answers
313 views

How do I design concurrent scalable system with guaranteed ordering? How about Akka?

I have designed a simple PoC system that processes a feed of prices that tick. It consumes a stream of "Ticker, Price" objects off JMS and updates a map, so that the map simply contains the latest ...
3
votes
0answers
554 views

The Python module-as-singleton hack

I've seen (and once used) this idiom a few times in Python: # At the end of a module: if __name__ == '__main__': main() # or whatever your entry point looks like, this line isn't important else: ...
2
votes
0answers
126 views

How should a non-React component subscribe and respond to Redux state changes?

I’m new to React/Redux tools and still figuring out some idiomatic design patterns. Here's a scenario: A user adding a place marker 📍 (that has some associated metadata) to an interactive map (...
2
votes
0answers
131 views

Is this an example of cyclic dependency?

I'm an undergraduate student and I have this assignment on a Discrete Event simulator. Currently I have completed to the end of v1.2 here. Attached also, is an algorithmic overview. I have wrote my ...
2
votes
0answers
66 views

Is there a recommended design/architecture when developing a JavaScript module?

Practicing some of the ES7 features, I started developing a class to perform some actions on the DOM and use the new features. I used Babel to make it work on the browser, and the code looks something ...
2
votes
0answers
29 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, ...
2
votes
0answers
64 views

Memento and releasing resources

Let's suppose we have a class whose state has to be saved and later restored, and we resorted to the Memento pattern for that. What if the state includes resources that have to be explicitly ...
2
votes
0answers
52 views

Designing a test system on server/message level for large legacy application

I am working on introducing tests to an old system. Because of the amound of technical debt, we have landed on component/interface testing. The system is a servies of servers which sends messages in ...
2
votes
0answers
60 views

Best design pattern/approach for a Factory which needs multiple types of input

I want to develop a Factory of INotifications. public interface INotification { string Text { get; } string UserId { get; } NotificationType NotificationType { get; } } The problem is, ...
2
votes
0answers
110 views

Should I build a custom text editor from scratch or enhance existing ones?

I'm developing a Windows WPF app that needs to edit a certain type of document and I need a highly customized editor to do so: The text is a transcription of an audio feed, and I need to sync the the ...
2
votes
0answers
89 views

What are good ways to represent “requirements” and “cannot-have” connections?

In the context of creating an ecosystem, the graph below reveals information about it's behavior. Dot : A node with the entity's name. There's a tree, grass, a fern, etc. Blue arrow : A requirement. ...
2
votes
0answers
233 views

When designing an activity-based authorization system, how should additional conditional checks be handled?

When designing an activity-based authorization system, how should additional conditional checks be handled? For example, I have the following authority: VIEW_COMPANY_TRANSACTIONS which allows the ...
2
votes
0answers
62 views

Sharing tasks among parallel independent jobs

I am getting files on HDFS and I have a legacy java app which checks for new files every 15 mins, does some transformations and write them to some remote server. Now, I am facing scaling issue with ...
2
votes
0answers
215 views

Designing clickstream analysis?

I have a application where user purchases/click the certain products. I need to design the click stream analysis here which product got clicked how many number of time, user/geographical detail click ...
2
votes
0answers
54 views

Handling frequent simultaneous updates in real time

I have seen similar questions and answers here but my situation is a bit different from those. I am building an application which gives users infinite canvas space to draw something. The canvas space ...
2
votes
0answers
158 views

Design Pattern for Internal Builder

There is an object which is very complicated to build and many algorithms needed to figure out how it should be created (for your curiosity it is an object that represents and draws the beaming of ...
2
votes
0answers
585 views

Web application logging strategy

Basically: I am creating an enterprise web application. I would like to do extensive logging of both client and server activity, with all logs ultimately stored on the server. I have found many ...
2
votes
0answers
826 views

How should I store user activities in ElasticSearch and figure out popular searches?

I've got java logging user activities to Fluentd, Fluentd is then writing these activities into an elasticsearch index. Every user activity is recorded, some include: User1 follows user2 User1 likes ...
2
votes
0answers
322 views

Understand the service term in DDD and matching class diagram

I m trying to learn how to make my code better. This way, I try to learn some books and understand them. I m having some troubles dealing with Domain Objects. From the first year of my IT school, I'...
2
votes
0answers
82 views

Architecture and implementation of a de-centralised web service

I'm a web programmer with several years of experience in RoR and node.js. I have a project idea that is quite big and I need some input in how it can be achieved. I heard of the Diaspora project, and ...
2
votes
0answers
627 views

How to model an Admin View on a ReST API

We have a more or less "typical" ReST API that allows clients to interact with a bunch of resources, let's say Maps and Devices. An authenticated client can get a list of maps, it can download a map, ...
2
votes
0answers
126 views

Should I strictly follow restful guidelines

I have the following resources in my Asp.net web API: route: consisting of the following relevant properties arrival_location_id leaving_location_id and location: id name coordinates The thing is,...
2
votes
0answers
61 views

Most efficient way of allocating participants to conference tracks

I am redesigning a system by which conference participants can choose which track they want to attend. Participants express their track preferences arranging them in order and submitting them at a ...
2
votes
0answers
362 views

What are the benefits of an input/output component design?

For the company I work at, all of our projects, including a new one started last year, are written in C89. We write for vxWorks (a real time embedded operation system). Our software runs multi-...
2
votes
0answers
560 views

How to design microservices without leader election but job scheduling?

There is a microservices system that is currently using Zookeeper. Let's assume there is just one type of service A that exhibits a simple read of some value t. However, the one of existing A ...
2
votes
0answers
187 views

Data pipeline with fallbacks and callbacks

I'm refactoring our current design for how we download static data. It's a mess of deep class hierarchy and callback hell and I want to convert it to a more elegant straightforward design. Here are ...
2
votes
0answers
83 views

Designing a web based smart card publisher

I'm working on an application that's supposed to have a web based GUI where you can insert some data. That data will be saved in persistent storage and a hex number generated and stored alongside. ...
2
votes
0answers
65 views

Should my application call statsd directly or should I call statsd based off logs?

I'm planning on incrementing counters in statsd based of various events within my application. I have logging in place for these events. So, from my viewpoint I have two options: Update the ...
2
votes
0answers
1k views

Analysis of ways to control/refresh a directive with isolated scope from parent controller

I'm asking this question because there doesn't seem to be a "recommended" approach for this. If a page had a directive with isolated scope, and if the directive needs to update itself after an event ...
2
votes
0answers
940 views

Architecture design for Java servlet that triggers work (for sending push notifications)

I'm designing a push notification server (for pushing notification via APNS and Google servers) and have come up with the following design for a Java based web application server. I would really like ...
2
votes
0answers
162 views

Should I inject a data dependency into an Angular Directive?

I am currently implementing an AngularJS directive. It is fundamentally a reusable widget comprised of a select box and a table which populates based on the item in the select box. My point of ...
2
votes
0answers
471 views

How can I put multiple hierarchical forms in a single web page and avoid making it a mess?

We are a group of developers working on a web application that accepts forms filled and sent by our users and present it in an overall view. Our main form view looks like this: There are multiple ...
2
votes
0answers
376 views

JS closures - Passing a function to a child, how should the shared object be accessed

I have a design and am wondering what the appropriate way to access variables is. I'll demonstrate with this example since I can't seem to describe it better than the title. Term is an object ...
2
votes
0answers
81 views

Pattern for data types that are related yet fundamentally different in utility

Background I'm currently working on a codebase for what is to become a forthcoming website's content "engine", where it will take in different types of standardized data (implemented with XML), parse ...
2
votes
0answers
169 views

What are some important considerations when developing a DBaaS (DataBase as a Service)

I'm interested in creating a Database as a Service. I want users of the service to be able to do a few seemingly not very simple things. Sign up and be given access to a JSON datastore that they can ...
1
vote
0answers
48 views

Running medium duration critical distributed jobs every minute

I have the following requirement: There are about a 100 recurring jobs that needs to run every one minute. This job has an IO intensive phase, followed by a CPU intensive phase, followed again by ...
1
vote
0answers
31 views

How to manage cart details across various devices

Recently I was asked in a interview to implement to e-commerce site . One of the requirement was to maintain cart details across various devices .(i.e) if user adds a book from his iPhone , and when ...
1
vote
0answers
54 views

Third-party API wrapper in Java: how to design

Suppose, there's a site that provides an API, such as this: Users post questions, answers on that site You can make GET and POST calls There are two types of authentication: weak (only gives read ...
1
vote
0answers
49 views

How to solve circular dependency scenario while executing http calls which require authentication?

I am working on a project which requires me to execute standard HTTP calls with session tokens. I am building a custom HTTP client, with a custom authenticator, something like this: Client client = ...
1
vote
0answers
112 views

What are some examples of generality?

The cover of the book The Practice of Programming lists programming principles: Simplicity Clarity Generality Intuitively I understand generality as preferring to solve the general problem rather ...
1
vote
0answers
46 views

Strategies for dealing with Stale data and Fetching

I'm working with firestore and have encountered several situations where a document will contain stale data which is a duplicate of the source of truth located elsewhere in the database. For ...
1
vote
0answers
21 views

How to Implement Certain timeout session on multiple pages of a website - REACTJS

Suppose there 5 pages to a website. User flow will be 1->2->3->4->5->FINISH. I want to implement is that whenever a user enters page 3 a timer starts and if he doesn't finish a task ...