Questions tagged [redundancy]

Redundancy is the duplication of critical components or functions of a system with the intention of increasing reliability of the system, usually in the case of a backup or fail-safe.

461 questions
9
votes
1 answer

How to use fastcgi_next_upstream in Nginx

I'd like to have 1 web server (nginx) and 2 FastCGI instances of the same application as back-end. The idea is to forward requests to second one if the first one is down. Apparently, I need to use upstream and fastcgi_next_upstream. But I could not…
Julien
  • 5,729
  • 4
  • 37
  • 60
9
votes
3 answers

Geo Redundancy in Azure Service Fabric Applications

I'm trying to come up with a solution for achieving Geo-Redundancy (2+ datacentres) while using Service Fabric reliable Actors/Services to manage state. It insinuates here that geo replication is possible This may happen when, for example, if you…
9
votes
4 answers

programmatically optimizing expressions (by removing redundant computations)

I had a pretty big equation that I needed to use to solve for a given variable. So I used an online tool that was capable of rewriting an equation in terms of a given variable. It gave me some huge 700 character equation. I tested it, and it does…
Ponkadoodle
  • 5,777
  • 5
  • 38
  • 62
9
votes
1 answer

Generalizing these lines of code?

While programming, I ran into a wall with some code. It looks like this: And that's the problem. I took a pretty screenshot to reduce my guilt. The pretty colors do not make up for the lack of maintainability. I have close to no idea how to…
user123
  • 8,970
  • 2
  • 31
  • 52
9
votes
9 answers

How can I reduce the redundancies in my jQuery code?

The size of my JavaScript file is getting out of hand because I have hundreds of links, and each one has its own jQuery function even though they all peform basically the same task. Here's a short excerpt: $("#link1").click(function () { …
ipso facto
  • 447
  • 2
  • 7
  • 11
8
votes
3 answers

How to apply different layouts to the same target in NLog?

NLog allows me to use SplitGroup to log my messages to several targets. I'd like to use this feature to log each message to a common, user-specific and date-specific logs at once:
Dan Abramov
  • 264,556
  • 84
  • 409
  • 511
8
votes
1 answer

How to make my Java application scalable and fault tolerant?

In a simplified manner my Java application can be described as follows: It is a web application running on a Tomcat server with a SOAP interface. The application uses JPA/Hibernate to store data in a MySQL database. The data stored consists of list…
asmaier
  • 11,132
  • 11
  • 76
  • 103
8
votes
1 answer

Elasticsearch deployment in a 2 server load balanced node js application setting

I have the following production setup for my Node JS application: I am now going to integrate Elasticsearch in this setup. My question is regarding the best practices for deploying Elasticsearch in a production environment. All my instances are…
Axelfran
  • 964
  • 1
  • 7
  • 17
7
votes
2 answers

cppcheck thinks I have "Redundant code: Found a statement that begins with numeric constant"

Cppcheck (version 1.46.1) gives the following warning for an enum like this one: enum DATABASE_TYPE { DATABASE_TYPE_UNKNOWN = -1, // <- line of warning DATABASE_TYPE_ORACLE, DATABASE_TYPE_MSACCESS }; Redundant code: Found a statement…
foraidt
  • 5,519
  • 5
  • 52
  • 80
7
votes
9 answers

Do you put a super() call a the beginning of your constructors?

This is a question about coding style and recommended practices: As explained in the answers to the question unnecessary to put super() in constructor?, if you write a constructor for a class that is supposed to use the default (no-arg) constructor…
sleske
  • 81,358
  • 34
  • 189
  • 227
7
votes
1 answer

JQuery : Event on click or keydown without redundancies?

What is the best way to do the same action if either a key press or a click is registered ? I would like to avoid having redundancies and make the code shorter. Thank you
halpsb
  • 1,106
  • 2
  • 18
  • 28
6
votes
5 answers

Database replication for redundancy using a free database and a Java with Spring & Hibernate web application

I have this in mind: On each server: (they all are set up identically) A free database like MySQL or PostgreSQL. Tomcat 6.x for hosting Servlet based Java applications Hibernate 3.x as the ORM tool Spring 2.5 for the business layer Wicket 1.3.2 for…
user14070
6
votes
3 answers

Avoid Redundancy in Python

I recently started using Python 2.6 for Ubuntu Server admin and have two minor issues concerning redundancy: First thing are imports: They all look something like import Class from Class from class import Class And the second thing are __init__…
Jasper
  • 1,971
  • 19
  • 34
6
votes
3 answers

How to manage version history for Many-To-Many relationship using deltas in Hibernate?

We are working on a system where a person can send a document to another person, a document can have multiple attachments, as given below. Document { Set attachments; } If X sends a document (Doc1,Ver1) to Y and Y edits the…
6
votes
10 answers

How to use code from one class in another? (Java)

I'm making a tank game and to avoid redundancy I'm making classes to extend. My MenuPanel looks like this atm (I've only written the code that matters for the question) (knop = dutch for button) public class MenuPanel extends JPanel implements…
Lola
  • 179
  • 8
1
2
3
30 31