What is the "best" way to create the backbone of a larger Website?
Currently our webpage consists of many different applications, like wordpress for blogs, shopping-carts and other not servic开发者_开发知识库e based not interoparable software. We want to change that.
In my mind a service based approach sounds promising, where every feature our site has to offer, is backed by one or more services (e.g. REST or SOAP). Then the stack could look like this:
- Webservers (Apache + PHP) for html rendering of the data consumed from the services
- Service-providers which provide the functionality (REST, SOAP)
- Inside every Service e.g. mysql-databases, solr-search instances, etc.
Are there any real flaws in this concept ?
What is the "best" way to communicate between layer 1. and 2. ?
Are there any sources (books, talks etc.) out there about this topic ?
Update1:
To refine my question, here is what we are aiming for:
The user should be able to commentate (blog)articles, manage newsletter subscriptions, search our products, configure products, buy them, rate and comment them, submit questions (and answer others) and so on. Basically a online-shop with many additional features suitible for our business. These features should integrate into each other and give additional features which already existing software are not able to deliver.
Of course one could start coding everthing in PHP with a framework (like symfony) against one database and it will work for 10 simultanious users. But what if our userbase grows over the capacity of a normal server and we need to scale our application?
Wouldnt it be nice if we "just" add more (identical) webservers which communicate with the different services (which can be cached, sharded and seperated if needed) or add additional services for features we add over time.
Hope this helps to make my question more answerable :-)
You can use REST or SOAP for applications where you might need data updated in real time. But for simple services like a traditional blog or shopping cart a rest based service might be an overkill.
If you want to implement a rest based system you might implement some kind of a rest based framework. There are many available and for php recessframework is something you can look into.
But on the whole your question would need some more explanation as in its current form its hard to find what kind of an app ure currently runnning and what exactyly ure trying to do.
Update 1:
From your updated question i dont find anything special which may force you to use rest or soap. All the functionalities you mentioned are quiet normal and if all you wanna do is scale up your application you can just use memcache, and eaccelerator and move your app to amazon ec2 where you can set up your servers to scale on the go.
You might have confused yourself a lot here. Just out of interest how many hits do you get per day?
精彩评论