ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Offering Software as Service

October 13, 2008 12:33am

Subscribe [6]
  • #1 / Oct 13, 2008 12:33am

    Zac G.

    268 posts

    Howdy,

    I am looking to go in a new direction with software development and offer software as a service.  The software is a registration system that schools can use to organize book clubs or summer reading sessions that they offer at their schools.  Students can login and see what class their friends are signed up for, what teachers are reading what books, and sign up for the books they want to read.

    We have tested and used this software internally at our school, but now some other schools want to use it and I am not sure about how to set up the software so that others can use it for their schools as well.  I think that a hosted solution would work best for the interested schools, since most do not have the technical support or hosting capabilities to install the software themselves.

    I have a bunch of questions about this process…  if anyone has experience with the technical aspects of this, I would love to pick your brain.

    Some issues I can forsee, off the top of my head, include the following:

    1.  How do I copy the app over to a new subdirectory (yourschoo.domain.com) and still keep updatable code incase I need to install a patch or upgrade.
    2.  Do I run separate databases?
    3.  How do I automate the registration process whereas once they are approved the software installs and offers them the configuration options.
    4.  Each school will have some different options running, like how many books they offer, or how many sessions or classes they run, etc.

    I have the software developed in pure PHP and am migrating it over to CI for better maintainability in the long term, so I have some time to think about these issues, but if anyone has some experience, please respond or PM me.

    Thanks!

  • #2 / Oct 13, 2008 3:34am

    stuffradio

    378 posts

    1. Copy all the code from originalfolder.domain.com to yourschool.domain.com .
    2. Run separate databases
    3. If you are limiting the installation to your domain name, this shouldn’t be a problem. If you are allowing it on the schools domain names, you will probably need to encrypt the crucial parts of code, and only leave un-encrypted code open so they can edit that.
    4. Shouldn’t be a problem. It just depends on how many classes they add.

  • #3 / Oct 13, 2008 6:36am

    Zac G.

    268 posts

    @stuffradio - Thanks!  If I were to have to add a model or edit a controller, would I just run a script to update all of the subdomains?

  • #4 / Oct 13, 2008 12:00pm

    Tom Glover

    493 posts

    @stuffradio - Thanks!  If I were to have to add a model or edit a controller, would I just run a script to update all of the subdomains?

    If you are looking to Offer SaaS you should in theory keep all the files on your server, with no access to the client. Also in theory one code base should be able to run many sites at one time, how ever this can make customisation hard unless planned from the start. Your server / scripts should be able to recognise different sub-domains, which in theory would then tell your system, of one code base, to collect the relevant site design for the school. This code base in theory should not need to be customised per client and should be able to run many client sites with different designs or slight feature changes through online configuration, eg a control panel.

    Hope this Helps!

  • #5 / Oct 13, 2008 2:49pm

    thurting

    213 posts

    You should really run off of one code base.  Keep it in version control so updates can be made easily.  With SaaS, redundancy is important, so you will need to run multiple app servers.  When an upgrade in your app comes along, run an update on the version controlled files in your main app server and have the others mirror with rsync.  You can also look into Capistrano.  I also suggest using clusterssh for admin tasks.  As far as DB design, it really depends on what you are doing.  Just remember, it is much easier to manage 1 DB than many (think backups).  There are a lot of things to consider if you are going the SaaS route.  The first is to lock down your app.  The second is to decide on infrastructure.  Then you need to test, test, test.  From there, you can turn up the marketing and start making some cash.  Good luck.

  • #6 / Oct 13, 2008 4:00pm

    Zac G.

    268 posts

    thank you everone for the feedback!  I certainly have sms things to think through.

    I am hoping that I can have one install of the app but I am not sure how to setup the configure fill to allow for folks to have different numbers of classes or books.

    Good point about backups for the database.  I was just worries about corrupt data affecting other users data.

    Thank you again for the responses, I have a lot to plan! (and learn)

  • #7 / Oct 14, 2008 9:47pm

    mikeyhell

    81 posts

    Subversion - saved me countless hours of updating for a hotel guestbook app I wrote.  Thanks for the clusterssh tip thurting, I’m in the process of setting up a mysql cluster and it will help a ton.

  • #8 / Oct 14, 2008 9:56pm

    Zac G.

    268 posts

    @mikeyhell - The two things I have heard about Subversion is that it is AWESOME and you *have* to use it, and that it is a pain to setup… any suggestions on easy place to get started with it?  Cheers!

  • #9 / Oct 14, 2008 10:39pm

    Rick Jolly

    729 posts

    Well speaking of SaaS, you could use a free plan from unfuddle, assembla, or some other. Alternatively, you can setup subversion on some shared hosts. Some hosts like hawkhost offer RvSkins which is a skin for cpanel that offers subversion and trac with a click of the mouse.

  • #10 / Oct 14, 2008 10:45pm

    mikeyhell

    81 posts

    A few months ago I embarked on setting up svn on a new server of ours.  After countless tutorials, docs etc… I was convinced that my co-worker and I had uncovered some secret society like the magicians guild or something.  After a few days of hacking away and the whole trial/error process I learned that I was looking at the way svn works the wrong way which was causing the errors.  So Here’s my quick and basic tutorial for svn which I proudly display on my companies vast wiki.

    Quick Rundown:
    1. Setup SVN via yum, apt-get or RPM on your server( some server companies have a control panel option for this )
    2. Setup a new repository
    3. Create a file structure
    4. Import the Repository
    5. Checkout the repository trunk to the web root dir
    6. Setup hooks, permissions and svn:ignore’s
    7. Run a svn commit and svn update to ensure everything is working

    Long Version:
    1. Setup SVN like I said above.  Should be a simple process for your lin flavor via shell.

    2. Setup a new repo by running

    svnadmin create /opt/svnserve/REPONAME --fs-type=fsfs

     

    (The fstype switch is used for creating a berkley based db schema - I’m not sure why you use this, but someone much wiser than me said just f****** use it - someday I’ll read all the docs and find out why —also, you can put the repo anywhere you want—we just decided to put it in the /opt/svnserve/ dir)

    3. Create a file structure like this in /tmp/reponame +branches +tags +trunk files go here(underneath the trunk)
      so this is pretty simple just create a tmp file structure using mkdir to add branches, tags, trunk ... put all your webroot files in the trunk folder(my webroot is /home/webadmin/development.local-motors.com/html/ so I put a html dir in the trunk w/ all my files in it.

    4. Import the repo like this:

    svn import /tmp/reponame file:///opt/svnserve/REPONAME -m “Initial Import”


    (the -m switch is just a comment)

    5. Checkout your new repo to the webroot dir like this:

    svn checkout file:///opt/svnserve/REPONAME/trunk /home/webadmin/SOMESERVER.com/html

      (so basically here you are checking out a working copy of the repo located in /opt/svnserve… to your servers webroot.

    6. Setup Hooks, permissions and svn:ignores Hooks are located in the /opt/svnserve/reponame/hooks/ —generally you’ll just use a post-commit, but there are other options there for us to enhance our system in the future(i.e. pre-commit etc)
      (our post-commit is pretty basic ... it calls a shell script that runs an svn update)

    Perms are set in the /opt/svnserve/conf
    set the passwd and the svnserve.conf files up. Make sure you change the anon access to none so everyone won’t be able to see your code.

    Setup the svn:ignore—this one is a little tricky.  Basically you want to run this command
    ~/.subversion/conf and edit the line that has editor in it.  Take out the pound sign and for the variable use vim. save and close (ESC :wq

    now go to your web root(html) and for each folder you want to be ignored do this:

    svn propedit svn:ignore FOLDERNAME.

    You now are taken magically to the svn editor(aka VIM)
    If you want to ignore the entire dir just enter a *
    If you want to ignore a specific file or certain extensions do this:
    config_select.php
    .jpeg
    *.gif
    Get the idea - just use wildcards and you’ll be o.k. I promise

    7. go into the html dir and edit a file – any file. Now save and close then do an

    svn commit . -m “Test”

    8. Hopefully everything went well. If it did run an svn update . to finish the process(note the period in the last two steps. There are other ways to do this, but this is how i do it.

    Oh and 1 other thing—google for svn or subversion quick start ... that’s the official docs

  • #11 / Oct 14, 2008 11:24pm

    Zac G.

    268 posts

    @mikeyhell - Huge thanks!  Makes me want to pay for a svn hosting service!  I will definitely rely on this when I get going with SVN, though.  Thank you.

  • #12 / Oct 14, 2008 11:46pm

    mikeyhell

    81 posts

    I don’t blame you ... we explored that option, but it was decided that we would host our svn locally.  After all that work and many days getting nowhere I can now setup an entire repo in about 5 or 10 minutes now.  I consider the experience time well spent.

  • #13 / Oct 15, 2008 5:04am

    Michael Wales

    2070 posts

    I highly recommend Beanstalk for SVN hosting.

  • #14 / Oct 15, 2008 6:44am

    thurting

    213 posts

    Paid solutions have nice GUI, but I don’t see the point in paying someone to host an SVN repository when you can set one up - webdav and all - in under 5 minutes.  Even for someone who has never used SVN before, you can burn through the book in a couple of days and be quite competent in managing a repo.

  • #15 / Oct 15, 2008 1:25pm

    skattabrain

    155 posts

    Paid solutions have nice GUI, but I don’t see the point in paying someone to host an SVN repository when you can set one up - webdav and all - in under 5 minutes.  Even for someone who has never used SVN before, you can burn through the book in a couple of days and be quite competent in managing a repo.

    i’m using unfuddle right now (brand new to svn and loving it so far ... where have i been???).

    anyways, i’m using simply because i’m in the middle of 3 major projects at the same time and just needed to see if i liked it. i literally have had no time to do anything else but code.

    in a few weeks i want to set up my own server. what kind of resources do i need? i have a VPS with modest resources ... can i run it there or am I going to need more resources?

    my plans “space wise” is to take finished projects down and store them locally ... so I only need to store the open project.

    i will miss unfuddle’s interface though ... is there something you comparable?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases