2. About Paranor
1/10/2015 ZVIS—A Financial System in Ada 2
Founded in 1978
35 Employees
PhD/Msc/Bsc
Individual Software
Development
Modernization
Consulting
High Standards
Model Based
Approaches
DSLs
Offices in
Wahlendorf (CH)
Stansstadt (CH)
Cebu (PH)
Finance
Public
Administration
Transportation
Energy
Communications
Continuous
innovation
state-of-the-art
methods
and technologies
4. ZVIS—Payment Transactions
• Central platform for payment processing, customer and account
• KUDA—Customer database (addresses, cards, checks, special
services, …)
• KOBE—Account handling, booking engine
• Sybase / Oracle DB, VMS / Linux, Ada / DSLs
1/10/2015 ZVIS—A Financial System in Ada 4
5. Some Numbers
• 4.5 million accounts
• 1000 multiple secure business transactions per second
• more than 1.6 billion transactions annually
• > 100 billion CHF Assets
• > 2,000 users
• > 20 peripheral systems
1/10/2015 ZVIS—A Financial System in Ada 5
6. A brief history of ZVIS
1993
Start
1996
Operation
2002
Gnatification
DecAda to
Gnat
2004
Migration
Kobe
•VMS to Linux
•Sybase to
Oracle
2015
Migration
Kuda
•VMS to Linux
•RDB to Oracle
1/10/2015 ZVIS—A Financial System in Ada 7
1 Million
lines of
code
4 Millions
lines of
code
Technical Modernization
Innovation & Maintenance
8. Architecture
HICHuman Interaction Component
GUI
TMCTask Management Component
Interface / Service Choreography
PDCProblem Domain Component
Business Logic, µ-Services
DMCData Management Component
Persistence / Database Access
Subjects
Business areas / DomainsServices
Tiers
1/10/2015 ZVIS—A Financial System in Ada 9
9. Reliability & Availability
• Two instances of KUDA; Run in two locations
• Each location has two fully redundant systems
• One system is active,
• The other is hot-standby
• Switch over possible any time
• Active to Standby (within location, automatic switch)
• One location -> other location (disaster recovery, quick but not
automatic)
1/10/2015 ZVIS—A Financial System in Ada 10
10. Scalability and Performance
1/10/2015 ZVIS—A Financial System in Ada 13
GUI GUI GUI GUI GUI GUI
Network
Network
RDMBS
Database
HIC
TMC
PDC
DMC
DB API
PDC
AuthShell
R W S
DB API
PDC
AuthShell
R
DB API
AuthShell
PDC
R W
DB API
PDC
AuthShell
R W S R
OS
Process
12. Why Ada
• Readability—Over 20 years and generations of developers
• Data Abstraction—Encapsulation, better interfaces to business
• Strong Type Checking—Avoid misuse of types
• By Value & By Reference—Easy memory management, improves
reliability, deterministic performances
• Separation of concerns—Spec vs Body
• Overloading—Clarity, Unified naming
• Exceptions—Propagated over layers & processes, no status code
• Interface to other languages—To and from Ada
• Automatic compilation—No convoluted makefiles
• Portability—VMS, Linux
1/10/2015 ZVIS—A Financial System in Ada 17
14. Why Not Ada
• A general-purpose programming language
• Not the language of Business
• Much boilerplate
Solution
• Modeling
• Code generation (Ada)
• Use of DSL
1/10/2015 ZVIS—A Financial System in Ada 22
15. 18 DSLs
Cover many aspects of the software:
• Primitive types, enumerations, exceptions
• Database model
• Non CRUD Operations
• EAI Service Definitions
• Web services
• Extensive tool-chain
1/10/2015 ZVIS—A Financial System in Ada 23
17. Primitive Types
• Database columns and Ada record components must have the
same type
• Different representations / Null values
• E.g. for numbers, Zero is not Null
• Constraints (domains)
• Runtime Checks
• Avoid Misuse
• Strong typing in the database and in Ada
1/10/2015 ZVIS—A Financial System in Ada 26
18. Enumeration Types
• Different kind of primitives
• Additional information
• Associated text, translated in “four” national languages
• UI Information (menus, visibility, …)
• Used in all layers (GUI, Business logic, Database)
• Stored in the Database
• Generate Ada, SQL, Motif, Documentation, …
1/10/2015 ZVIS—A Financial System in Ada 28
19. Database
• Graphical and textual editors
• Class diagrams, incl. database rules
• Mapping of columns to primitive types
• Generate database schema
• Generate database bindings and access code
• Define and generate primitive types
• Generate CRUD and non-CRUD operations
1/10/2015 ZVIS—A Financial System in Ada 29
23. Finite State Automata
• In-house solution (since 1977), known as Procol
• Graphical representation of automata
• Generate Ada Code
• Includes snippets of Ada code
• Used to model state of
• Business objects (accounts, customers, orders, …)
• User Interface
1/10/2015 ZVIS—A Financial System in Ada 33
25. PMG
• The Paranor Marshalling Generator
• ASIS Application
• Generates compact binary representation of data type
• Used for heterogeneous sytems (big vs. little indian)
• Mainly variant records
• Transportable over the network
• Extended to generated XML (EAI)
1/10/2015 ZVIS—A Financial System in Ada 35
26. Unification of the Modeling and DSL
Environment
Eclipse based, extensive use of EMF and Xtext
1/10/2015 ZVIS—A Financial System in Ada 36
28. Why Ada with Generators
• All Ada benefits are still valid for the consumers of the
generated code
• Especially safe type-checking with generated code
• Smart recompilation
• Notice the impact of generated code
• Only recompiles what’s necessary
• ASIS very valuable to generate from Ada code
1/10/2015 ZVIS—A Financial System in Ada 39
29. Conclusion
• Ada can be used in financial applications
• Not just embedded systems
• Allows for high availability, reliability, scalability, and performance
• It can be economically profitable
• Modeling helps reduce the costs of maintenance
• Use code generation wherever possible
1/10/2015 ZVIS—A Financial System in Ada 40
30. Thank You!
Stéphane Barbey, CTO
stephane.barbey@paranor.ch
1/10/2015 ZVIS—A Financial System in Ada 41
https://www.linkedin.com/in/barbey
Hinweis der Redaktion
Back-ends provides related set of services
Dedicated and limited functionality
Usually 1 to 3 services per back-end
Strict separation of read/only and update back-ends
KUDA back-ends can be run on multiple nodes simultaneously.
Processes provide containers in which back-ends execute
Parallel processing of service requests and execution
Back-ends can be distributed and replicated across processes
Dynamically add processes and assign back-ends to processes
KUDA is not a monolithic application
Use of shared libraries
Can be deployed independently (patches)
Stop & restart the corresponding back-ends
Versioned
Only need to restart affected back-ends
Reduce memory foot-print
Each process does not have a copy of the code
We bound in existing Xtext models
In some cases we were able to able use our new models with the existing ones.
Specifically our existing models were maintaining their own primitive definitions, now they reference THE primitives models.
Also cases of items defined a STRINGS for pragmatic reasons now link to models. e.g. Constants
Validation as business capture.
14.
And during all this (the migration of the other models) we created some new ones.
Developers now familiar with the process and the capabilities of Xtest modelling started to identify new candidate areas.
Some of these are existing code components - …
Some are new functionality.
Noteability , many these new models were being used to produce productive code before the persistence layer migration was complete.
Generated
Use encapsulation (private types)
Provide standard operations (value, image, …)
Conversions for non-standard representations
User-defined operations
Exceptions
Also generated
Translate database error codes into exceptions
Easy structured handling of user events
Better performance to prevent unnecessary update operations
Remove the need for boilerplate code
A reference case: PostFinance developed their core payment plattform in the early 90‘s and it is reliably running ever since. In order to achieve such a stable, but still expandable system, PostFinance realized that a modernization would help. Paranor started a modernization project to modernize the complete development environment.
Here are some more numbers .
We use the ability of Ada to provide a high-level interface