[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 08-16-2007, 10:32 AM   #1 (permalink)
Straight from Sweden
 
Jawn's Avatar
 
Join Date: Oct 2006
Location: Sweden
Posts: 206
100.00 NP$ (Donate)

Jawn has a spectacular aura aboutJawn has a spectacular aura aboutJawn has a spectacular aura about

Animal Rescue
Need some inputs on my upcoming invoice system, [php][mysql]

Hello all ,
Im about to start coding on my invoice system, and im in need of some help/inputs.

First of all i will show you how my servers are built up.



Software
Webpage1, webpage2, webpage3 are three different servers with three different webpages which stores invoices localy on each server.
Each of the webpages sell some kind of service (premium member etc).

Then we have my invoice server which will collect all invoices from each server once per day and put them in a queue table. This means that all invoices end up in correct line (dates etc). If one of the webpages goes down the invoice server halts and will continue to connect to the crashed server to gather the missing invoices.

If it succeeds to gather all invoices from all webservers it will start generating invoice numbers to all invoices and email em to the ones who payed.


Questions and problematics
What should i use to gather all invoice data? best coding way

I could write my own API but that's something really new to me maybe point me somewhere?

I could go for direct sql connections between the servers, what security risks are there?

Im planing to buy a Pentium 4 2.4Ghz 1GBRam 750Gb bandwidth, this is just for the invoice system.
Nothing else should be on it and its not more than 120 invoices per month. I have never used a P4 before is it stable? Ive always ran Dual Xeon or WoodCrest but i dont feel like paying that much for such a small system.


I would greatly appreciate ideas and inputs , i hope my post makes sence.


Best Regards
Jawn
__________________
Second place in seoworldchampionship 2007.
Jawn is offline  
Old 08-16-2007, 11:27 AM   #2 (permalink)
NamePros Member
 
Join Date: Sep 2005
Posts: 147
420.00 NP$ (Donate)

guillermobt is on a distinguished road


Hello Jawn.

The key of your system: "not more than 120 invoices per month".
This is no work at all for such a proposed architecture.
Thousands of servers (database and/or web servers) are running everywhere on P4 (or even on PIII) without problems.

It's also true that if you keep an open eye and your main server includes a backup and fault tolerant subsystem, you will sleep much better.

Since the seliarization of invoices is given "naturally" by their arrival timestamp, I don't think you have problems to generate the correspondant unique code for each of them. Anyway, I would include a unique machine ID to avoid collisions in the (rare) case that more than one invoice arrive to the "Invoice server" at the very same time(stamp).

If you want stronger security, don't make your webservers (webpages) visible among them and put a firewall between the "Invoice server" and your pool of webservers.

Try to code "monolithic" SQL transactions (maybe through stored procedures) which will avoid potential data inconsistencies which may occur when there are several parallel sources of data feeding a given database.

Don't know if I just said obvious things or something of the above can help you some way.


Regards.
__________________
technfo.com - pick.pk - ajaxpro.es - gbt.es - jamones.cn - sqzd.com - geoinfo.net

Free URL Redirection (for sale) (62,000+ subdomains and growing!!) Real IP / Proxy IP
guillermobt is offline  
Old 08-16-2007, 12:57 PM   #3 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute

Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
The server you propose is plenty for what you want.

Regarding coding an API I do not know of any sites that talk you though it but it is a fairly easy task to do. Before you go any further you should list the sort of things the external servers might need to do. Then methodically go through them and see what each entails. Also ensure that there is a way that each server can connect that is unique to that server as it will help in case of breaches.

I would advise against directly inputting the SQL as when you update the invoice server then you will have to update all other servers, on the other hand if you use an api you simply update the invoice server. The only time the other servers will have to be updated is when you change the api but if you plan it correctly and update correctly you can minimize this.
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 01:57 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85