Date post: | 12-Jan-2016 |
Category: |
Documents |
Upload: | myra-atkins |
View: | 216 times |
Download: | 0 times |
Making & Saving Making & Saving Money with Open Money with Open SourceSource
Kevin Hock, CS/SAN 2002Kevin Hock, CS/SAN 2002
Jeremy Harning, CSA 2004Jeremy Harning, CSA 2004
What is Open Source?What is Open Source?
Code is freeCode is free Public collaborationPublic collaboration Licenses – not always free to useLicenses – not always free to use
Examples of Open Examples of Open SourceSource LinuxLinux ApacheApache MySQLMySQL PostegreSQLPostegreSQL PHPPHP
FirefoxFirefox OpenOfficeOpenOffice DOSBoxDOSBox AzureusAzureus wxWidgetswxWidgets
Making & Saving Making & Saving MoneyMoney Use open sourceUse open source Sell services based on open Sell services based on open
sourcesource Provide self-supportProvide self-support Provide support to othersProvide support to others Provide trainingProvide training Write books or articlesWrite books or articles
My experience with My experience with O.S.O.S. Web hosting: OxONetWeb hosting: OxONet Application development: BitWise Application development: BitWise
IMIM Written a book & article: Written a book & article:
wxWidgetswxWidgets
OxONet - OverviewOxONet - Overview
Web hosting & design since 1999Web hosting & design since 1999 LAMP and moreLAMP and more No cost for software (except…)No cost for software (except…) Low startup costLow startup cost
OxONet – Making OxONet – Making moneymoney Configure “off the shelf” free softwareConfigure “off the shelf” free software Provide bandwidth & space (not free!)Provide bandwidth & space (not free!) Sell to manySell to many Our costs:Our costs:
– KnowledgeKnowledge– TimeTime– HardwareHardware– BandwidthBandwidth
OxONet – O.S. UsedOxONet – O.S. Used
LinuxLinux ApacheApache MySQLMySQL PostgreSQLPostgreSQL phpphp PerlPerl RubyRuby
Redhat Linux ES Redhat Linux ES 4.04.0
SendmailSendmail WebalizerWebalizer ClamavClamav SpamAssassinSpamAssassin MailmanMailman SquirrelMailSquirrelMail
OxONet – CaveatsOxONet – Caveats
Providing supportProviding support Availability & reliabilityAvailability & reliability Maintaining hardware & softwareMaintaining hardware & software Support Support forfor us us Horror storyHorror story
BitWise IM - OverviewBitWise IM - Overview
Instant messaging serviceInstant messaging service Professional version for businessProfessional version for business Developed using mostly open Developed using mostly open
sourcesource
BitWise – Making BitWise – Making MoneyMoney Provide secure IM to businessProvide secure IM to business Provide premium IM to individualsProvide premium IM to individuals Software and service create valueSoftware and service create value
BitWise – O.S. UsedBitWise – O.S. Used
wxWidgetswxWidgets Crypto++Crypto++ SpeexSpeex PortAudioPortAudio zlibzlib tiff, jpg, pngtiff, jpg, png GTKGTK
gcc / gdbgcc / gdb KDevelopKDevelop cvscvs sshssh phpBBphpBB phpMyAdminphpMyAdmin MediaWikiMediaWiki
BitWise - ProblemsBitWise - Problems
Sub-optimal development Sub-optimal development conditionsconditions
Lack of documentation & supportLack of documentation & support Open source can be abandonedOpen source can be abandoned Waste time in source codeWaste time in source code
BitWise - CaveatsBitWise - Caveats
Support, availabilitySupport, availability Time costTime cost AdvertisingAdvertising ScrutinyScrutiny
wxWidgets - OverviewwxWidgets - Overview
Cross-platform GUI libraryCross-platform GUI library Open source, generous licenseOpen source, generous license Used to develop BitWiseUsed to develop BitWise
wxWidgets wxWidgets InvolvementInvolvement UserUser Bug reportsBug reports PatchesPatches Bug & patch managerBug & patch manager CVS accessCVS access BookBook GuruGuru
wxWidgets – Making $wxWidgets – Making $
Write programsWrite programs Write books & articlesWrite books & articles Future – paid support?Future – paid support? Future – advocate?Future – advocate?
wxWidgets – CaveatswxWidgets – Caveats
No official supportNo official support Meandering goals & directionsMeandering goals & directions Lack of financingLack of financing Sometimes incompleteSometimes incomplete
NHibernate - A Case NHibernate - A Case Study - OverviewStudy - Overview BackgroundBackground ImplementationImplementation Advantages/DisadvantagesAdvantages/Disadvantages QuestionsQuestions
Background – Tiered Background – Tiered architecture architecture
UI Layer
Business Layer
Data Layer
Entitie
s
Web Service Interfac
e
Background – Common Background – Common App Problem: Dynamic App Problem: Dynamic SQLSQL Older design patterns (solutions)Older design patterns (solutions)
– 1. Dynamically build SQL strings1. Dynamically build SQL strings ProblemsProblems
– SQL InjectionSQL Injection– UI Managing business rulesUI Managing business rules– Not parameterized SQL so does not get cached in Not parameterized SQL so does not get cached in
DBDB
– 2. Stored Procedures2. Stored Procedures ProblemsProblems
– Need different SP for virtually every use caseNeed different SP for virtually every use case– Most developers can model data but aren’t DBA’sMost developers can model data but aren’t DBA’s– Biz rules still being managed mostly in a different Biz rules still being managed mostly in a different
tiertier– NOT AGILE!!!NOT AGILE!!!
Implementation – Implementation – Common App Problem: Common App Problem: Dynamic SQLDynamic SQL The ORM solution (NHibernate)The ORM solution (NHibernate)
– Map business entities directly to database tables Map business entities directly to database tables using XML (Code Generation)using XML (Code Generation)
– Write a transaction manager class to manage Write a transaction manager class to manage NHibernate transactions that accepts an “Entity NHibernate transactions that accepts an “Entity Base” classBase” class
– FOCUS ON UI DEVELOPMENTFOCUS ON UI DEVELOPMENT Current project over 1000 use-casesCurrent project over 1000 use-cases
– FOCUS ON BUSSINESS RULESFOCUS ON BUSSINESS RULES Current project over 8,100 biz rulesCurrent project over 8,100 biz rules
– FOCUS ON SPEED TO VALUEFOCUS ON SPEED TO VALUE Iterative development – easy to leave selected Iterative development – easy to leave selected
functionality out in order to get something valuable for functionality out in order to get something valuable for the client quicklythe client quickly
Implementation – Implementation – Getting data out of the Getting data out of the DBDB Inherit all entities from a base classInherit all entities from a base class Code in terms of objects not tablesCode in terms of objects not tables Criteria classes provided for youCriteria classes provided for you
– Operators for >, <, !=, ==, etc.Operators for >, <, !=, ==, etc.– Specialized database operatorsSpecialized database operators– Mapped relationships implicitly filter based on Mapped relationships implicitly filter based on
criteriacriteria Transaction manager returns entities and Transaction manager returns entities and
lists of entities as opposed to data tables and lists of entities as opposed to data tables and data rows which are cumbersomedata rows which are cumbersome
HQL – rarely necessaryHQL – rarely necessary
Implementation – Implementation – Putting data in the DBPutting data in the DB Simply call Save(EntityBase) on the Simply call Save(EntityBase) on the
transaction manager object transaction manager object – Is designed to be smart enough to know Is designed to be smart enough to know
whether add or updatewhether add or update NHibernate uses XML files previously NHibernate uses XML files previously
generated to determine key properties generated to determine key properties on objecton object
One-To-Many, Many-To-One One-To-Many, Many-To-One relationships are supportedrelationships are supported
Many-To-Many (join tables) are Many-To-Many (join tables) are implemented as a separate entity implemented as a separate entity objectsobjects
Advantages and Advantages and DisadvantagesDisadvantages AdvantagesAdvantages
– FREE!!FREE!!– Super AgileSuper Agile– Transactional biz rules are managed Transactional biz rules are managed
in the proper layerin the proper layer DisadvantagesDisadvantages
– Lack of support/documentationLack of support/documentation
Issues in Open SourceIssues in Open Source
Is making a profit on open source “wrong?”Is making a profit on open source “wrong?” Will open source kill commercial software Will open source kill commercial software
development?development? Does open source produce better software?Does open source produce better software? Fast, Right, Cheap. Pick 2. Does this apply?Fast, Right, Cheap. Pick 2. Does this apply? Does lack of supervision / management hurt?Does lack of supervision / management hurt? Can open source provide support needed by Can open source provide support needed by
big business?big business? Will open source kill innovation by Will open source kill innovation by
eliminating R&D funding?eliminating R&D funding?