views:

66

answers:

4

INFORMIX-SQL 7.32 (SE) Linux Pawnshop App.

I have some users who own several pawnshops within a 100-mile radius. Each pawnshop app runs with SE. The only functionality these owners need are: ability to remotely login to any store in order to view transactions, running totals and consolidate daily totals at end of business day. This can be accomplished with dialup modems, as the app doesnt have any need for displaying BLOB's. At end-of-day, each stores totals are unloaded to a flat file and transferred to the owner's system.

What would my owners gain by converting to distributed db's?.. ability to find out if a stores customer has conducted business in another store or if another store has a desired inventory item for sale? (not important, seldomly happens). Most customers will usually do business with the same store and if they dont have a desired item for sale, they will visit the closest competitors pawnshop. What gains would distributed db's offer to accomplish the same functionality as described in the first paragraph?.. Pawnshop owners absolutely refuse to connect their production systems via the internet! They dont trust its security, even using VPN, Cisco, etc, or its reliability! In this part of the world, ISP's have a bad track record for uptime. I know of several apps which have converted from web to dialup because of comm problems!

+2  A: 

Distributed DBs, more precisely Informix XPS and IDS, don't have just one advantage. If you care just about getting data from different places, you can accomplish it with just a design strategy. If you add a "branch_id", or something like that, you're done.

Distributed DBs have a lot of advantages, from availability to scalability. You must review all these things first.

Sorry for this kind of answer, but is really difficult to give you an straight answer about this topic.

santiagobasulto
@santiagobasulto: store_id is a column which has existed, for more than 20 years, in every table within my pawnshop app, and my users have been ETL'ng daily transactions and totals. Can anyone tell me what other advantages I would have with a distributed db design?
Frank Computer
Frank, i can just talk about Informix, is my only experience. First of all, the main advantage is in that field, you don't have to worry about the design any more. It's all transparent to you. Just the DBA knows that a table is fragmented in several Stores, all over the country. Other advantages? Distributed Querys, load balancing, avaiability, damage recovery, etc. (all the common stuff you find in wikipedia). So, the cuestion is: Are you ready to scale? Are you ready to spend the money needed?
santiagobasulto
+1  A: 

CouchDB is a peer based distributed database system. Any number of CouchDB hosts (servers and offline-clients) can have independent “replica copies” of the same database, where applications have full database interactivity (query, add, edit, delete). When back online or on a schedule, database changes are replicated bi-directionally.

CouchDB has built-in conflict detection and management and the replication process is incremental and fast, copying only documents and individual fields changed since the previous replication. Most applications require no special planning to take advantage of distributed updates and replication.

Unlike cumbersome attempts to bolt distributed features on top of the same legacy models and databases, it is the result of careful ground-up design, engineering and integration. The document, view, security and replication models, the special purpose query language, the efficient and robust disk layout are all carefully integrated for a reliable and efficient system.

fuzzy lollipop
A: 

If you are not going to have general 90%+ uptime connection between the databases, then there isn't any benefit to distributed databases.

One main benefit is to give large businesses a 'failover' when one machine goes down or is unavailable. If they have the database distributed over three or four machines, then the loss of one doesn't impact their ability to do business.

A second major benefit is when a database is simply too big for one server to cope with. 'Internet scale' databases (Amazon, Twitter, etc) have that level of traffic. Walmart would have that level of traffic. A couple of storefront operations wouldn't.

Gary
A: 

I think that this is a context where there is little to gain from distributed database operation.

If you were to go towards distributed operation, I'd probably look towards using a simple ER topology, with the 'head office' store being the primary (root) node and the other shops being leaf nodes. You would then have changes to the individual store databases replicated to the HQ node; you might or might not also propagate the data back to the other stores. Especially with just two stores, you might in fact simply replicate all the information to both stores; this gives you an automatic off-site backup of the database. (You'd probably configure all nodes as root nodes in this case - at least, until a chain grew to, say, five or six nodes.)

This would give you some resiliency for disaster recovery. It would also allow the HQ (in particular) to see what is going on at each store.

My impression is that you are probably not discussing 'transactions per second' on average; the rate of transactions at a single store is probably a few transactions per minute, with 'few' possibly being less than one TPM. Consequently, the network bandwidth is unlikely to be a bottleneck at any point, even with dial-up speeds (though that might be borderline).

Jonathan Leffler
@Jonathan: Multi-store (3) really haven't seen a need for knowing each others customers or transactions. At end-of-day, each stores new customers, transactions and ledger totals are ETL'd to owners system. Each stores entire system (OS and DB) is encapsulated within one 108MB file, a virtual hard disk image, which is backed up to a thumb drive and taken off-site. TPM? more like TPHour!
Frank Computer