Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3948656
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:24:04+00:00 2026-05-20T01:24:04+00:00

I am running Ruby on Rails 3 and I have an application that makes

  • 0

I am running Ruby on Rails 3 and I have an application that makes use of namespaces in order to handle more “internal concepts”. With “internal concepts” I mean that each namespace is used to handle a specific resource of my application. For example a namespace is “users” and it is used to handle user’s sessions and authorizations, another is “blogs” and it is used to handle all about posts and comments.

I think this is a “convenient” solution to avoid a lot of problems, but not the best.

At this time my RoR application consists of this file system structure:

# "users" and "blogs" are namespaces

RAILS_ROOT/app/controllers/users
RAILS_ROOT/app/controllers/blogs
RAILS_ROOT/app/models/users
RAILS_ROOT/app/models/blogs
RAILS_ROOT/app/views/users
RAILS_ROOT/app/views/blogs
...

I would like to switch the “users” and “blogs” namespace in two RoR applications using subdomains to have something like this:

http://main.com        # This is the main RoR application
http://users.main.com  # This is another RoR application used to handle users
http://blogs.main.com  # This is another RoR application used to handle blogs

In few words, I think I am trying to Scale Out* my application or maybe to create a Webservice for each RoR application, but my issues are:

1. What problems I may encounter?

I noticed of problems about maintaining sessions (in my case I handle those with cookies) between applications but I think it isn’t the only one problem.

2. How to handle communication between the three RoR applications in my case?

I noticed that I can use ActiveResource to share information, but I must pay attention to information such as user authentication.

  1. I have to implement the OpenID/Oauth protocol in order to maintain user authentications?

  2. I think I have to ensure the user authentication information with a HTTPS connection also if the comunication is between subdomains. Is it true?

3. How do I organize my work and resources?

With all that being said, I would like to don’t use (absolutely) plugins or gems, but, if I need, I would like to implement my own handler.

At the end I would like to have 3 RoR “easy” and separated applications without use namespaces in each of them and that can communicate between each other:

# "Main" application for http://main.com
ROOT_MAIN/app/controllers/
ROOT_MAIN/app/models/
ROOT_MAIN/app/views/users
...

# "Users" application for http://users.main.com
ROOT_USERS/app/controllers/
ROOT_USERS/app/models/
ROOT_USERS/app/views/users
...

# "Blogs" application for http://blogs.main.com
ROOT_BLOGS/app/controllers/
ROOT_BLOGS/app/models/
ROOT_BLOGS/app/views/users
...

BTW: is a good approach the usage of namespaces that I’m doing?

P.S.: If you need some other information, let me know and I will update the question.


*From The O2 Software Process: “Scale Out” refers to the concept of adding more servers to an existing park, as opposed to “Scale Up” which means to replace existing (slow) servers with newer (and faster) servers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:24:04+00:00Added an answer on May 20, 2026 at 1:24 am

    Is your app really so big that you need to use multiple apps to handle the different concerns? It could be that your post just lacks enough detail to convey the real magnitude of what you are doing but it seems like you are trying to modularize a small enough app that it would be fine without “scaling out” as you say. Or maybe I am just missing something?

    1. I think that is going to be a tricky problem but there may be some way to store session data in the database and either share it the way you handle #2 or you’ll have to roll a custom solution for that. I think the biggest problem will be sharing resources across your app, and also if you are breaking user management out into its own app you’ll need to implement your own OpenID/Oauth. This post describes this with Devise/OAuth.

    2. You can use activeresource to connect to each app’s respective rest api. This post describes one guy’s solutions to sharing data across rails apps.

    3. This question is somewhat vague. You described using multiple apps to separate your concerns (blogging vs user management), so I imagine you’ll have your resources at the root of each application without any namespacing, as you’ve done already in your existing application.

    Now for a more general response to your entire question, recently I read a blog post regarding Data, Context and Interaction (wikipedia article) on Rails, and I think this might be a better solution for what you are trying to accomplish if you feel like your app is getting out of control.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking at ways to deploy a Ruby on Rails app (running on JRuby)
I am running OS X 10.5, Ruby 1.8.6, Rails 2.1, sqlite3-ruby 1.2.2 and I
I am running Ruby and MySQL on a Windows box. I have some Ruby
I am running ruby script/generate scaffold or ruby script/generate model and I know the
When running tests in Ruby's unit::test framework, is there a really easy way to
When I'm running a simple Ruby script, what's the easiest way to dump an
Is there an easy way to tell if a ruby script is already running
Running a rails site right now using SQLite3. About once every 500 requests or
running git instaweb in my repository opens a page that says 403 Forbidden -
Running into a problem where on certain servers we get an error that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.