关闭。这个问题需要更多 focused .它目前不接受答案。
想改进这个问题?更新问题,使其仅关注一个问题 editing this post .
3年前关闭。
Improve this question
我正在为需要模块化的新软件规划基本架构。
我正在尝试定义一个 Multi-Tenancy 应用程序,以便为所有用户运行一个实例。
我需要的是可以在需要的时间和地点进行扩展,所以我不喜欢在负载均衡器后面生成多个应用程序(单一架构)的想法,因为它可能是需要更多资源的计算的单个部分。
所以我正在考虑一个面向服务的架构,它将 Rails 应用程序作为 Web 客户端和其他服务,可以用任何语言几乎编写并由 Rails 应用程序通过 API 访问。
我还想让这些 API 向用户开放,以便与他们现有的软件集成并轻松扩展这些服务。
我有一些具体的问题:
我非常了解 Python、C/C++、JS、Perl 和其他 pl,并且我最近开始使用 Ruby/Rails。我之所以选择最后一个,是因为在我看来,这个社区非常注重构建服务,而我(在极端表现之前)最关心的是能够尽快学习并有人与之分享经验并从中学习有实际的例子(我知道它是关于一种架构,而不是实现它的 PL,但我认为在仍然使用 web1 或 web2.0 风格的不成熟环境中更容易出错)。
附言我还需要写基本的架构设计,你有什么模板可以让我开始吗?我确实需要与我的团队和其他非常专业的专业人士分享它,我希望它完整且易于理解。
希望在这里阅读一些好的建议!
谢谢,
亚历克斯。
最佳答案
建筑学
这是一个示例堆栈,我认为它主要执行您想要完成的任务:
集群
实例
申请
更具体的答案
would it be a good idea to have this kind of architecture for a new startup (1-5 employees)?
如果做得正确,这种方法可以非常稳定和健壮。您不想这样做的情况是您将所有时间都花在管理服务器上。你想要启动它,能够快速处理问题实例,并努力让你的应用程序做一些事情。如果你做得对,创建实例可以很简单并且完全自动化。
using APIs i don't need to use any RPC since the API request itself is an RPC, am I right on this concept?
是的。
what would be a nice standard for the APIs (REST only defines HOW to access resources)?
在这里,我们需要进一步说明您需要如何使用 RESTful design来完成特定的目标。
what could be, pratically, the best (= a good) way to expose those APIs to customers? Via the Web Rails application? Directly via a proxy that makes them all available under the same domain? APIs would be accessible in a RESTful way so via HTTP requests.
域(或子域)应该可以通过 HTTP 和 RESTful 软件设计访问。它可能会返回 JSON 或其他内容。全取决于你。
with this kind of architecture would it be less expensive to have VPS's, Cloud, or dedicated servers? I like clouds because of their failure-tollerant nature, it would free us from worry about data persistence and backups (including the fact that we want to build an architecture almost 100% available).
你得到你所付出的。我会推荐云服务器。如果您准备“自己动手”,请查看 Heroku 以开始使用,或者查看 Rackspace。或发动机场。
Any other suggestion or point of view, and any simply start point to think about this would be very appreciated.
我会尝试使用免费的 Heroku 帐户创建一个测试 API。
关于ruby-on-rails - 使用 Rails 的 SAAS 架构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10765158/