migrating to rails 3, an in-house developers perspective

Post on 12-Jan-2015

1.335 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presentation from RailsConf 2011

TRANSCRIPT

Chetan Krishna and Mark Johnson

Migrating To Rails 3 An In-house Developer's

Perspective

Wednesday, May 18, 2011

Who Are We?

• Our Company

• Publicly Traded

• > 150 M/year Rev

• > 600 Employees

• Offices World Wide

• Us

• Development Team

• CIO Rails Advocate

• Develop & Maintain

• 24x7 Support

• Web Apps > 12yrs

• Rails since 2006

Wednesday, May 18, 2011

Challenges

Approaches

Wednesday, May 18, 2011

Legacy Environment

Not OONot MVCNo Testing

Wednesday, May 18, 2011

Adoption Challenges

Maintenance

Integration

Technology

Migration

Wednesday, May 18, 2011

Our Application Environment

Legacy Non-Rails AppsWeb & Client Server11 Apps

Commercial AppsFinancials and HR& Sabrix (sales tax)

Rails 1 - 7 AppsRails 2 - 56 AppsRails 3 - 5 Apps

Wednesday, May 18, 2011

Wednesday, May 18, 2011

Sales Management

Quotes/Orders

Leads Sales

PRESE

Reports

Dashboards

Accounts

Partners

Customer Directory

CalendarAsterisk

Wednesday, May 18, 2011

Wednesday, May 18, 2011

Approaches

Creating new apps

Background jobs

Data Sharing

App Configuration

Authentication

Wednesday, May 18, 2011

Approaches

Creating new apps

Background jobs

Data Sharing

App Configuration

Authentication

Wednesday, May 18, 2011

68 apps in production

Wednesday, May 18, 2011

Templates

• create only what we need

• update specific parts of the app

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Templates

Wednesday, May 18, 2011

Approaches

Creating new apps

Background jobs

Data Sharing

App Configuration

Authentication

Wednesday, May 18, 2011

Background Jobs

flexible schedule

notify on exceptions

daemons

Wednesday, May 18, 2011

Background jobs

Wednesday, May 18, 2011

Background jobs

Wednesday, May 18, 2011

Background jobs

Wednesday, May 18, 2011

Background jobs

Wednesday, May 18, 2011

Background jobs

Wednesday, May 18, 2011

Background jobs

Wednesday, May 18, 2011

Approaches

Creating new apps

Background jobs

Data Sharing

App Configuration

Authentication

Wednesday, May 18, 2011

Data Sharing

Data SynchronizationReading and Writing between apps

Wednesday, May 18, 2011

Data Sharing

Data SynchronizationReading and Writing between apps

Wednesday, May 18, 2011

4D

Core Data Synchronization

Wednesday, May 18, 2011

4D

Rails

Core Data Synchronization

Wednesday, May 18, 2011

Topic Subscribers

Publisher

Subscribers

Subscribers

Subscribers

Topic

Wednesday, May 18, 2011

Topic Subscribers

app/models/company.rb

Wednesday, May 18, 2011

Wednesday, May 18, 2011

Wednesday, May 18, 2011

Wednesday, May 18, 2011

Topic Subscriberslib/daemons/push_updates_to_sales.rb

Wednesday, May 18, 2011

Wednesday, May 18, 2011

Wednesday, May 18, 2011

Data Sharing

Data SynchronizationReading and Writing between apps

Wednesday, May 18, 2011

Quotes/Orders

Leads Sales

PRESE

Reports

Dashboards

Accounts

Partners

Customer Directory

CalendarAsterisk

Shared DB for Multiple Apps

Wednesday, May 18, 2011

Shared DB for Multiple Apps

Sales AppLeads Appleads opportunities

sales_db

Wednesday, May 18, 2011

Shared DB for Multiple Appsleads/app/models/opportunity.rb

leads/app/models/opportunity_resource.rb

Wednesday, May 18, 2011

Different DBs for Single App

Quotes/Orders

Leads Sales

PRESE

Reports

Dashboards

Accounts

Partners

Customer Directory

CalendarAsterisk

Wednesday, May 18, 2011

Different DBs for Single App

leads opportunities

sales_db

partners_db

Reporter App

Wednesday, May 18, 2011

Different DBs for Single App

app/models/registration.rb

app/models/opportunity.rb

reporter/config/database.yml

Wednesday, May 18, 2011

reporter_db

localhost

Different DBs for Single App

Reporter App sales_dbsales_db

Wednesday, May 18, 2011

reporter_db

localhost

Different DBs for Single App

sales_dbReporter

Appsales_db(replicated)

Wednesday, May 18, 2011

Approaches

Creating new apps

Background jobs

Data Sharing

App Configuration

Authentication

Wednesday, May 18, 2011

Authentication

Wednesday, May 18, 2011

• Existing

• Domain Cookie

• Encrypted Credentials

• Distributed

Single Sign-on / Sign-off

• New

• Rails as Master

• Support Legacy Apps

• Support 3rd Party Apps

Wednesday, May 18, 2011

Implemented Oauth2 Provider and Client

http://www.railsatwork.com/2010/10/implementing-oauth-provider-part-1.html

Application AuthenticationProvider

Browser

Access Token

Domain CookieDomain Cookie

Authorization Token

Wednesday, May 18, 2011

Approaches

Creating new apps

Background jobs

Data Sharing

App Configuration

Authentication

Wednesday, May 18, 2011

Wednesday, May 18, 2011

database.yml Setup

Wednesday, May 18, 2011

database.yml Setup

Wednesday, May 18, 2011

database.yml Setup

Wednesday, May 18, 2011

Application Specific Configuration Data

app/models/opportunity_resource.rb

Wednesday, May 18, 2011

Application Specific Configuration Data

Wednesday, May 18, 2011

Application Specific Configuration Data

Wednesday, May 18, 2011

Application Specific Configuration Data

Wednesday, May 18, 2011

Application Specific Configuration Data

Wednesday, May 18, 2011

Application Specific Configuration Data

Wednesday, May 18, 2011

Application Specific Configuration Data

Wednesday, May 18, 2011

Application Specific Configuration Data

Wednesday, May 18, 2011

Application Specific Configuration Data

Wednesday, May 18, 2011

E-mail

Oh, $#*&!

Did that e-mail from development just get sent to the client?

Wednesday, May 18, 2011

ActionMailer Interceptor

Wednesday, May 18, 2011

ActionMailer Interceptor

Wednesday, May 18, 2011

ActionMailer Interceptor

Wednesday, May 18, 2011

ActionMailer Interceptorconfig/environments/development.rb

Wednesday, May 18, 2011

ActionMailer Interceptor

Wednesday, May 18, 2011

Questions

Chetan Krishnackrishna@opnet.com

Mark Johnsonmjohnson@opnet.com

Rails At Workhttp://www.railsatwork.com/

Wednesday, May 18, 2011

top related