a commercial open source project in python
DESCRIPTION
Experiences from the trenches: Developing a commercial open source project in Python.TRANSCRIPT
![Page 1: A commercial open source project in Python](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/1.jpg)
Developing a Commercial Open Source Projectwith Python
OSDC 2007, Brisbane
Juergen BrendelPrincipal Software Engineer
![Page 2: A commercial open source project in Python](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/2.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/3.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/4.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/5.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/6.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/7.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/8.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/9.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/10.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/11.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/12.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/13.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/14.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/15.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/16.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/17.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/18.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/19.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/20.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/21.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/22.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/23.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/24.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022042607/555a4d4fd8b42a47748b46dd/html5/thumbnails/25.jpg)
Slide 25
Developing a Commercial Open Source Project with PythonOSDC 2007, Brisbane
The end
Any questions?