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

learn more… | top users | synonyms (1)

1
vote
1answer
25 views

Is it considered good practice to declare base interfaces as immutable, supplying an mutable sub-interface

I asked a question on StackOverflow on how to properly implement an ImmutableMap that abides by the SOLID principles. Due to Java's Map interface containing put and putAll, it violates the interface ...
2
votes
1answer
66 views

Should I consider uncertain future requirement while development? [duplicate]

I have one text box across multiple pages which is used to enter multiple customerids (as comma separated) . But in current page due to some subsequent implementation difficulties we make it as ...
1
vote
3answers
207 views

Object creation: when should I expose a factory vs wrapping class?

I am having some problems trying to figure out when to use a factory or to wrapper class. This question is slightly geared towards C# I guess, so I'm not sure if this is the correct place to ask. Say ...
-3
votes
0answers
35 views

Should I write the Server side program while creating a website? [on hold]

I want to create a website. I know html5 and css. I am still learning JavaScript. I found that these are used for client side, and now I have found that there is also server side which also needs ...
1
vote
1answer
285 views

MVC URL structure with URI parameters

When creating routes for your MVC web application I have seen two possible ways to pass variables to a controller method: With the first approach the variable is passed to a parameter of the ...
3
votes
2answers
144 views

Is embedding URLs as query parameters in URLs an acceptable REST API design pattern? [on hold]

We are designing some resource oriented web services. Service B needs to be able to make calls to Service A passing in a reference to a resource in service B that service A will use when formulating ...
-1
votes
0answers
61 views

When should inheritance NOT be used in a program design? [on hold]

I have read into the debate on if inheritance should be used often or not and have found a few good points, but could some one present a good example of when inheritance should not be used?
0
votes
0answers
55 views

Should a 12Factor App persist config in the DB?

The 12factor approach to config is The twelve-factor app stores config in environment variables...they are a language- and OS-agnostic standard. I've worked on many (rails) projects where ...
3
votes
3answers
227 views

Can a the kind of load Uber handles be served from just one server?

http://techcrunch.com/2013/12/04/leaked-uber-numbers-which-weve-confirmed-point-to-over-1b-gross-revenue-213m-revenue/ This article says that Uber does about 1M requests a week. Which is about 1.65 ...
1
vote
1answer
216 views

How to develop custom functions on top of Ejabberd? [on hold]

I'm developing a real time chat app. After searching around for a while, I found Ejabberd and Erlang is a good option. The question is the Ejabberd is not providing all the functions I need. I need ...
1
vote
3answers
74 views

Performing data operations that involve separate applications and data sources

I'm designing an enterprise application that produces output based on some input data from another application. In this case, I happen to have also built and thus do control the source application ...
4
votes
3answers
682 views

How to show someone of the power of model-view-controller design pattern?

I've been working with a friend on a project that we've taken over, and I've realized that we have a big problem implementing the model-view-controller design pattern due to the way that the project ...
8
votes
2answers
327 views

Should HTTP Request/Response objects be immutable?

I think it's safe to say that most web applications are based on the request/response paradigm. PHP has never had a formal abstraction of these objects. One group is trying to change this: ...
1
vote
3answers
45 views

Clarification on Acquire/Release Semantics in multithreaded programming

In an attempt to fundamentally understand any concept, I try to understand the meaning of the words within the context it is being used. Currently, I am trying to fundamentally understand the whole ...
13
votes
8answers
7k views

Feature vs. Function [closed]

Often I hear PMs (Project Managers) talk about feature and function. And I'm just so puzzled to differentiate them. Sometimes I think of a feature to be equivalent to a user story. Something like "As ...
1
vote
3answers
113 views

What is the best way to hold runtime arguments and use elsewhere in the application? [closed]

I have to design a java tool, which is intended to be called from shell scripts or batch scripts. The behavior of the tool is determined by a set of user defined parameters. This can vary from user to ...
0
votes
2answers
161 views

Storm topology to handle “dating website”-like workloads

suppose im writing a dating website, similar to okcupid. there are profiles, and i need to compute the (N^2) "match" table - given every 2 profiles whats the match between them? I was thinking this ...
-3
votes
1answer
75 views

Class refactoring [closed]

I have many rows in databases that are in fact classes, eg: 1-2 3-4 .. 10+ Something Now there are 2 options. One is to create class per table row (Something.class etc.), or to create single class ...
2
votes
4answers
223 views

Which design pattern for a single class accessing an object representing a data structure?

Which design pattern should I use when I have a class representing a data structure (aka C-style struct) and I wish to have only a single class to be able to access it. I was thinking of simply ...
1
vote
1answer
116 views

How to optimize the application with huge number of database requests per minute

I have to provide free demo of some service to end users in my application. Free demo could be of 30 mins, 1 hours, 5 hours etc. (predefined time) for a new user for one time only. User can also ...
1
vote
1answer
28 views

Synchronization of resource that has moved out of requests filter range

I have a RESTful API with corresponding clients. If a client request fetches a set of resources (Events) based on a filter, say events taking place between 2015-04-13 - 2015-04-19. If an event which ...
1
vote
2answers
113 views

Dependency injection vs dependency lookup in a layered architecture

Given a layered architecture, where the business logic is isolated in a package from all other layers, like persistent storage, user interface, interfaces for various (vendor) remote services, etc, I ...
3
votes
3answers
321 views

Best approach for tracking dependent state

Let's pretend I work on a project tracking application. The application is a database backed, server hosted, web application. In this application there are Projects which have many Activities which ...
1
vote
1answer
39 views

What's the best way to store class/type info in a plugin system in your software?

There are lots of applications like 3ds Max, Maya, etc that allows you to use plugins, where even the default nodes are created as plugins. This is all good but if the developer changes the ...
3
votes
1answer
66 views

Consistent snapshot

Suppose process A has a consitent snapshot of some entities. And it is constantly receiving updates for this enteties. Now client B connecting to A and it should receive the consistent snapshot of ...
-1
votes
1answer
55 views

Pathfinding in a 3d world with obstacles?

What are some methods for pathfinding in a 3d world? Object X needs to move from Point A to Point B but it might have to avoid things like asteroids, planets or gas pockets that makes the object ...
1
vote
1answer
52 views

Rich object model in the context of a good REST API and of an existing rich object model on the server-side

First off, let's frame this question in the context of a good REST API and an existing rich object model on the server-side, as well as modern web architecture (MVC frameworks like angularjs). I'm ...
0
votes
1answer
147 views

Full screen command line app that user cannot close in any way [closed]

All I'd like user to see is a "full screen" command line interface running my program. Users can enter certain input when prompted to, but they shouldn't be able under any circumstances to stop the ...
3
votes
0answers
106 views

Fine grained search over a large dataset

I have roughly 4 million records per day and have to keep 7 years worth online, so we are looking at 10.2 billion records that I need to be able to search through. The users are expecting that the ...
1
vote
1answer
146 views

MongoDB Embedded vs Reference Private info

I have searched extensively for a similar Mongo schema design and can't find relevant examples. I have a store (with public info), each store has an account (with private account info). // store ...
1
vote
2answers
493 views

Is there a better way to organize my module tests that avoids an explosion of new source files?

I've got a neat (so I thought) way of having each of my modules produce a unit-test executable if compiled with the -DTESTMODULE flag. This flag guards a main() function that can access all static ...
2
votes
1answer
86 views

Ambiguity of seemingly clear method names in APIs

(The question is language-agnostic, but to illustrate the point, I wrote the examples in C#.) Say I'm trying to model the behavior of "components" that communicate via "ports". I might model this ...
0
votes
0answers
88 views

Java server side : Is this a good design/layered approach? [closed]

We are in the process of designing an application using AngularJS, RESTful service (Jersey) and JPA for CRUD operations.The RESTful layer might call other external services to get data. There could be ...
1
vote
1answer
100 views

Does Go implicitly discourage getters and setters and encourage direct member access?

As the title says, is accessing public struct fields more idiomatic in Go than getters and setters? Wouldn't that lead to violation of data encapsulation, also public fields in other OO languages like ...
2
votes
2answers
163 views

Archive Without Adding Dependencies [closed]

We're going back and forth on this problem and I'd like to have oppinions: We have a library calculating stuff and some module with GUI logic using it. We want to add some kind of archiving to the ...
-1
votes
1answer
63 views

How to make variables inherent to an object or system

How can one make variables inherent to an object or system? For example, when creating a web browser, each option that is created for the user to have control over (i.e. how a window opens, if ...
2
votes
3answers
261 views

Repetitive code over multiple classes. Best way to centralize code?

I'm working with 3D arrays that I flatten into a 1D arrays with the following index calculation: index = x + WIDTH * (y + DEPTH * z) I'm starting to notice that I'm using the calculation all over ...
2
votes
1answer
93 views

Is it OK to deprecate methods that need to be public due to the packaging model but are not to be used outside the codebase in Java?

I am currently working on a semi-large project that has several packages. There are 3 main packages, a "client" package, a "server" package and a "common" package. There are two jars, one for the ...
0
votes
0answers
330 views

Online stores service design [duplicate]

I am designing an online store service app with rails. Everyone who wants to make his/her own store can do it with this app by just signing up and choosing a domain. I want to make it as SaaS as it ...
7
votes
6answers
475 views

Many small requests vs. few large requests (API Design)

I'm currently working on a project with an organization as follows: Client - Gets data from the main server via REST api. Server - Requests data from various other servers via third-party APIs ...
2
votes
2answers
176 views

Designing entities that should be mutable through the GUI but protected from programmer error

I have a set of entities, for now represented by very simple classes (further simplified for this example): public class Item { public string Name { get; private set; } public double ...
2
votes
2answers
68 views

Creating an auto-patching system for Spring Hibernate Application

I have this question for few months now. We have a web application which has monthly changes and weekly bug fixes if any. Usually we just build the new war, undeploy the old ones and redeploy new ...
4
votes
1answer
203 views

Would SQLite be less useful without accepting inserts of non-numeric values into numeric columns?

In SQLite the following statement would be successful and the string would be inserted/updated into the SALARY column which is of type INTEGER: update employee set salary='TOO MUCH' where emp_id=1; ...
3
votes
2answers
158 views

IoC invalidation

I have a bunch of services that get registered as singletons by my IoC container on startup, all of these services have a constructor which takes in a connection string which is used by the underlying ...
1
vote
1answer
970 views

Erlang chat app design?

I have a chat app made in node/socket.io. Scalability factors have made us choose Erlang/Ejabberd/xmpp and it will replace node/socket. I have a few questions: Currently using MySql for chat ...
5
votes
2answers
373 views

Why should ViewModel route actions to Controller when using the MVCVM pattern?

When reading examples across the Internet (including the MSDN reference) I have found that code examples are all doing the following type of thing: public class FooViewModel : BaseViewModel { ...
1
vote
1answer
46 views

Are Serverlet Containers' Characteristics Against Scalability and Fault-Tolerance of a Web Application?

We most likely deploy a JVM-based Web application (e.g., Scala) on a container (e.g., TOMCAT, Jetty, etc.). Does the following points about a serverlet container goes against us to create a scalable ...
0
votes
2answers
69 views

Content delivery design

I'm designing a system where users can access files stored in an external content storage service such as AWS's S3. Here's a simple diagram: ------ ------------ ----------------- | User ...
4
votes
1answer
110 views

Parking Simulation Software Design

I've been requested to develop a quite well known problem for a job interview. The Parking Simulation which an example can be found here. I came up with some ideas for which design pattern should I ...
3
votes
2answers
656 views

How is intermediate data organized in MapReduce?

From what I understand, each mapper outputs an intermediate file. The intermediate data (data contained in each intermediate file) is then sorted by key. Then, a reducer is assigned a key by the ...