SlideShare uma empresa Scribd logo
1 de 41
Baixar para ler offline
Practical
API-Development
with
Gemstone/S
Marten Feldtmann
dimap - das Institut für Markt- und Politikforschung, Hamburg + Bonn
infratest-dimap, Berlin
GESS Software mbH, Hamburg
ESUG 2018
About
●
Marten Feldtmann
– Smalltalker since VisualWorks/Atari-ST
●
GESS Software, Hamburg
– http://www.gessgroup.de/
– CATI Software
●
dimap, Hamburg and infratest dimap, Berlin
– http://www.dimap.de, http://www.infratest-dimap.de/
– Election Results Presentation for Television, HbbTV and
Internet (ARD, SWR, WDR, NDR, RB, RBB, BR, ...)
Project/Circumstances
●
Left Smalltalk development around 2002
– VisualWorks with Argos/Versant (OODBMS-Experience)
●
General good experiences
●
Out of Smalltalk business over night (Versant)
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
How to get to current state
●
Current State
●
Evolution of a way to bring back Smalltalk
– Early Attempts to bring back Smalltalk
– Object-Modelling/DB-Layout/Code Generation
– Programming Language Support
– Runtime
– Infrastructure, Scheduling
●
No brilliant ideas – just work over years with an idea in
mind.
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Summary - Platform Overview
PUM
Sencha ExtJS
HTML/5
Cordova
Electron
Android
Browser
Windows
Linux
MacOS
Pi
Python 3.x
Java >=8
C# (Sync)
C# (Async)
Windows
Xamarin Android
Linux
Gemstone
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
First attempt
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
●
VA Smalltalk (2012/3)
– Seaside + JQueryMobile
●
headless task on each computer
●
0MQ networking client
– service detection
●
installation practise
●
ICU Unicode experience
●
IC packaging
●
Modular system
●
CouchDB
●
PDF service
Tribute to Pieter Hintjes
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
●
Peter Hintjens
●
1962 - 2016
●
Network Computing using 0MQ
●
Thank you !
Second attempt
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Demo
VA
+
ExtJS
:-)
Result
JS
could
be
the
way
In the other company
●
Other Company: dimap
– Project for HbbTV result presentation for an election in
Germany
●
Gemstone/S (3.1.0.x)
●
Sencha ExtJS (why not jQuery ?)
– Manual Coding ALL stuf
●
HTTP-Request
●
Took long time, but result were ok
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Product at the horizon
●
CEO asked for help on new CATI System
– First attempt failed completely
●
Lost on the RDBMS database side
●
No feeling for database
– „Rewrite from scratch“
– Look for suitable technology / system
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
CATI - System
Supervisoring
Project Management
Interviewing
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Product Goals - CATI
●
Initial target (reached)
– 100 interviewers, 10 supervisors, 10 project managers
●
Next target
– 400 interviewers, 50 supervisors, 10 project managers
●
Very different user profiles
– Interviewer – calling people, execute the interview
– Supervisor – managing interviewer, daily project work,
statistics
– Project Managers – overall project work, statistics
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
New Attempt
●
Database ?
●
Gemstone/S
– This was not a decision based on facts
– If you start such a project – have fun
●
Reaction
– Smalltalk ?
– License Question ?
●
Conditions
– No pure Smalltalk application
– Fallback considerations in case Gemstone/S is failing
– Consider developers in company
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
New Attempt
●
Overall Layout
– Central Database is Gemstone/S (free)
– System is running under Linux only
– API-based (if a central component is failing)
– UI is done in Javascript
●
Sencha ExtJS
– UI talks with database via HTTP
– Scripting language: Ruby (Hype !)
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Initial Technical Goal
●
Database Gemstone/S (starting with 3.1.0.5)
●
Two-Core license for about $1500
●
Code generation (as in our C# projects)
●
Optimal support for UI (Sencha ExtJS Javascript)
– Ajax-Calls (Single API Calls)
– Store (CRUD – up to four API calls)
– Class-based Javascript development
– Paging
– Sorting,
– Filtering
– Reminds me of the VASmalltalk Abt-Builder stuff, but at current state of the art UI
●
=> True seperated programming languages development
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Modelling and DB-Layout
●
Modelling / Generator Experiences
– Own modeller („PUM“ – Poor Users Modeller)
●
Technical oriented modelling tool
– Initially used for C#, started around 2003
– Written in VASmalltalk
– Very good experiences
– Very special programming model for us and results were more than ok
– Original C# model was „in-ram,distributed“ database oriented
– Now the programming model has to be changed:
●
Need for a special Gemstone/S model
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Programming Model – Decisions
●
Defining Programming Model for Gemstone/S
– Optimistic Locking, Revision Attribute if needed
– Initially supporting Swagger (later OpenAPI) – but now obsolete
– Initial REST oriented: PUT, DELETE, GET and POST
– Changed to POST only
– UTF8 only
– JSON only - one JSON parameter allowed in each call
– Two kind of API calls
●
Simple API-calls
●
CRUD structure support (4 API calls each CRUD)
– Depends only on NeoJSON, Zinc* stuff and base Gemstone/S
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Programming Model – Decisions
●
Data Type Definition in JSON
– Time (HH:MM:SS)
– Date (YYYY-MM-DD)
– DateTime (YYYY-MM-DDTHH:MM:SS.sss+xxxx)
– Enumeration (as strings)
– Flags (like Enums with „|“ as delimiter)
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Modelling – Decisions
●
Two Class Hierarchies (in DB)
– Domain oriented: persistent classes
– API oriented: transient classes
– Domain class may have several „corresponding“ api
classes
– API class may have one „corresponding“ domain class
●
Developer‘s world
– Gemstone/S - uses both hierarchies
– Client-developer – sees API classes only
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Modelling – Attributes
●
Base Types (int, string, ..)
●
Array of base types (not association)
●
„RcCounter“ support
●
Calculated attributes
– Either Smalltalk block defined in Tool
– Calling to-be-implemented method
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Modelling – Features
●
„Access-Path“
– Defines attributes based on access paths from a
domain object to an attribute of another object
– Very often used
●
Gemstone/S - „official“ way to access a far away attribute.
●
Enriches API classes to return more data than the base
domain objet
●
Circumvents API classes limitations
– API classes knows only their shadowing class attributes
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Modelling – Associations
●
Implemented as
– Bag, Dictionary, Array, Queue, Set, Sorted, Indexed
●
Additional hints
– Conflict, Identity, Large, Unique
●
Resulting classes
– Array, IdentitSet, Bag, StringKeyDictionary, RcQueue,
SortedCollection ….
– Index support
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Modelling – Associations
Dictionary Indexed Ordered Queue Set Sorted
conflict Dictionary
StringKeyDict.
IntegerKeyDct.
Set Array RcQueue Set Sorted-
Collection
identity Dictionary
StringKeyDict.
IntegerKeyDct.
IdentitySet Array RcQueue IdentitySet Sorted-
Collection
large Dictionary
StringKeyDict.
IntegerKeyDct.
Set Array RcQueue Set Sorted-
Collection
RcIdentitySet
IdentitySet
*Bag
unique Dictionary
StringKeyDict.
IntegerKeyDct.
Set Array RcQueue Set Sorted-
Collection
none Dictionary
StringKeyDict.
IntegerKeyDct.
Set Array RcQueue Set Sorted
Collection
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Gemstone – Query Facilities
●
Regardless of database type – queries are a MUST
– Gemstone/S possibilities (Hmm...)
●
Query Language
●
Filtering
●
Sorting
●
Multi-Index Searching
●
Offset, limit query etc …
●
SELECT * FROM TABLE WHERE x=? offset x limit 25
– Speed, Speed (e.g. Buffered-Tables in UI)
●
Presorted Structures ?
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Gemstone/S – PUM Runtime
●
Support
– Optimistic Locking
– Request Retries (up to 6 times)
●
Reduced errors at the client
●
Increasing concurrency
●
Increasing database load
– JSON serialization of parameter (API Classes)
– Application user session handling
– Logging, Benchmarking
– Support for 0MQ-Events on successful/failure transactions
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
PUM - Languages
●
Creates topaz-script (now: 12MB) with all source
code
– classes, association handling, migration support
– Index support
– Setup persistent domain tree, API calls
– Object initialization support
– Copying API Classes ↔ DomainClasses
– Placeholder for to-be-implemented methods
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
PUM – Languages - Javascript
●
Creates Javascript files for ExtJS
– Single Files for classes and stores
– Merging process of newly created files with extensions
in older files
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
PUM – Languages - Python
●
Initial scripting language candidate: Ruby
●
Change to: Python
– Create Language Runtime based on the initial Swagger
adaption of Swagger-Runtime
– Simulators (Raspi Rack), service-scripts, background-
tasks, API examples – all is written in Python
– PUM creates ALL code in ONE large file. Easy to copy
to a project.
– Very good choice
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
PUM – Languages – Java, C#
●
General
– Either language is used in company, must connect to product or to place a solution
within company
●
Java
– PUM Runtime written from scratch
●
External JSON library (Google)
– Delivered as jar files to API-developers
●
C# (Xamarin and/or .Net/Mono (Unity3D))
– PUM Runtime written from scratch
– External JSON library (Newtonsoft)
– Two generators (synchronous, asynchronous model)
– Delivered as Solution or dll to API-developers
– Base of documentation generation (MS Sandcastle + Print & Manual)
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
PUM – Examples
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
C#:
var anApiClient = new ApiClient( jsonHandler, "http://compi.mydomain.de");
var aCATIAPISessionCreationInfo = new CATIAPISessionCreationInfo();
aCATIAPISessionCreationInfo.login = "root";
aCATIAPISessionCreationInfo.password = "rootpassword";
aCATIAPISessionCreationInfo.customerName = "gess";
var aCATIAPISessionResultList = anApiClient.CreateSession(aCATIAPISessionCreationInfo);
Python:
aClient = swagger.ApiClient('', "http://compi.mydomain.de")
api = webcatiapi.RESTApi(aClient)
aCATIAPISessionCreationInfo = webcatiapi.CATIAPISessionCreationInfo()
aCATIAPISessionCreationInfo.login = „root“
aCATIAPISessionCreationInfo.password = „“rootpassword“
aCATIAPISessionCreationInfo.customerName = „gess“
aCATIAPISessionResultList = api.CreateSession( aCATIAPISessionCreationInfo)
From passive to active
●
Introduction of 0MQ intro product
– Backend developer defines events for special domain
situations in the model
– The backend developer places events in case of
commits and failures.
– External application are listening to these events
●
No polling, language independent
– Incredible experience and improvement of the system
layout
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Summary - Platform Overview
PUM
Sencha ExtJS
HTML/5
Cordova
Electron
Android
Browser
Windows
Linux
MacOS
Pi
Python 3.x
Java >=8
C# (Sync)
C# (Async)
Windows
Xamarin Android
Linux
Gemstone
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
System Layout - Backend
Gemstone/S
Apache/2
(Proxy WebSockets, HTTP(S), Load-Balancer)
EvPublisher
(Python, 0MQ)
0MQ-Event-Bus
Events< - > WebSocket
(Python, 0MQ)
Logger
(Python, 0MQ)
Apps 00 .. xx
(Python, Java, C#, 0MQ)
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Summary - Overall
●
Summary
– People get used to true multi-language development (MLD)
– Long – not easiest, lots of wrong decisions - path of evolution
– Great programming model on the backend due to Gemstone/S
– Smalltalk used in company
– Introduce Python as an accepted language ( :-( )
– Active database due to
●
0MQ-based Event structure (MLD)
●
WebSockets (MLD)
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Summary - License Costs/User/Year
●
€1050 (Microsoft, Windows)
– VisualStudio Pro. (C#)
●
€650 (JetBrains, Windows + Linux + Mac)
– WebStorm (Javascript), PyCharm (Python) and IntelliJ (Java)
●
€1800 – Sencha ExtJS Framework (HTML)
●
€500 – Sencha Test Framework
●
€1500 – Gemstone/S, 2-core license (Linux)
●
€500 - Help and Manual (Documentation)
●
Total: ~€4500 + (€1500 - €6000) for database (web licenses)
●
Too much ?
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Thank you !
Load Balancing
●
API-Call
– Try to group api calls in different pools of similiar time-
behaviour
– Longer API-call may block short calls
– Adding more Gemstone/S answering tasks is not always
a solution
– 2-core license is a limitation here
●
Apache/2, different algorithms for load balancing
– Bybusiness – not default
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Gemstone/S – SortedCollection
●
Workhorse
– Speed relates with size
– Enables presorted structure (Speed access !)
– Very fast operations possible
●
Browsing, Buffered Browsing
– Consider reverse logic (work at the end of the collection)
●
Alternative: IdentitySet with index support
– Slower
– Constant speed
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Gemstone/S – SortedCollection
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Gemstone/S
●
Interest in Gemstone/S increased ? No. Why ?
– Offers no support for developers in other language
– Offers no basic programming model or database API
– Consider Smalltalk as a datascripting language
– Everything has to be built from scratch
– Others choose PostgreSQL, SQLite, MySQL or MariaDB or
MongoDB
●
Usable from all other languages out of the box
●
User need mostly basic stuff from database: queries, storing etc …
– No Windows platform for development
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
Modelling – Features
●
„Search-Path“
– Define search paths from the root to a persistent object
– e.g. Address
●
Customer (customerID)
●
Project (projectID)
●
AddressContainer (containerID)
●
Address (addressID)
– Pretty boring for API-developer
●
Switching to „OOP“-Number under Gemstone/S
ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Physical Plans in Spark SQL
Physical Plans in Spark SQLPhysical Plans in Spark SQL
Physical Plans in Spark SQL
 
MySQL innoDB split and merge pages
MySQL innoDB split and merge pagesMySQL innoDB split and merge pages
MySQL innoDB split and merge pages
 
Intro To MongoDB
Intro To MongoDBIntro To MongoDB
Intro To MongoDB
 
Key-Value NoSQL Database
Key-Value NoSQL DatabaseKey-Value NoSQL Database
Key-Value NoSQL Database
 
Spark Summit EU talk by Ted Malaska
Spark Summit EU talk by Ted MalaskaSpark Summit EU talk by Ted Malaska
Spark Summit EU talk by Ted Malaska
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Approximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming ApplicationsApproximation Data Structures for Streaming Applications
Approximation Data Structures for Streaming Applications
 
Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...
Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...
Big Data Ecosystem at LinkedIn. Keynote talk at Big Data Innovators Gathering...
 
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
 
Building a Feature Store around Dataframes and Apache Spark
Building a Feature Store around Dataframes and Apache SparkBuilding a Feature Store around Dataframes and Apache Spark
Building a Feature Store around Dataframes and Apache Spark
 
Aggregated queries with Druid on terrabytes and petabytes of data
Aggregated queries with Druid on terrabytes and petabytes of dataAggregated queries with Druid on terrabytes and petabytes of data
Aggregated queries with Druid on terrabytes and petabytes of data
 
The Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization OpportunitiesThe Parquet Format and Performance Optimization Opportunities
The Parquet Format and Performance Optimization Opportunities
 
OrientDB introduction - NoSQL
OrientDB introduction - NoSQLOrientDB introduction - NoSQL
OrientDB introduction - NoSQL
 
Under The Hood Of A Shard-Per-Core Database Architecture
Under The Hood Of A Shard-Per-Core Database ArchitectureUnder The Hood Of A Shard-Per-Core Database Architecture
Under The Hood Of A Shard-Per-Core Database Architecture
 
Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)
 
Design Patterns - Factory Method & Abstract Factory
Design Patterns - Factory Method & Abstract FactoryDesign Patterns - Factory Method & Abstract Factory
Design Patterns - Factory Method & Abstract Factory
 
Data Pipline Observability meetup
Data Pipline Observability meetup Data Pipline Observability meetup
Data Pipline Observability meetup
 
RocksDB detail
RocksDB detailRocksDB detail
RocksDB detail
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
 

Semelhante a Practical API-Development with Gemstone/S

Pham van-phu-senior-engineer
Pham van-phu-senior-engineerPham van-phu-senior-engineer
Pham van-phu-senior-engineer
giaphu102
 
JSON-RPC Proxy Generation with PHP 5
JSON-RPC Proxy Generation with PHP 5JSON-RPC Proxy Generation with PHP 5
JSON-RPC Proxy Generation with PHP 5
Stephan Schmidt
 

Semelhante a Practical API-Development with Gemstone/S (20)

Lipstick On Pig
Lipstick On Pig Lipstick On Pig
Lipstick On Pig
 
Netflix - Pig with Lipstick by Jeff Magnusson
Netflix - Pig with Lipstick by Jeff Magnusson Netflix - Pig with Lipstick by Jeff Magnusson
Netflix - Pig with Lipstick by Jeff Magnusson
 
Putting Lipstick on Apache Pig at Netflix
Putting Lipstick on Apache Pig at NetflixPutting Lipstick on Apache Pig at Netflix
Putting Lipstick on Apache Pig at Netflix
 
Web apps in Python
Web apps in PythonWeb apps in Python
Web apps in Python
 
A look under the hood at Apache Spark's API and engine evolutions
A look under the hood at Apache Spark's API and engine evolutionsA look under the hood at Apache Spark's API and engine evolutions
A look under the hood at Apache Spark's API and engine evolutions
 
Abdullah CV
Abdullah CVAbdullah CV
Abdullah CV
 
Pham van-phu-senior-engineer
Pham van-phu-senior-engineerPham van-phu-senior-engineer
Pham van-phu-senior-engineer
 
Pham van-phu-en-0933687102
Pham van-phu-en-0933687102Pham van-phu-en-0933687102
Pham van-phu-en-0933687102
 
Statsd introduction
Statsd introductionStatsd introduction
Statsd introduction
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScript
 
Fitman webinar 2015 09-21 Generation and Transformation of Virtualized Assets...
Fitman webinar 2015 09-21 Generation and Transformation of Virtualized Assets...Fitman webinar 2015 09-21 Generation and Transformation of Virtualized Assets...
Fitman webinar 2015 09-21 Generation and Transformation of Virtualized Assets...
 
JSON-RPC Proxy Generation with PHP 5
JSON-RPC Proxy Generation with PHP 5JSON-RPC Proxy Generation with PHP 5
JSON-RPC Proxy Generation with PHP 5
 
Resume
ResumeResume
Resume
 
Srinivas Muddana Resume
Srinivas Muddana ResumeSrinivas Muddana Resume
Srinivas Muddana Resume
 
Srinivas Muddana Resume
Srinivas Muddana ResumeSrinivas Muddana Resume
Srinivas Muddana Resume
 
Srinivas Muddana Resume
Srinivas Muddana ResumeSrinivas Muddana Resume
Srinivas Muddana Resume
 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler Construction
 
Issidoros_Minovgidis_CV_EN
Issidoros_Minovgidis_CV_ENIssidoros_Minovgidis_CV_EN
Issidoros_Minovgidis_CV_EN
 
Portfolio
PortfolioPortfolio
Portfolio
 
Heterogeneous Data Mining with Spark
Heterogeneous Data Mining with SparkHeterogeneous Data Mining with Spark
Heterogeneous Data Mining with Spark
 

Mais de ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
ESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
ESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
ESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
ESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
ESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
ESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
ESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
ESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
ESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
ESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
ESUG
 

Mais de ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Practical API-Development with Gemstone/S

  • 1. Practical API-Development with Gemstone/S Marten Feldtmann dimap - das Institut für Markt- und Politikforschung, Hamburg + Bonn infratest-dimap, Berlin GESS Software mbH, Hamburg ESUG 2018
  • 2. About ● Marten Feldtmann – Smalltalker since VisualWorks/Atari-ST ● GESS Software, Hamburg – http://www.gessgroup.de/ – CATI Software ● dimap, Hamburg and infratest dimap, Berlin – http://www.dimap.de, http://www.infratest-dimap.de/ – Election Results Presentation for Television, HbbTV and Internet (ARD, SWR, WDR, NDR, RB, RBB, BR, ...)
  • 3. Project/Circumstances ● Left Smalltalk development around 2002 – VisualWorks with Argos/Versant (OODBMS-Experience) ● General good experiences ● Out of Smalltalk business over night (Versant) ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 4. How to get to current state ● Current State ● Evolution of a way to bring back Smalltalk – Early Attempts to bring back Smalltalk – Object-Modelling/DB-Layout/Code Generation – Programming Language Support – Runtime – Infrastructure, Scheduling ● No brilliant ideas – just work over years with an idea in mind. ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 5. Summary - Platform Overview PUM Sencha ExtJS HTML/5 Cordova Electron Android Browser Windows Linux MacOS Pi Python 3.x Java >=8 C# (Sync) C# (Async) Windows Xamarin Android Linux Gemstone ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 6. First attempt ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S ● VA Smalltalk (2012/3) – Seaside + JQueryMobile ● headless task on each computer ● 0MQ networking client – service detection ● installation practise ● ICU Unicode experience ● IC packaging ● Modular system ● CouchDB ● PDF service
  • 7. Tribute to Pieter Hintjes ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S ● Peter Hintjens ● 1962 - 2016 ● Network Computing using 0MQ ● Thank you !
  • 8. Second attempt ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S Demo VA + ExtJS :-) Result JS could be the way
  • 9. In the other company ● Other Company: dimap – Project for HbbTV result presentation for an election in Germany ● Gemstone/S (3.1.0.x) ● Sencha ExtJS (why not jQuery ?) – Manual Coding ALL stuf ● HTTP-Request ● Took long time, but result were ok ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 10. Product at the horizon ● CEO asked for help on new CATI System – First attempt failed completely ● Lost on the RDBMS database side ● No feeling for database – „Rewrite from scratch“ – Look for suitable technology / system ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 11. CATI - System Supervisoring Project Management Interviewing ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 12. Product Goals - CATI ● Initial target (reached) – 100 interviewers, 10 supervisors, 10 project managers ● Next target – 400 interviewers, 50 supervisors, 10 project managers ● Very different user profiles – Interviewer – calling people, execute the interview – Supervisor – managing interviewer, daily project work, statistics – Project Managers – overall project work, statistics ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 13. New Attempt ● Database ? ● Gemstone/S – This was not a decision based on facts – If you start such a project – have fun ● Reaction – Smalltalk ? – License Question ? ● Conditions – No pure Smalltalk application – Fallback considerations in case Gemstone/S is failing – Consider developers in company ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 14. New Attempt ● Overall Layout – Central Database is Gemstone/S (free) – System is running under Linux only – API-based (if a central component is failing) – UI is done in Javascript ● Sencha ExtJS – UI talks with database via HTTP – Scripting language: Ruby (Hype !) ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 15. Initial Technical Goal ● Database Gemstone/S (starting with 3.1.0.5) ● Two-Core license for about $1500 ● Code generation (as in our C# projects) ● Optimal support for UI (Sencha ExtJS Javascript) – Ajax-Calls (Single API Calls) – Store (CRUD – up to four API calls) – Class-based Javascript development – Paging – Sorting, – Filtering – Reminds me of the VASmalltalk Abt-Builder stuff, but at current state of the art UI ● => True seperated programming languages development ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 16. Modelling and DB-Layout ● Modelling / Generator Experiences – Own modeller („PUM“ – Poor Users Modeller) ● Technical oriented modelling tool – Initially used for C#, started around 2003 – Written in VASmalltalk – Very good experiences – Very special programming model for us and results were more than ok – Original C# model was „in-ram,distributed“ database oriented – Now the programming model has to be changed: ● Need for a special Gemstone/S model ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 17. Programming Model – Decisions ● Defining Programming Model for Gemstone/S – Optimistic Locking, Revision Attribute if needed – Initially supporting Swagger (later OpenAPI) – but now obsolete – Initial REST oriented: PUT, DELETE, GET and POST – Changed to POST only – UTF8 only – JSON only - one JSON parameter allowed in each call – Two kind of API calls ● Simple API-calls ● CRUD structure support (4 API calls each CRUD) – Depends only on NeoJSON, Zinc* stuff and base Gemstone/S ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 18. Programming Model – Decisions ● Data Type Definition in JSON – Time (HH:MM:SS) – Date (YYYY-MM-DD) – DateTime (YYYY-MM-DDTHH:MM:SS.sss+xxxx) – Enumeration (as strings) – Flags (like Enums with „|“ as delimiter) ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 19. Modelling – Decisions ● Two Class Hierarchies (in DB) – Domain oriented: persistent classes – API oriented: transient classes – Domain class may have several „corresponding“ api classes – API class may have one „corresponding“ domain class ● Developer‘s world – Gemstone/S - uses both hierarchies – Client-developer – sees API classes only ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 20. Modelling – Attributes ● Base Types (int, string, ..) ● Array of base types (not association) ● „RcCounter“ support ● Calculated attributes – Either Smalltalk block defined in Tool – Calling to-be-implemented method ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 21. Modelling – Features ● „Access-Path“ – Defines attributes based on access paths from a domain object to an attribute of another object – Very often used ● Gemstone/S - „official“ way to access a far away attribute. ● Enriches API classes to return more data than the base domain objet ● Circumvents API classes limitations – API classes knows only their shadowing class attributes ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 22. Modelling – Associations ● Implemented as – Bag, Dictionary, Array, Queue, Set, Sorted, Indexed ● Additional hints – Conflict, Identity, Large, Unique ● Resulting classes – Array, IdentitSet, Bag, StringKeyDictionary, RcQueue, SortedCollection …. – Index support ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 23. Modelling – Associations Dictionary Indexed Ordered Queue Set Sorted conflict Dictionary StringKeyDict. IntegerKeyDct. Set Array RcQueue Set Sorted- Collection identity Dictionary StringKeyDict. IntegerKeyDct. IdentitySet Array RcQueue IdentitySet Sorted- Collection large Dictionary StringKeyDict. IntegerKeyDct. Set Array RcQueue Set Sorted- Collection RcIdentitySet IdentitySet *Bag unique Dictionary StringKeyDict. IntegerKeyDct. Set Array RcQueue Set Sorted- Collection none Dictionary StringKeyDict. IntegerKeyDct. Set Array RcQueue Set Sorted Collection ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 24. Gemstone – Query Facilities ● Regardless of database type – queries are a MUST – Gemstone/S possibilities (Hmm...) ● Query Language ● Filtering ● Sorting ● Multi-Index Searching ● Offset, limit query etc … ● SELECT * FROM TABLE WHERE x=? offset x limit 25 – Speed, Speed (e.g. Buffered-Tables in UI) ● Presorted Structures ? ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 25. Gemstone/S – PUM Runtime ● Support – Optimistic Locking – Request Retries (up to 6 times) ● Reduced errors at the client ● Increasing concurrency ● Increasing database load – JSON serialization of parameter (API Classes) – Application user session handling – Logging, Benchmarking – Support for 0MQ-Events on successful/failure transactions ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 26. PUM - Languages ● Creates topaz-script (now: 12MB) with all source code – classes, association handling, migration support – Index support – Setup persistent domain tree, API calls – Object initialization support – Copying API Classes ↔ DomainClasses – Placeholder for to-be-implemented methods ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 27. PUM – Languages - Javascript ● Creates Javascript files for ExtJS – Single Files for classes and stores – Merging process of newly created files with extensions in older files ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 28. PUM – Languages - Python ● Initial scripting language candidate: Ruby ● Change to: Python – Create Language Runtime based on the initial Swagger adaption of Swagger-Runtime – Simulators (Raspi Rack), service-scripts, background- tasks, API examples – all is written in Python – PUM creates ALL code in ONE large file. Easy to copy to a project. – Very good choice ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 29. PUM – Languages – Java, C# ● General – Either language is used in company, must connect to product or to place a solution within company ● Java – PUM Runtime written from scratch ● External JSON library (Google) – Delivered as jar files to API-developers ● C# (Xamarin and/or .Net/Mono (Unity3D)) – PUM Runtime written from scratch – External JSON library (Newtonsoft) – Two generators (synchronous, asynchronous model) – Delivered as Solution or dll to API-developers – Base of documentation generation (MS Sandcastle + Print & Manual) ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 30. PUM – Examples ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S C#: var anApiClient = new ApiClient( jsonHandler, "http://compi.mydomain.de"); var aCATIAPISessionCreationInfo = new CATIAPISessionCreationInfo(); aCATIAPISessionCreationInfo.login = "root"; aCATIAPISessionCreationInfo.password = "rootpassword"; aCATIAPISessionCreationInfo.customerName = "gess"; var aCATIAPISessionResultList = anApiClient.CreateSession(aCATIAPISessionCreationInfo); Python: aClient = swagger.ApiClient('', "http://compi.mydomain.de") api = webcatiapi.RESTApi(aClient) aCATIAPISessionCreationInfo = webcatiapi.CATIAPISessionCreationInfo() aCATIAPISessionCreationInfo.login = „root“ aCATIAPISessionCreationInfo.password = „“rootpassword“ aCATIAPISessionCreationInfo.customerName = „gess“ aCATIAPISessionResultList = api.CreateSession( aCATIAPISessionCreationInfo)
  • 31. From passive to active ● Introduction of 0MQ intro product – Backend developer defines events for special domain situations in the model – The backend developer places events in case of commits and failures. – External application are listening to these events ● No polling, language independent – Incredible experience and improvement of the system layout ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 32. Summary - Platform Overview PUM Sencha ExtJS HTML/5 Cordova Electron Android Browser Windows Linux MacOS Pi Python 3.x Java >=8 C# (Sync) C# (Async) Windows Xamarin Android Linux Gemstone ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 33. System Layout - Backend Gemstone/S Apache/2 (Proxy WebSockets, HTTP(S), Load-Balancer) EvPublisher (Python, 0MQ) 0MQ-Event-Bus Events< - > WebSocket (Python, 0MQ) Logger (Python, 0MQ) Apps 00 .. xx (Python, Java, C#, 0MQ) ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 34. Summary - Overall ● Summary – People get used to true multi-language development (MLD) – Long – not easiest, lots of wrong decisions - path of evolution – Great programming model on the backend due to Gemstone/S – Smalltalk used in company – Introduce Python as an accepted language ( :-( ) – Active database due to ● 0MQ-based Event structure (MLD) ● WebSockets (MLD) ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 35. Summary - License Costs/User/Year ● €1050 (Microsoft, Windows) – VisualStudio Pro. (C#) ● €650 (JetBrains, Windows + Linux + Mac) – WebStorm (Javascript), PyCharm (Python) and IntelliJ (Java) ● €1800 – Sencha ExtJS Framework (HTML) ● €500 – Sencha Test Framework ● €1500 – Gemstone/S, 2-core license (Linux) ● €500 - Help and Manual (Documentation) ● Total: ~€4500 + (€1500 - €6000) for database (web licenses) ● Too much ? ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 37. Load Balancing ● API-Call – Try to group api calls in different pools of similiar time- behaviour – Longer API-call may block short calls – Adding more Gemstone/S answering tasks is not always a solution – 2-core license is a limitation here ● Apache/2, different algorithms for load balancing – Bybusiness – not default ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 38. Gemstone/S – SortedCollection ● Workhorse – Speed relates with size – Enables presorted structure (Speed access !) – Very fast operations possible ● Browsing, Buffered Browsing – Consider reverse logic (work at the end of the collection) ● Alternative: IdentitySet with index support – Slower – Constant speed ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 39. Gemstone/S – SortedCollection ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 40. Gemstone/S ● Interest in Gemstone/S increased ? No. Why ? – Offers no support for developers in other language – Offers no basic programming model or database API – Consider Smalltalk as a datascripting language – Everything has to be built from scratch – Others choose PostgreSQL, SQLite, MySQL or MariaDB or MongoDB ● Usable from all other languages out of the box ● User need mostly basic stuff from database: queries, storing etc … – No Windows platform for development ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S
  • 41. Modelling – Features ● „Search-Path“ – Define search paths from the root to a persistent object – e.g. Address ● Customer (customerID) ● Project (projectID) ● AddressContainer (containerID) ● Address (addressID) – Pretty boring for API-developer ● Switching to „OOP“-Number under Gemstone/S ESUG 2018 * Marten Feldtmann * infratest-dimap * dimap * GESS Software – API Oriented Development with Gemstone/S