Suggestions for the best Rails collaborative development stack? [closed] - ruby-on-rails

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Looking for some suggestions from the community for development stacks for collaborative environments. Could you share what you have and what has worked for you or your team?
The following is probably too verbose for some and an expression of just some rambling thoughts I've had about my particular scenario as I'm working with a hatchling dev group. SO, if you read it 1UP for you, otherwise, please just feel free to just share your thoughts re: the first question and what's worked for your team.
I have a situation where myself and a couple other developers are working together and I'd like to set up the "best" dev environment possible for Ruby on Rails development. At the moment I use git and some of the usually accepted best practices for development, however the other guys are new and not terribly familiar with the shell, git, etc. They're more from a php and monolithic environment.
I do have a central linux server that has been used hitherto for LAMP based dev for them. I can retool it to anything I'd like it to be as I'm quite adept and experienced at Unix system and network admin.
Could someone please suggest what may work well in this scenario? Again, ultimately we need to do collaborative development that has the lowest learning curve. I'll be the only one deploying to Heroku until I feel comfortable with their experience.
I would like to put something together that can get us all up to speed quickly in a matter of a day vs a longer learning curve and then allow them to grow into the shell and so forth over the next couple weeks.
What I was thinking was more of a shared SMB (mixed Windows and Mac workstations) and SFTP unified projects folder that has either apache virtual hosts for each project or thin rack. I'd continue to use my methods, but this could provide the flexibility for them to grow into this and be able to restart httpd or thin as per need.
Am I on the proverbial right track or has someone seen a better alternative? A lot of things have crossed my mind such as Gitorious (since we'll have a lot of small projects needing to be tracked and an enormous GitHub account is not feasible), Heroku, OpenShift and a lot of other things, but I have enough uncertainty that I'd like to get some input from the community as to the right mix for great collaborative agile development.

I have an answer but I think you have conflicting requirements: i.e. lowest learning curve vs low/free cost.
You say that GitHub is not feasible but it does offer unparalleled features for novice users. They can see commits on a website instead of on the commandline, can even edit files right in the browser (since yesterday, uses Ace) and gain insight into the branching/merging process.
Another paid option is http://cloud9ide.com/ which is also web-based.
I use my own development server as well but only use it for experienced people who need no hand-holding. If I were to let everyone on there the amount of support would consume my entire day.
It is my opinion that doing Rails development people should adopt the best practices in the field. See it like this: at least you won't burden them with learning Subversion or --eek-- CVS. Just seeing the commits on GitHub and having a discussion right after puzzling pieces of code is worth the money.

Related

Where can I learn about website load balancing? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
My initial website will not experience heavy traffic during beta. But assuming success, when traffic builds I will need to implement plans to handle increased traffic from being aware of it to actually dealing with it. I'd like to start studying that now.
But there is an amazing wealth of information about this on the web. I was hoping someone might help me cut through the volumes of information by pointing me in the right direction with articles/walkthroughs/etc that are more practical and less theoretical? And of course any direct guidance on the issue would certainly be appreciated.
I am currently using a hosting provider, not running my own IIS server.
It's very difficult to predict where your scaling bottlenecks will be. If you're missing a database index for example, queries might run slow, and load balancing your web server won't help.
To start with, you should get comfortable with profiling your application. There's a lot of great tools for the backend, including the Visual Studio Profiler, ANTS Profiler and my favorite, dotTrace.
Next (or maybe first, it doesn't matter), you'll want to profile the client side. Chrome Developer Tools works great, or you can use the new Firefox Developer. This will show you response times and how long it's taking to load assets, like your CSS/Javascript/Images/etc.
After doing both, you should have a good idea where your problem is. But in general, the "easiest" way to improve scaling is:
Bundle/minify/compress your asset files. You can remove hundreds of KB from page loads.
Use a CDN. Browsers are limited by domain in the number of simultaneous connections they can make to fetch assets. With a CDN, you can split the requests between domains, and for popular libraries like jQuery, they're more likely to already be cached.
Cache data as appropriate. If there's some mostly static content that never changes, cache it instead of querying your database every time. Take advantage of things like Output Caching, where your entire rendered view is cached.
Check out some of the checklist items in this post.
Once you've taken all those steps, if you still have problems, then you can look at things like load balancing and better hardware. Otherwise, you risk throwing money away when it might not make a difference at all.
It's great to familiarize yourself with all aspects of a web application. However, load balancing is one of those things that can be tricky to set up, but is nigh impossible to set up right without a very comprehensive knowledge of server and networking architecture and experience. Even the big boys like Twitter and Facebook struggle with handling scale. It's very much a learn as you go process and extremely particular to individual circumstances. An absolutely perfect setup for one application may be completely useless for another.
If you're successful enough to need load-balancing, you're likely also successful enough to hire an infrastructure expert to take care of it for you. Short of that, you can utilize services like Azure, which while they have their own learning curve, provide load balancing nearly out of the box.

Why use Node.js if I don't require real-time functionality? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm considering using Node.js with a framework such as express, meteor, or sails (a directory with social features such as sharing, messaging and uploading media). I don't have any features planned that explicitly require real-time functionality, so does it make sense to use Node.js anyway instead of Rails?
There's so much buzz around Node.js that I am tempted to use it just so that I don't get left behind.
As DHH wisely noticed regarding Node vs Rails, "everything can be used instead of everything else". That's somewhat true in a sense that, for example, a site in Rails with promptly set up caching can be as fast as one written in Node.js.
Besides, Node is not necessarily about real-time. It's more about being able to handle many light (in terms of processing time needed) requests. If you expect high level of concurrency (I mean, really, expect, not just are dreaming of it) and every request is supposed to be relatively small, then you could consider using Node, just because handling bigger load (up to some point) will require less work with Node.
Bottom line, use what you are good at. Unless you want to try something new. And Node.js is definitely worth trying.
You're question does lack quite a bit of context.
This question all depends on the context.
If this is contract work or something you want to make money with in the near future and you're not sufficiently skilled with any of the mentioned nodejs frameworks.
Then I would recommend you use whatever you're already good at.
If this is a private project for fun or any other non serious purpose.
Then I would seriously recommend you to try one of mentioned nodejs frameworks.
In my opinion nodejs is currently the cutting edge web technology. As a developer
you should always try to stay on the cutting edge. That way when you learn how nodejs can be used you might find ways to use those things in your professional environment.
I've lately been using meteor a lot and I can highly recommend it, once you get the hang of it you can do truly amazing things that you could never even imagine doing(in a reasonable timespan) in a classic php project.
Also according to some meteor will replace RoR alltogether blog
Aside from real-time, main plus I've seen is having same team being able to develop JavaScript client code and server side code for UI web applications. "Code sharing" between client and server seems a pipe dream to me, but same language is really nice.

What do I need to learn to manage a server/deploy? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm a rails developer (with about a year of experience) and I am getting pretty comfortable with it, but I find that I lack even a cursory understanding of how deploys or servers work. I am familiar with terms like Unicorn or Apache, but I don't know much beyond the notion that they manage rails instances (?).
I have heard of chef, and I know it is used for deploys, but I don't know where I'd begin.
Is there a book or a screencast series that would be useful in learning this sort of thing?
(Side note: I have a project I want to make that will run sort of like a template builder and a web host, so understanding how to add domains/subdomains/manage that sort of thing is one of the primary drives for learning, other than the natural want to learn).
When dealing with remote (or even local) deploys, I find that the best solution is using capistrano. You can find all the information you need at their website.
You can start reading the long README from Github and then switch to more detailed information starting from here.
When deploying a Rails application, usually servers like Apache or nginx acts as a router to your application's local server. Eg. you start a thin server for your deployed app that answers on the 1234 port and configure Apache to redirect all the calls to you remote address to the local server at localhost:1234.
Capistrano will start/restart/stop the local Rails server through the configuration you'll put in the config files, so you'll have complete control over it.
Hopes this helps. You can find lots of information online about capistrano and the integration with various http servers and rails servers.
Eg. a good starting point can be this screencast made by Ryan Bates, but beware! This is for the older 2.x version of capistrano.
Don't go anywhere but straight to latest awesome chef fundamental series, check opsode user on youtube (http://www.youtube.com/user/Opscode).
First episode:
http://www.youtube.com/watch?v=yh9osPQA_-k
after it you can go to irc, docs, watch other advanced things (including berkshelf). But first things first.
I have lots of things to tell regarding this. I'm on chef for around a month, and I've spent tons of hours understanding how it works. And I'd say the official docs are just a disaster. They give everything in one place, although you don't need to know it in the begging. I can only offer you some resources like: http://learnchef.getharvest.com/ which is best ever introduction I've found around. All those official learnchef links didn't work out for me.
I'd really recommend to stay away from Vagrant for a while, just buy a 5$ vps on DigitalOcean cloud and try this manual: http://adamcod.es/2013/06/04/deploy-a-basic-lamp-stack-digital-ocean-chef-solo.html
Start with a chef-solo instead of chef-server, and try knife-solo. Use berkshelf although it's rarely mentioned in official docs, because chef can't handle cookbook dependencies although it can download cookbooks. then slowly start looking how I've automatized a chef-server installation: http://github.com/holms/chef-starter This will give you an idea, which steps to take for chef-server setup, and how to deploy stuff with knife.
After all that, try vagrant, as it offers to run everything from your desktop machine. I've started from vagrant and I've wasted too much time. When you put chef-server and vagrant together, you get tons of information which you just unable to handle. Lots of cave heats appears, lots of things to write.. you ending up wasting your 40 hours non-stop learning, without achieving your desired results.
You can contact me on freenode irc if you need any help. I'd never wish this chef experience even to my enemy.
Update:
This is quite old comment :) So just ignore it. Ended up using vagrant+chef, then vagrant+ansible, now using docker. To be exact docker+traefik

Considering Porting App from .NET to Erlang - need advice [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am looking at Erlang for a future version of a distributed soft-real-time hosted web-based telephony app (i.e. Erlang looks like absolutely the perfect choice for this kind of app). I come from a .NET background and the current version of this app uses a combination of C#, WCF and JQuery to deliver the service. I now need Erlang to allow me to add extra 9s to my up-time and to allow me to get more bang for my server bucks.
Previously I'd set up a development process here combining VS.NET, GIT, TeamCity and auto-deployment of MSI files to the various environments we maintain. It's not perfect, but we're all now pretty comfortable with it. I'm wondering whether a process like we have is even appropriate for such a radically different technology stack (LYME)?
I'm confident that all of the programming challenges we previously solved using .NET can be better solved in less code with Erlang, so I'm completely sold on the language choice. What I don't yet understand from reading the Pragmatic and O'Reilly books on Erlang, is how I should adapt my software engineering and application life-cycle management (ALM) processes to suit the new platform. I see that in-place code updates could make my (and my testing and ops team's) life much easier (compared to the god-awful misery of trying to deploy MSI files across a windows network) but I am not sure how things should change when I use Erlang.
How would you:
do continuous integration in Erlang (is it commonly used?)
use it during a QA cycle (we often run concurrent topic branches using GIT, that get their own mini-QA cycle, so they all get deployed into a test environment)
build and distribute your code to DEV, TEST, UAT, STAGING, and PROD environments
integrate code generation phases into your build cycle (we currently use MSBUILD + T4 templates)
centralize logging for a bunch of different servers (we currently use Log4Net, MSMQ, etc)
do alerting with tools like SCOM
determine whether someone/something has misconfigured your production servers
allow production hot-fixes only after adequate QA (only by authorized personnel)
profile the performance (computation and communication) of your apps
interact with windows-based active directory servers
I guess I need to know what worked for you and why! What tools and frameworks did you use? What did you try that failed? What would you do differently if you could start over, knowing what you know now?
Whoa, what a long post. First, you should be aware that the 99.9% and better kool-aid is a bit dangerous to drink while blind. Yes, you can get some astounding stability figures, but you need to write your program in a way facilitating this. It does not come for free. It does not happen by magic either. Your application must be designed in a way such that other subsystems recover. OTP will help you a lot - but it still takes time to learn.
Continuous integration: Easily done. If you can call rebar or make through your build-bot you are probably set here already. Look into eunit, cover and Erlang QuickCheck (the mini variant is free for starters) - all can be run from rebar.
QA Cycle: I have not had any problems here. Again, if using rebar you can build embedded releases that are minimized erlang vm's you can copy anywhere and run (they are self-contained). You can even hot deploy fixes to such a system pretty easily by altering the code path a bit so you have an overlay of newer fixes. Your options are numerous. Git already help you here a lot.
Environmentalization: Easily done.
Logging centralization: Look into SASL and the error_logger. You can do anything you want here.
Alerting: The system can be probed for all you need (introspection is strong in Erlang). But you might have to code a bit to hook it up to the system of your choice.
Misconfiguration: Configuration files are Erlang terms. If it can be computed, it can be done.
Security: Limit who has access. It is a people problem, not a technical one in my opinion.
Profiling: cprof, cover, eprof, fprof, instrument + a couple of distributed systems for doing the same. Random sampling is also easy (introspection is strong in Erlang).
Windows interaction: Dunno. (Bias: last time I used windows professionally was in 1998 or so).
Some personal observations:
Your largest problem might end up being that you try to cram Erlang into your existing process and it might resist. It is a new environment, so new approaches will be needed in places and you should expect to adapt and workaround limitations you find along the way. The general consensus is that it can work (it is working for several big sites).
It looks like you have a well-established and strict process. How much is that process allowed to be sacrificed to give way to a new kind of thinking?
Are your programmers willing to throw out almost all of their OO knowledge? If not, you will end with a social problem rather than a technical one. If they are like me however, they will cheer, clap in their hands and get a constant high by working with an interesting language solving an interesting problem in a new way.
How many Erlang-experienced programmers do you have? If you have rather few, then better cut your teeth on some smaller subsystems first and then work towards the larger goal. Getting the full benefit of the system takes months if not years. Getting partial benefit can be had in weeks though.

What databases are people using in Cloud environments with ASP.NET / ASP.NET MVC? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am looking at hosting a new site on a cloud service. It looks like cool technology, pricing is attractive, and I can scale in case my plans for global internet domination come to fruition.
I have spent a good chunk of time figuring out what back-end to use thought. The site is in ASP.NET MVC, and I have hit a brick wall when it comes to SQL Server. I am not keen on paying the licensing for a small site just starting up. It's great for the day job but I am looking past it for this new site.
SQL Azure looks like it's price is perfect, however the price of their computing scared me off, and Development Accelerator Core is too much risk with its contract stipulations.
I have been checking out all sorts of alternative approaches:
Open Source Databases (MYSQL, Postgres) with Entity Framework
Nosql (MongoDB, CouchDB, SimpleDB, DB40, Cassandra)
Dedicated SQL Server
SQL Server Web Edition
Calling SQL Azure from another cloud
Right now my plan is to host the web server (IIS) and the database server on the same instance (1GB RAM Windows 2008 R2) and then scaling out as needed.
At this point I welcome what others have figured out, what has worked, what hasn't worked. I appreciate any experiences you want to share.
db4o isn't free and their licensing is chaotic, or at least was when I spoke with them last. As a result, I'd stay away.
Don't forget about RavenDB by Ayende & crew. The licensing is about $700 but they say that they will consider waiving the first license fee for startups. I've been dabbling around with it and I've got to say, it's quite impressive NoSQL solution. It's similar to CouchDB but very .net oriented with some one ups on Couch (imo).
Finally, if you join BizSpark by Microsoft, they will give you some free airtime on Azure. Pretty sure some sql love is included with it.
Cheers and good luck mate.
Sql Azure here. You don't need the computing time to use the database, it only exists if you're running an application on Azure.
MySql with EF: so far only real issue I've faced was a bug with a very long running query in the MySql connector / a trip to the issue tracker revealed a workaround that one could use by modifying + compiling the source of the connector ... just until the fix went into the next patch.
db4o: this is in a recent project / already in place when I joined. 2 issues so far:
It doesn't have much support to efficiently aggregate data. As I understand this is usual in NoSql / you just use a different design for it (at least that's what we have done and have worked).
You need to understand well the various modes involved for the database and the operations. Trying to jump too far ahead easily gets you into performance issues at even small loads. It's more a learning curve issue, using the right bits performs very well.
I have to admit that Chance answer worried me for a moment. When I joined the project with db4o it was already in place, so I didn't look at license considerations at the time. This said, I've always understood that you can use GPL code on web sites. Similar to this answer: https://stackoverflow.com/questions/94346/can-i-legally-incorporate-gpl-lgpl-open-sourced-software-in-a-proprietary-clo/94468#94468, if you don't distribute you can use it. Based on the last comment posted by Chance, I'd say it's likely there was some sort of communication issue there.
orcsweb.com offer cloud servers for US$99 per month. Pretty good deal considering that I was paying US$300 to them for a virtual server.
The thing that sets orcsweb.com apart is their technical service. For US$124 per month, they provide a fully managed service on the server.
So for US$223 per month, I get it all and don't have to worry about the server for all my clients.
Database is thrown in for free: sql express 2005 or 2008. This sounds enough for your initial requirements. We run full blown eCommerce catalogues on this and it is fine. If the website grows, well then you that is good news and you can afford to pay for a sql server licence.
If this sounds like a plug for orcsweb, it is, but I don't get anything out of it... We have had great service from them. My job is to write apps, not run a server. We have about 30 clients and we host them all on our one account with orcsweb. That works out a US$7 per client. Can't be bad.
EDIT:
Important!!:
Please note that the above prices are for a Web Server. It host any number of websites and has a SQL Express installation thrown in.
I may have misunderstood the question, but the answer is still valid because the SQL Express will run your app in its early stages.
Not sure how much data you are dealing with, but are the SQL Express skus an option? They can handle just about anything a web app should be doing with the data while being at the right price point and an easy upgrade path.
Failing that, I'd go with the nosql option as that seems to make quite a bit more sense these days and its designed with the cloud in mind.

Resources