+ All Categories
Home > Technology > A commercial open source project in Python

A commercial open source project in Python

Date post: 19-May-2015
Category:
Upload: jbrendel
View: 2,651 times
Download: 1 times
Share this document with a friend
Description:
Experiences from the trenches: Developing a commercial open source project in Python.
Popular Tags:
25
Developing a Commercial Open Source Project with Python OSDC 2007, Brisbane Juergen Brendel Principal Software Engineer
Transcript
Page 1: A commercial open source project in Python

Developing a Commercial Open Source Projectwith Python

OSDC 2007, Brisbane

Juergen BrendelPrincipal Software Engineer

Page 2: A commercial open source project in Python

Slide 2

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Agenda

• The SnapLogic project• Open source opportunities / challenges• Python opportunities / challenges

Page 3: A commercial open source project in Python

Slide 3

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

The SnapLogic project

• Started in 2005• Open source data integration framework• REST• Targeted at developers

Page 4: A commercial open source project in Python

Slide 4

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Example: Browser based GUI

Page 5: A commercial open source project in Python

Slide 5

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Example: Resources

SnapLogic Server

ComponentHTTP

Resource Definition

Databases

Files

Applications

Atom / RSS

HTTP://server1.example.com/customer_list

Client HTTP Request and Response

• Resource Name• HTTP://server1.example.com/customer_list• Component and Behavior• SQL Query or filename• credentials• parameters

Page 6: A commercial open source project in Python

Slide 6

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Example: Resources

SnapLogic Server

ComponentHTTP

Resource Definition

Databases

Files

Applications

Atom / RSS

HTTP://server1.example.com/processed_customer_list

Client HTTP Request and Response

Component

Resource Definition

Component

Resource Definition

Read Geocode Sort

Page 7: A commercial open source project in Python

Slide 7

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Why open source?

• Practical reasons• Philosophical reasons• Business reasons

Page 8: A commercial open source project in Python

Slide 8

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Business reason: Lower cost

Traditional sales funnel

Potential customersPotential customers

InterestedInterested

QualifiedQualified

OpportunityOpportunity

SaleSale

Page 9: A commercial open source project in Python

Slide 9

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Business reason: Lower cost

Open source sales funnel

Potential customersPotential customers

InterestedInterested

QualifiedQualified

OpportunityOpportunity

SaleSale

Page 10: A commercial open source project in Python

Slide 10

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Business reason: Lower cost

Traditional FOSS

Sales cost

Development cost

Income

Page 11: A commercial open source project in Python

Slide 11

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Business reason: Broad adoption

• Broad adoption– More 'sales'– More feedback– Contributions– Lower development cost

• OSS gets in through the side door

Page 12: A commercial open source project in Python

Slide 12

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Little OSS experience

• The open source community• What's public, what's private?• You are being watched!

• Solution:– Clarify policies– Embrace openness

Page 13: A commercial open source project in Python

Slide 13

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Licenses

• Which license to choose?• Modified standard license?

• Solution:– Get professional advice– Keep it simple– Use GPL

Page 14: A commercial open source project in Python

Slide 14

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Source as a feature

• People choose OSS because of source• Source becomes a feature (!) of the product

• Solution: Make source beautiful– Documentation– Consistency– Style and documentation guide

Page 15: A commercial open source project in Python

Slide 15

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Enabling contributions

• Open APIs more important than open source!

• Enable 'deeper' contributions

• Solution:– Don't rest on your laurels– Use your unique advantage: Deep contributions– Repeat after me: “APIs, modules, APIs, modules,

APIs, modules, APIs, modules...”

Page 16: A commercial open source project in Python

Slide 16

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Why Python?

• One of the founders likes it• Rapid prototyping and development• Reasonably fast• Readable code• Suitable even for large projects

Page 17: A commercial open source project in Python

Slide 17

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Little experience

• Can't hire Python developers• Even in the Silicon Valley

• Solution:– Just hire good (generic) developers– They can learn

Page 18: A commercial open source project in Python

Slide 18

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Tainted by past life

• Team experience in other languages• Not using Python to its full potential

• Solution:– Understand pythonic– Read: Python is not Java– Share knowledge: Code reviews

Page 19: A commercial open source project in Python

Slide 19

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Getting carried away

• Powerful and very (!) dynamic:

• Solution:– Create conventional looking APIs– Use those APIs as documentation

>>> class Foo(object):>>> def hello(self):>>> print “Hello World!”

>>> x = Foo()>>> dir(x)[ .......... , 'hello']>>> x.bar = 123>>> dir(x)[ .......... , 'bar', 'hello']

Page 20: A commercial open source project in Python

Slide 20

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Why didn't you just use...?

• Python comes with Batteries included• Don't know all the libraries have to offer• Write yourself? Oh, the temptation!

• Solution:– Learn to use Google– Read Python Cookbook and others– Share knowledge: Code reviews

Page 21: A commercial open source project in Python

Slide 21

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Third-party package risks 1

• Import chain madness• Some packages rely on C extensions• Normally: Don't reinvent the wheel

• Solution:– Watch what you import– Inventing a little wheel can be helpful

Page 22: A commercial open source project in Python

Slide 22

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Third-party package risks 2

• So far, no bugs in core libraries• Bugs in third-party packages• Included patched packages in the installer

• Solution:– Speed up acceptance time for submitted patches– Provide patch, test cases, detailed docs

Page 23: A commercial open source project in Python

Slide 23

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: The GIL

• Can't use multiple cores with threads

• Solution 1:– Use multi-processing

• Solution 2:– mod_wsgi

Page 24: A commercial open source project in Python

Slide 24

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

Challenge: Hidden bugs

• No compiler to catch typos• Duck typing

• Solution:– Unit testing: pyunit, buildbot– Coverage testing: figleaf, buildbot

Page 25: A commercial open source project in Python

Slide 25

Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane

The end

Any questions?

[email protected]


Recommended