NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Need some inputs on my upcoming invoice system, [php][mysql]

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

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-16-2007, 11:32 AM THREAD STARTER               #1 (permalink)
Straight from Sweden
 
Jawn's Avatar
Join Date: Oct 2006
Location: Sweden
Posts: 202
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.
????: NamePros.com http://www.namepros.com/programming/362628-need-some-inputs-my-upcoming-invoice.html
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, 12:27 PM   #2 (permalink)
NamePros Member
 
guillermobt's Avatar
Join Date: Sep 2005
Posts: 160
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.
????: NamePros.com http://www.namepros.com/showthread.php?t=362628


Regards.
guillermobt is offline  
Old 08-16-2007, 01:57 PM   #3 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:06 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger