Новый InterSystems: open-source, митапы, хакатоны
-
Upload
timur-safin -
Category
Software
-
view
207 -
download
2
Transcript of Новый InterSystems: open-source, митапы, хакатоны
Тимур Сафин
Новый InterSystems:open-source,митапы,хакатоны
• Apache
• Eclipse(Atelier)
• Linux, gnu tools like gcc, gdb &
friends
• Python, Perl
• Ant/maven/gradle
• Hibernate
• iODBC/unixODBC (ODBC
Managers)
• Browsers: Firefox + Chrome
• Enterprise Framework(EF)
• JS libs (jQuery,….)
• Docker (docker scripts for
provisioning, etc.)
• …
Open-Source в InterSystems
• Проект Atelier делает многое по новому
–Open-source Eclipse-based окружение
–Работа с внешними контрибьютерами через GitHub
–Code review, Continuous Integration, всё по-модному
–Облачное тестирование через Docker
–Исходники Atelier будут опубликованы*
InterSystems меняется
* Скорее всего. Таковы текущие планы
• InterSystems уже на GitHub
*Пока нет легкого способа найти исходники Caché
ObjectScript на GitHub
Open source сообщество
Hub # of forks # of repos
Intersystems-ru 46 48
Intersystems 29 4
Intersystems-ib 1 5
• Reincarnation of MUGs
• Local. No remote commuting is needed
• After-hours, typically since 6-7PM
• 2 presentations is ideal (more is acceptable)
• Ideally should be:
–driven by local community members
–Topics from community, not ISC only
–hosted at partners’ territory
• The cheaper - the better!
Meetups
Meetups
• 1st InterSystems hackathon
• 10 proposed ideas
• 7 teams formed and started
• 4 remarkable results
Hackathon
http://writeimagejournal.com/?p=1912
• [Yet another] JavaScript ODM for Caché
https://github.com/ZitRos/cjs
•Nikita Savchenko (GitHub @ZitRos)
•Anton Gnibeda (GitHub @Gnibeda)
• Irene Mikhailova (GitHub @Gra-ach)
Hackathon: 1st place
http://writeimagejournal.com/?p=1912
http://writeimagejournal.com/?p=1912
cjs.connector.connect("http://172.16.2.172:57776/", "Samples", ["School2015"], function (cache) { var p = new cache.School2015.Participant(); p.Name = "Anton"; p.Surname = "Gnibeda"; p.$save(function(obj) { console.log("Participant with name " + obj.name + " saved!"); }); cache.School2015.Group.openById(1, function (group) { console.log("Points: " + group.Points); }); cache.School2015.Group.AddPoints(1, 1); cache.School2015.Group.openById(1, function (group) { group.PrintInfo(function (res) { console.log(res); }); }); cache.School2015.Participant .query() .where("Carma < 100 OR Carma > 140") .where("$id > 10") .orderByDesc("Carma") .orderBy("Name") .exec(function(res) { console.table(res); }); });
• Spatial indices in Caché -
https://github.com/intersystems-ru/spatialindex
•Andrey Rechitsky (GitHub @arechitsky)
•Alexander Koblov (GitHub @adaptun)
•Alexander Pogrebnikov (GitHub @apogrebnikov)
Hackathon: 2nd place
http://writeimagejournal.com/?p=1912
Index x1f on (Latitude,Longitude) As SpatialIndex.Index;
Then you can query table with defined index.
2 types of queries implemented: window (rectangle) and radius (ellipse).
SELECT *
FROM SpatialIndex.Test
WHERE %ID %FIND search_index(x1F,'window','minx=56,miny=56,maxx=57,maxy=57')
SELECT *
FROM SpatialIndex.Test
WHERE %ID %FIND search_index(x1F,'radius','x=55,y=55,radius=2')
and name %StartsWith 'Z'
SELECT *
FROM SpatialIndex.Test
WHERE %ID %FIND search_index(x1F,'radius','x=55,y=55,radiusX=2,radiusY=2')
and name %StartsWith 'Z'
Hackathon: 3rd place• Call graph visualization
https://github.com/intersystems-ru/callsmap•Oleg Dmitrovich (GitHub @doublefint)
•Evgenia Litvin
•Alexander Tsvetkov (GitHub @TsvetkovAV)
• Visualizes call dependencies graph
http://writeimagejournal.com/?p=1912
• Database Blocks Explorer for InterSystems Caché -
https://github.com/intersystems-ru/CacheBlocksExplorer
•Dmitry Maslennikov (GitHub @daimor)
•Olga Kazantseva
• Visualizes global B*-tree structure and allocation map
Hackathon: 3rd place
http://writeimagejournal.com/?p=1912
CacheBlocksExplorer – B*-tree
CacheBlocksExplorer – blocks map
This always starts with the people
doublefint
gnibeda
ZitRos
daimor
Package Manager
http://cpmteam.github.io/CPM/
do ^CPM
cpm install webterminal
We have full cycle in
CPM
(publish – install)
Where we are today?
Create/
modify
package
Export
XML/JSON
to staging
area
npm
publish to
repo
Package
search in
repo
Install
package
from repo
Creating Caché Package ManagerImplementation Update
• Which container format is the suitable for our packages?
– ZIP would be ideal
– But even Studio Project XML will fit the purpose
• even now it handles all interesting file types (CLS, RTN, INC, CSP, ZEN, CSS, GIF, etc.)
• Yes, XML is very inefficient, bloated, and keeps binary data as base64
(i.e. 3/2x length increase)
• But it’s not a big deal for initial step;
Container Format
Plans – December 2014
Which
Container?
ZIP
XML
Plans – December 2014
• What information should be in metadata?
– At least dependency on other packages (name, version, url);
– Anything from Node.js package.json could be reused by us, but;
• JSON is not yet natively supported now,
so could start from XML serialization of the same information (metainfo.xml)
Metadata File
{ "dependencies" :
{ "foo" : "1.0.0 - 2.9999.9999"
, "bar" : ">=1.0.2 <2.1.2"
, "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0"
, "asd" : "http://asdf.com/asdf.tar.gz"
, "til" : "~1.2"
, "elf" : "~1.2.3"
, "lat" : "latest"
, "dyl" : "file:../dyl"
}
}
Reality – March 2015
• We decided to use npm services for publishing to the server;
• It accepts package.json as metadata description;
• npm packs generated XML file to the .TGZ container which is being published to the
repo;
Container and metadata formats
export /minor
package
CPMpackage/package.json
package/package.xml
package/package.tgz
NPM/-/all/ - JSON index
CouchDB
Plans – December 2014
• There is tough problem to handle – dependency on a system packages which may be
presented only on some product flavors:
– iKnow,
– Ensemble
– DeepSee,
– TrakCare,
– HealthShare,
– particular version of product
• May mark this dependency in the general dependency list as “iKnow”, “Ensemble
2013.1+”, etc.
• But it’s too early to handle in the 1st iteration - we will revisit this later.
Dependency on a system classes
Dependencies
Not in V0.1
Reality – March 2015
Plans – December 2014
• From the practical prospective, taking into accountmultiple Caché platforms we should handle equally well(Windows, Linux, Mac OS X, or even VMS), and the factthat these FFI mechanisms are not yet officiallysupported, we should admit that they are not ready yet, and could not be recommended as a way to handledeploymenut of mixed C/COS packages.
• We are not implementing them in v1.0
[Cross-platform] binary modules
Not in V0.1
Reality – March 2015
[Cross-platform] binary modules
Plans – December 2014
• Having built-in mechanism for unit-testing has impacted
positively the whole stability of CPAN ecosystem.
–Package will not be installed at the user system unless it’s
passing internal testing;
• V1.0 will ignore unit-testing for a moment, but later, for binary
modules deployment we should have unit-testing working
Unit-testing
Unit-testing
Not in V0.1
Reality – March 2015
Plans – December 2014
• User experience is a big success booster, if system is inconvenient then it may be left
unnoticed*
• So both ways to invoke package manager should be working
– To invoke package manager shell from any namespace in Cache’ terminal, .e.g
– To install COS packages from command-line, e.g.
• Eventually these operation might be wrapped in GUI. Not in V1.0
Command-line access
do ^%CPM>install TOML-Parser
cpm install deepsee-mobile-server
• Command-line wrapper created
for Windows cpm.bat,
which invokes default Caché
instance with the command-line
options entered;
• Only single running instance
handled today;
Command-line access
Reality – March 2015
C:\Users\Timur\Documents\Intersystems\src\CPM\bin>cpm list
cpm-installer-sample 0.5.2simple-proj 0.4.2
C:\Users\Timur\Documents\Intersystems\src\CPM\bin>cpm list /verbose
cpm-installer-sample 0.5.2Sample.Address.clsSample.Company.clsSample.Customer.clsSample.Employee.clsSample.Person.clsSample.USZipCode.clsSample.Utils.clsSample.Vendor.clssimple.prj
simple-proj 0.4.2Sample.Address.CLSSample.Company.CLSSample.Customer.CLSSample.Employee.CLSSample.Person.CLS
Plans – December 2014
• There used to be old-dark times when every site had to handle DDoS on
their own way, and to keep geo-spread mirror network for their purposes;
• Now all is easily handled by VM host providers or special CDN providers:
– Amazon Azure, Google Cloud, etc;
– Amazon CloudFront, MaxCDN, etc;
• Once we have static files (distributions files, static html descriptions, static
images, etc) it could be easily handled by CDN;
• But… for community site we supposed to have some dynamic part which
will work with authors and new contributions
Advices are welcome how to handle this mix easily and in most effective way
Mirroring and CDN
Reality – March 2015
• We have selected CouchDB database hosting for keeping
packages metadata and their content;
• CouchDB is the JSON database store accessible via full RESTful
API;
• Same/similar database store is used for keeping NPM.js
repository;
–Thus we could use npm command-line utility for operations
with this store if repository redefined to ours;
Mirroring and CDN CouchDB repository
CouchDB repository
Reality – March 2015
Plans – December 2014
Suggested usage cases for V1.0
Package User COS System COS Binaries Good for v1.0
iKnowSocial Yes No No Good
Atom-COS-Studio Yes Yes Yes
(Atom +
extension)
Bad
WebTerminal No Yes No Good
CNA Yes No Yes
(callout module)
Bad
Coslint Yes
(deployed OBJ
code)
No No Probably
(deployed)
Actual usage cases for V0.1
Reality – March 2015
Package User COS System COS
Cache-tort-git Yes Yes
iKnowSocial Yes No
Monlbl-viewer Yes No
WebTerminal Yes Yes
Simple-proj Yes No
Cpm-installer-sample Yes No
• Help, H, ?
• Quit, Q
CPM Shell Commands
• List, L
CPM Shell Commands
• List /verbose
CPM Shell Commands
• Install, I
– From repo
– From local file(s)
CPM Shell Commands
• Package, P
– /create /from
– /description
– /author
CPM Shell Commands
CPM:CPM>> package /create cache-tort-git /author adaptun/from \path\to\cache-tort-git\Load of directory started on 03/16/2015 15:11:45
Loading file C:\Users\Timur\Documents\GitHub\cache-tort-git\cache-tort-git.prj…Imported project: cache-tort-git.prjLoading file C:\Users\Timur\Documents\GitHub\cache-tort-git\%SourceControl\Git…Imported class: %SourceControl.GitLoading file C:\Users\Timur\Documents\GitHub\cache-tort-git\%SourceControl\Git…Imported class: %SourceControl.Git.UtilsLoading file C:\Users\Timur\Documents\GitHub\cache-tort-git\csp\gitprojectset…Imported CSP/CSR or file: csp/cpm/gitprojectsettings.csp
Compilation started on 03/16/2015 15:11:46 with qualifiers 'ck', compiling 2 classes, using 4 worker jobsCompiling class %SourceControl.Git.UtilsCompiling class %SourceControl.Git
• Export, E
– /minor
– /major
CPM Shell Commands
CPM:CPM>> export /major cache-tort-gitcache-tort-git version set to: 0.1.1
Exporting package files to: C:\InterSystems\CacheLatest\.cpm\cache-tort-gitDeleted all files in the directory:
Exporting to XML started on 03/16/2015 15:12:04Exporting class: %SourceControl.Git.UtilsExporting class: %SourceControl.GitExporting project: cache-tort-git.prjExporting CSP/CSR or file: /csp/cpm/gitprojectsettings.cspExport finished successfully.
• Npm publish
Command-Line
C:\InterSystems\CacheLatest\.cpm\cache-tort-git>npm publish --registry http://cpmiscregistry.couchappy.com+ [email protected]
• Every respected repository has good name and an
appropriate avatar;
• We will appreciate any suggestion about CPM URL name and
avatar!
Name and avatar suggestions
Package Manager
http://cpmteam.github.io/CPM/
do ^CPM
cpm install webterminal