Upload
lekhue
View
219
Download
4
Embed Size (px)
Citation preview
9/22/2016
1
Welcome to the Waitless World
© 2015 IBM Corporation
The open book: Open Source on IBM i
Jesse R. Gorzinski, MBA
IBM i Emerging Solutions
Session ID:
Agenda Key:
© 2016 IBM Corporation 4
http://blog.codeeval.com/codeevalblog/2016/2/2/most-popular-coding-languages-of-2016
9/22/2016
2
© 2016 IBM Corporation
Popular Open Source Languages: Tiobe
http://www.tiobe.com/tiobe-index/
© 2016 IBM Corporation
Business value?
• Ease in finding skills
• Time to market
• May not have to change core business! Just use
OSS to extend it to web services, mobile, etc.
• It's very easy to enable web and mobile
technologies.
9/22/2016
3
© 2016 IBM Corporation
What is IBM i doing?
9
© 2016 IBM Corporation
Open Source on i – a new concept?
• First open-source IBM i project was JTOpen (1998)
• People have been using perl since at least 1998
• Apache HTTP server shipped since 2002
• Also shipped in the past/present:
– OpenSSL
– OpenSSH
– Apache Tomcat
– Samba
9/22/2016
4
© 2016 IBM Corporation
Enabling software engineering on open source
languages/runtimes
• Several new languages added. More in the future?
• New tools delivered
11
© 2016 IBM Corporation
Enabling easy extension of OSS for IBM i - XMLService
• Allows access to IBM i programs, service programs, shell commands, and
even DB2!
• Can be called locally or remotely, stateful or stateless, very flexible!
• Toolkits are written for several languages, to make it even easier!
12
9/22/2016
5
© 2016 IBM Corporation
Enabling easy extension of OSS for IBM i – IBM i Services
• Access system data through SQL!
– PTF
– Security
– Message Handling
– Librarian
– Work Management
– Communication
– Storage
– Product
– Spool
– System Health
– Journal
– Java
• More being continuously added
http://ibm.biz/DB2foriServices
© 2016 IBM Corporation
What IBM i is doing –partnership with Zend
(RogueWave)
• Zend Server for i
– Preloaded with IBM i 7.1 and 6.1
– One year of Silver Support from Zend
• Zend Server Development edition
– Reduced cost – include Z-Ray and other dev tools
• Zend Server for i
– Available from Zend
• Zend Studio for i
– Eclipse-based development environment
– One year of Silver support from Zend
• Zend DBi
– MySQL implementation for IBM i
– DB2 Storage Engine enables data storage in DB2
15
9/22/2016
6
© 2016 IBM Corporation
IBM i Shops using
ALLIED
BEVERAGE
GROUP
© 2016 IBM Corporation
What IBM i is doing – partnership with PowerRuby
• What is PowerRuby?– Freely available and commercially supported port of the Ruby language
– Includes supporting infrastructure (i.e. Rails) for running Ruby web applications on IBM i
– Available for download from PowerRuby.com
– Includes native DB2 database driver – MySQL not necessary
– Integrates with XMLSERVICE for access to IBM i programs and objects
• Components– Ruby 2.0.0 and 1.9.3 (MRI implementation, a.k.a CRuby)
– ibm_db (IBM supported - http://rubyforge.org/projects/rubyibm/)
– Apache + Thin ← the web server stack (more Ruby app servers options coming)
– Rails 3.2.x and 4.0.0 (Coffeescript support in the works)
• Learn more– PowerRuby.com for updates and news
– twitter.com/rubyonpower
17
9/22/2016
7
© 2016 IBM Corporation
Open Source for IBM i
– New LPO – 5733OPS Open Source for IBM i
o New license program option
o Designed for Open Source offerings on IBM i
© 2016 IBM Corporation
• 5733-OPS has 15 options available NOW!
• The options themselves are placeholders
• Function will be delivered via PTF
• We now have a PTF group for each
IBM i release!!
SF99123 (7.1)
SF99223 (7.2)
SF99225 (7.3)
5733-OPS: a bit unconventional?
9/22/2016
8
© 2016 IBM Corporation
Things we deliver with every new language/version
• FastCGI
• Allows fast connection from HTTP server to
backend PASE environment
• ILE Object Toolkit
• Toolkit for each environment to easily allow
connections to ILE objects and information – Built
on XMLService
• SQL Connector
• Easy integrated (from the open source language)
way to transfer data to and from DB2 for i
leveraging SQL
© 2016 IBM Corporation
Node.JS – 5733OPS Option 1
• What’s Node.JS?
– Simply put, Node.js is server-side JavaScript
– Based on Google Chrome V8 Engine.
• Why Node.JS?
– Great for web development!
o JavaScript is already widely used on the client side of web
development
o Can now do both
– High Performance
o Node.js is designed to maximize throughput and efficiency.
– Increasing popularity:
o More than 70,000 third-party extensions are available on
www.npmjs.org now.
9/22/2016
9
© 2016 IBM Corporation
$ npm install [email protected] node_modules/jshint├── [email protected]├── [email protected]├── [email protected]├── [email protected] ([email protected])├── [email protected] ([email protected], [email protected])├── [email protected]├── [email protected] ([email protected])└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
$ ls node_modules/jshint
$ ls node_modules/jshint/README.md bin data dist node_modules package.json src
$ ls node_modules/jshint/node_modules/cli exit minimatch strip-json-comments console-browserify htmlparser2 shelljs underscore
Leverage the community with
Node Package Manager (npm)
© 2016 IBM Corporation
Python 3 – 5733OPS Option 2
• What’s Python?
– A powerful general-purpose language
– Interpreted
• Why Python?
– Easy to use
o Language is designed to be a "fun" language
o Can be considered the 'CL language for the modern programmer'
o Easy for IBM i programmers to learn
– Very, very popular
o Over 85,000 third-party extensions are available on http://pypi.org
9/22/2016
10
© 2016 IBM Corporation
Leverage the community with
the Preferred Installer for Python (pip/pip3)
© 2016 IBM Corporation
Python success stories!
• https://www.python.org/about/success/
• 41+ real-life success stories across multiple domains
9/22/2016
11
© 2016 IBM Corporation
"Now, it's quite simple to defend yourself against a man armed with a banana.
First of all you force him to drop the banana; then, second, you eat the banana,
thus disarming him. You have now rendered him helpless."
"This parrot is no more! He has ceased to be!"
"I’m sorry to have kept you waiting, but I’m afraid my walk has become rather
sillier recently."
"I don't like Spam©!"
"That rabbit's dynamite!"
Origin of the "Python" name?
© 2016 IBM Corporation
Ranger
Bobby
Lefty
Wild Bill
chroot /QOpenSys/bobby
/usr/bin/bsh
chroot /QOpenSys/ranger
/usr/bin/bsh
chroot /QOpenSys/lefty /usr/bin/bsh
chroot /QOpenSys/wildbill
/usr/bin/bsh
No problem, but you are not going to mess up my system, so chroot you.
'/' is ...
/QOpenSys/wildbill/(*)
'/' is …
/QOpenSys/lefty/(*)
'/' is …
/QOpenSys/bobby/(*)
'/' is …
/QOpenSys/ranger/(*)
No chroot, '/' is … /(*)admin
( http://yips.idevcloud.com/wiki/index.php/PASE/OpenSourceBeta )
IBM i chroot (change '/' location), 5733OPS Option 3
9/22/2016
12
© 2016 IBM Corporation
IBM i compilation environment, 5733OPS Option 3
• Scripts to set up gcc and other popular build tools
• PASE has XLC, not free, and
not very compatible for Open Source
• Not only can you get a real build environment, you can do so inside a "chroot"
and have isolated, sandboxed versions of the build environment!
© 2016 IBM Corporation
5733 OPS – Lots delivered in June 2016!
• Option 1 – Node.JS 2.x
• Option 2 - Python 3
• Option 3 – GCC / chroot
29
Enhanced
9/22/2016
13
© 2016 IBM Corporation
June 2016 enhancements to option 2 – Python 3.4
• Python v3.4 was initially delivered June 2015
• Key updates in June
– Wheel (updated packaging mechanism)
– Package add-ons as wheels
– Rebuild with gcc technology to allow easier integration with community
– Better support for Django, a powerful web framework for Python
o Django requires a database
o Only solution previously was to use Zend DBi (out of process),
PyMySQL, and a spec of MySQL that doesn't meet Django
requirements
o Now we have a solution that goes straight to DB2
© 2016 IBM Corporation
5733 OPS – Lots delivered in June 2016!
• Option 1 – Node.JS 2.x
• Option 2 - Python 3.4
• Option 3 – GCC / chroot
• Option 4 – Python 2.7
• Option 5 – Node.JS 4.x
• Option 6 – Git
• Option 7 – Tools
• Option 8 – Orion
• Option 9 – cloud-init
31
New
9/22/2016
14
© 2016 IBM Corporation
Option 4 – Python 2.7
• Python v2.7 (option 4) to be delivered 1H2015
– initial delivery, built with GCC
– Wheel
– toolkit and database connector
– Why?
o Python 2 and Python 3 are not fully compatible
o Python 3 not fully accepted by the Python community
o Many applications still built on Python 2
© 2016 IBM Corporation
Option 5 – Node v4
• Previously shipped Node.js v0.x (option 1)
• Node v4 move is important
– New Javascript engine (much better performance)
– New Javascript language features (classes, among other things)
33
9/22/2016
15
© 2016 IBM Corporation
Option 6- Git
• Open Source distributed version control system
• Source control for virtually any language
• Powerful and flexible
• Can have hooks to perform custom actions when new code is integrated
• Already in use in the IBM i community
34
© 2016 IBM Corporation
Option 7 - Tools
• Some of the packages downloaded via GCC tool kit are core
to the success of Open Source development for IBM i
• In June, we shipped key packages
– bash
– zip
– unzip
• Others that are being considered…
– shellinabox
– gzip
– bz2
– tar
– perl35
9/22/2016
16
© 2016 IBM Corporation
shellinabox – future?
• Candidate for OPS option 7
• Access an SSH terminal through virtually any web browser
• No browser plugins required, just basic CSS and JavaScript support
© 2016 IBM Corporation
Option 8 – Eclipse Orion
• Provides a web enabled editor interface
• Rich git integration
• BlueMix integration
• Targeting Node, Python and Modern RPG developers
• Not meant to compete with RDi, more complementary
– Hope to attract and supplant more green screen SEU users
• Contains base open source Orion with a RPG syntax highlighter supporting Fully
Free Form RPG only (along with an SQL subset)
• Integration story with RDi will be based on Git
37
9/22/2016
17
© 2016 IBM Corporation
Option 9 – Cloud-init for IBM i
• Cloud-init is a script that enables virtual machine activation and initialization
• Additive to the PowerVC/PowerVM offering
http://www.ibm.com/support/knowledgecenter/SSXK2N_1.3.1/com.ibm.powerv
c.standard.help.doc/powervc_install_cloudinit_ibmi_hmc.html
Welcome to the Waitless World
© 2015 IBM Corporation
Which language to choose?
9/22/2016
18
© 2016 IBM Corporation
Ruby
• The language:
– Everything (yes, everything) is an object
– Blocks (closures) integral to the language
– Easy to create domain-specific languages
• Pros:
– Powerful language
– Very expressive, “Beautiful”
– Rails very popular web development
• Cons:
– Not as popular as Python outside of web
– Language warts not tolerated, will break things to make them better → you
must keep up
– Paradigm shift from traditional RPG/C/Java
© 2016 IBM Corporation
Python
• The language
– Indentation determines block level (love it or hate it)
– Easy to integrate with C/C++ code → many packages created
• Pros
– Easy to pick up for RPG/C/Java developers
– “Conservative”: slow change, compatibility a goal, straight-forward syntax
– Many packages available
– Has an IBM i toolkit with direct-call capability (iLibCall)
– Taught in many colleges
• Cons
– Not as popular for web (but capable: Django, Bottle)
– Python 2 vs Python 3 incompatibilities (improving)
9/22/2016
19
© 2016 IBM Corporation
Node.JS (JavaScript)
• The language
– Curly-brace style language (C/C++/Java)
– Prototype-based, not Class-based (no inheritance)
– Highly asynchronous, event-driven
• Pros
– Use same language for frontend and backend
– Lots of buzz around Node.js now
– Node.js uses JIT, not interpreted (good performance)
• Cons
– Syntax is “awful” (projects to compile to JS: CoffeeScript, TypeScript, …)
– Asynchronous more difficult than synchronous, requires different mindset,
“Callback hell” (Promises improves things)
– Event-driven IO not unique to Node, see EventMachine (Ruby), Twisted
(Python), ...
– Not as popular outside of web
© 2016 IBM Corporation
PHP
• The language
– Often embedded into HTML
• Pros
– The "granddaddy" of open source languages on i
– The most IBM i shops running PHP, the most community
– Comes with a robust Development Environment
– Can get a support contract from Zend (1 year free)
• Cons
– Currently not as quickly-moving
– Typically only used for serving up web pages
9/22/2016
20
© 2016 IBM Corporation
The right answer?
• It depends….
• Things to consider:
– popularity/momentum
– packages available
– What are you using it for? (typically wouldn't use Node.JS or PHP for
general purpose scripting, for instance)
– tooling
– skills
© 2016 IBM Corporation
The wrong answer?
• There is no wrong answer!!
• likely not your last language decision…
9/22/2016
21
Welcome to the Waitless World
© 2015 IBM Corporation
Open Source – an IBM icommunity
© 2016 IBM Corporation
some of the key community members…
• Aaron Bartell
• Bill Gravelle
• Jack Woehr
• Mike Pavlak
• Alan Seiden
• Dave Dressler
• Pete Helgren
• Liam Allen
9/22/2016
22
Welcome to the Waitless World
© 2015 IBM Corporation
IBM i Open Source projects
© 2016 IBM Corporation
Dash for IBM i
• Written entirely in Node.JS
• Strongly leverages IBM i Services through the DB2 connector
9/22/2016
24
© 2016 IBM Corporation
Dash for IBM i
© 2016 IBM Corporation
Python toolkit for i
• Built on top of XMLService, like the other "toolkit" offerings
• Many other subcomponents of 5733OPS are open source (like the Python DB2
connector!)
• https://bitbucket.org/litmis/python-itoolkit
9/22/2016
25
© 2016 IBM Corporation
Swift toolkit for i
• Talk to IBM i directly from Swift applications (yes, even your iPhone!)
• https://t.co/RyCoQHT6ft
© 2016 IBM Corporation
vlang-rpg
• Embed PHP within RPG
• Allow PHP to access and manipulate RPG variables!
https://bitbucket.org/inext/vlang-rpg
RPG
9/22/2016
26
© 2016 IBM Corporation
Ublu
• A programming language, made for IBM i!
• An "object-disoriented" language
• implemented in Java, so runs anywhere with Java runtime
• https://github.com/jwoehr/ublu
© 2016 IBM Corporation
Relic package manager
• Allows for easy builds of ILE Open Source
• Download packages from the internet in one command (RELICGET)
• Will download and compile a package for you - no need to touch the source
• Usable as a build tool (*BUILDONLY)
9/22/2016
27
© 2016 IBM Corporation
Want to open source your ILE code?
• You can integrate with Relic Package Manager!
• Steps are simple:
1) Get your source code into GitHub
(Relic comes with a SYNC tool to make this
easy)
2) Create a build file
(Liam can help with this if needed)
http://www.shieldadvanced.com/Blog/application-
modernization/adding-a-bldrelic-clp-to-the-relic-
package-manager/
© 2016 IBM Corporation
9/22/2016
29
© 2016 IBM Corporation
CRTFRMSTMF
• The desire:
– store source in IFS
• The problem:
– many CRT____ commands don't support IFS paths! (e.g.: CRTCLMOD)
Open source to the rescue!! CRTFRMSTMF, written in RPG
https://bitbucket.org/BrianGarland/crtfrmstmf
(by the way, also wired into the Relic package manager)
© 2016 IBM Corporation
OSSILE
• Created with partnership to host more ILE open source code
• Populated today with UDTF's from Christian Jørgensen
– Machine info
– Cartridge info
– Image catalog details
• Will absort CRTFRMSTMF
• Code queued up with help from the Large User Group (LUG),
more specifically: Michael P. Scott
• Key points:
– Will compile into a library called "OSSILE"
– Will be integrated with the Relic Package manager
https://github.com/OSSILE/OSSILE
9/22/2016
30
© 2016 IBM Corporation
OSSILE
• Coming….
– User-defined table functions (UDTF's). Nature of services includes:
o Process Control Locks
o Interrogate all kinds of IBM i object types
o Activation group garbage collector
o Table Spaces
o XML Services
o Block Fetching
– Other handy utilities
o CLRPFMSBX – Clear a physical file even if it has triggers or
referential integrity constraints.
o ENDOBJLCK – An interactive command that collects all the jobs that
are holding locks on an object and ends them elegantly
o GENSRVLYR – A template-based code generator that builds a
service program for a table, providing all the basic CRUDE
operations plus Table Space support
© 2016 IBM Corporation
Many, many more…..
• Non-exhaustive list can be found here:
https://bitbucket.org/ibmi/opensource/wiki/Home#markdown-header-ibm-i-
open-source-repos-alphabetical
9/22/2016
31
© 2016 IBM Corporation
Many, many more…..
• Non-exhaustive list can be found here:
https://bitbucket.org/ibmi/opensource/wiki/Home#markdown-header-ibm-i-
open-source-repos-alphabetical
© 2016 IBM Corporation
Is IBM i contributing to open source projects?
9/22/2016
32
© 2016 IBM Corporation
Is IBM i contributing to open source projects? YES!!
• GNU tar
• OpenSSL
• OpenSSH
• git
• Bottle.py
• PumpkinLB
• python-itoolkit
• Dash for IBM i
• db2sock
• ibmichroot
• db2util
• Python
• Python-ibm-db
• swift-itoolkit
• portlibfori
• ibmiperzl
• ruby-itoolkit
• nodejs-itoolkit
• ruby-ibm_db
• xmlservice_examples
• OSSILE
• -ibmi_netstat_py
• python-for-IBM-i-examples
• shellinabox
• vlang_rpg
Welcome to the Waitless World
© 2015 IBM Corporation
How can I contribute?
9/22/2016
33
© 2016 IBM Corporation
Use it!
© 2016 IBM Corporation
Submit RFE's
• https://www.ibm.com/developerworks/rfe/
• Use product "IBM i", component "Pase/Open Source"
9/22/2016
34
© 2016 IBM Corporation
Submit RFE's
© 2016 IBM Corporation
Participate in the community!
• Ask questions
• Give advice
• Share code, tips, tricks, etc!
9/22/2016
35
© 2016 IBM Corporation
OPENSOURCE mailing list at Midrange
• midrange.com hosts a very well-established community covering a wide array
of IBM i topics. There's an open source one!
http://archive.midrange.com/opensource/
© 2016 IBM Corporation
LinkedIn IBM i OSS group
• Great starting point for the latest news and events.
• Large member base
https://www.linkedin.com/groups/8531863
9/22/2016
36
© 2016 IBM Corporation
Ryver IBM i OSS team
• Forums, chat, links to social media
• Invite only!!
• Invite link (here you go):
https://ibmioss.ryver.com/application/signup/members/9tJsXDG7_iSSi1Q
© 2016 IBM Corporation
Ryver IBM i OSS team
9/22/2016
37
© 2016 IBM Corporation
gitter chat at Club Seiden
https://gitter.im/Club-Seiden/IBMiOSS_Public
© 2016 IBM Corporation
Club Seiden forums
• http://club.alanseiden.com/community/
9/22/2016
38
© 2016 IBM Corporation
• For the latest news:
– watch #IBMiOSS– Follow @IBMJesseG and other community members
• Information or questions, just tweet with #IBMiOSS!
© 2016 IBM Corporation
Community interlocks and panel discussions
• Community-hosted conference calls and panel discussions.
• Most recent used crowdcast.io technology
– Live audio and webcam
– Live chat
– Live Q&A with voting system
9/22/2016
39
© 2016 IBM Corporation
Write and contribute code
• Remember: lots of OSS repositories!
• Unsure how to help? Just ask!
© 2016 IBM Corporation
Spread the word!
• Write or contribute to articles, blogs, etc.
• Speak at user groups and conferences
• Tweet with the #IBMiOSS hashtag!
9/22/2016
40
© 2016 IBM Corporation
Open Source on IBM i
© 2016 IBM Corporation
Open Source on IBM i
• Apache
• OpenSSL
• OpenSSH
• JTOpen
• etc.
Legacyofferings
9/22/2016
41
© 2016 IBM Corporation
Open Source on IBM i
• Python
• Node.JS
• git
• Orion
• etc.
• Apache
• OpenSSL
• OpenSSH
• JTOpen
• etc.
Legacyofferings
5733OPS
© 2016 IBM Corporation
Open Source on IBM i
• XMLService
• Language toolkits
• IBM i services (SQL)
• etc.
• Python
• Node.JS
• git
• Orion
• etc.
• Apache
• OpenSSL
• OpenSSH
• JTOpen
• etc.
Legacyofferings
5733OPS
Integration
9/22/2016
42
© 2016 IBM Corporation
Open Source on IBM i
• XMLService
• Language toolkits
• IBM i services (SQL)
• etc.
• Many i OSS projects
• Active collaboration
• Blogs, articles
• etc.
• Python
• Node.JS
• git
• Orion
• etc.
• Apache
• OpenSSL
• OpenSSH
• JTOpen
• etc.
Legacyofferings
5733OPS
IntegrationCommunity
Welcome to the Waitless World
© 2015 IBM Corporation