Funktionaalinen integraatiokuvauskieli
Rauhala, Mats (2017-09-19)
Funktionaalinen integraatiokuvauskieli
Rauhala, Mats
(19.09.2017)
Tätä artikkelia/julkaisua ei ole tallennettu UTUPubiin. Julkaisun tiedoissa voi kuitenkin olla linkki toisaalle tallennettuun artikkeliin / julkaisuun.
Turun yliopisto
Tiivistelmä
Integraatiojärjestelmien tarkoitus on mahdollistaa kahden tai useamman erilaisen tietojärjestelmän kommunikointi keskenään. Integraatiojärjestelmän vastuulla on välittää viestit järjestelmästä toiseen ja muokata ne eri tietojärjestelmien ymmärtämään muotoon. Integraatiojärjestelmien tekemiseen on muodostunut EIP (Enterprise Integration Pattern), jotka ovat hyväksi havaittuja malleja viestien ohjaamiseen ja muokkaamiseen integraatiojärjestelmän sisällä. Näitä malleja ovat muun muassa putket, filtterit ja viestien reitittimet. EIP-järjestelmissä integraatiot koostetaan yhdistämällä näitä eri malleja keskenään. Koostaminen tehdään monessa järjestelmässä deklaratiivisesti XML-kuvauskielen kautta. Taustalla on kuitenkin ohjelmistokomponenttien yhdistelyä, joilla kaikilla on rajallinen määrä kelvollisia viestejä joita komponentit pystyvät tulkitsemaan. Samalla monessa näissä järjestelmässä tämä XML-kuvauskieli tulkitaan vasta ajon aikana, jolloin mahdolliset huonot koostamiset ilmenevät vasta ajon aikana, pahimmillaan vasta tuotannossa.
Ajonaikainen tulkkaus antaa myös mahdollisuuksia myös muille virheille. Osa virheistä voivat olla hyvinkin yksinkertaisia, kuten syntaksivirheitä. Riippuen tulkkauksen toteutuksesta ja tulkkauksen tasosta, on mahdollista, että iso osa logiikasta toteutetaan tekstinä. Tekstinä toteutettu logiikka, kuten SQL tai pienet ohjelmaosuudet voivat sisältää syntaksivirheitä, jotka huomataan vasta suorituksen aikana.
Tässä esitetään toisenlainen ratkaisu, joka joiltain osin muistuttaa EIP-järjestelmiä, mutta ei pyri täydelliseen yhteneväisyyteen. EIP-järjestelmän tilalle ehdotetaan funktionaalista, vahvasti tyypitettyä ratkaisua. EIP-järjestelmä muistuttaa tiettyyn rajaan asti funktionaalista paradigmaa, joten vastaavasti myös funktionaalisen paradigman pitäisi sopia integraatiojärjestelmien tekemiseen. Vahva tyypitys estää lähes täysin väärien komponenttien koostamisen keskenään. Vahva tyypitys ja käännetyn kielen kääntäjä auttaa huomaamaan ison osan mahdollisista virheistä mahdollisimman aikasin.
Uuden järjestelmän tulisi siis mahdollisimman hyvin estää virheiden syntyä ja edistää ylläpidettävyyttä. Virheitä ovat muun muassa semanttiset virheet, syntaksiset virheet ja laittomat tilat. Näistä virheistä on mahdollista poistaa täysin syntaksiset virheet ja suhteellisen paljon laittomia tiloja. The purpose of systems integration is to enable two or more different informations system to communicate with each other. It is the responsibility of the integration system to relay messages from one system to another while transforming the messages so that the other systems can understand them. A specific pattern, EIP (Enterperise Integration Pattern) have emerged for implementing these integration systems. They are well suited for relaying and transforming messages inside the integration system. Examples of these patterns are pipes, filters and message routers.
In an EIP-system the integrations are composed by composing these patterns to create larger systems. In many systems they are composed declaratively through XML. In the end however it is composing software components together, each of which has a finite set of messages they can process. At the same time in many of these systems the XML description is interpreted so when the possibly bad compositions show up, they only do during runtime, worst case during production.
Runtime interpretion also enables other kinds of errors. Some of the errors can be extremely simple, such as syntax errors. Depending on the implementation it is possible that a big part of the logic is implemented as plain string. When the original syntax is nothing but strings, such as SQL, the code can contain syntax errors that are only noticed during runtime.
Another type of solution is presented, which partially reminds EIP based systems, but doesn’t have one to one likeness. Instead of an EIP based system, a strongly typed functional system is proposed. EIP based systems are similar to funcitonal systems to a certain point, so it should be that a functional system should be suitable for integration systems as well. Strong typing alone can prevent many of the illegal compositions. A compiled language with strong typing allows one to notice many of the possible problems as early as possible.
The new system should prevent as many problems as possible and make maintenance easier. Some of the problems are semantic errors, syntactic errors and illegal states. From these the syntactic errors can be removed entirely and many of the illegal states should become impossible to represent.
Ajonaikainen tulkkaus antaa myös mahdollisuuksia myös muille virheille. Osa virheistä voivat olla hyvinkin yksinkertaisia, kuten syntaksivirheitä. Riippuen tulkkauksen toteutuksesta ja tulkkauksen tasosta, on mahdollista, että iso osa logiikasta toteutetaan tekstinä. Tekstinä toteutettu logiikka, kuten SQL tai pienet ohjelmaosuudet voivat sisältää syntaksivirheitä, jotka huomataan vasta suorituksen aikana.
Tässä esitetään toisenlainen ratkaisu, joka joiltain osin muistuttaa EIP-järjestelmiä, mutta ei pyri täydelliseen yhteneväisyyteen. EIP-järjestelmän tilalle ehdotetaan funktionaalista, vahvasti tyypitettyä ratkaisua. EIP-järjestelmä muistuttaa tiettyyn rajaan asti funktionaalista paradigmaa, joten vastaavasti myös funktionaalisen paradigman pitäisi sopia integraatiojärjestelmien tekemiseen. Vahva tyypitys estää lähes täysin väärien komponenttien koostamisen keskenään. Vahva tyypitys ja käännetyn kielen kääntäjä auttaa huomaamaan ison osan mahdollisista virheistä mahdollisimman aikasin.
Uuden järjestelmän tulisi siis mahdollisimman hyvin estää virheiden syntyä ja edistää ylläpidettävyyttä. Virheitä ovat muun muassa semanttiset virheet, syntaksiset virheet ja laittomat tilat. Näistä virheistä on mahdollista poistaa täysin syntaksiset virheet ja suhteellisen paljon laittomia tiloja.
In an EIP-system the integrations are composed by composing these patterns to create larger systems. In many systems they are composed declaratively through XML. In the end however it is composing software components together, each of which has a finite set of messages they can process. At the same time in many of these systems the XML description is interpreted so when the possibly bad compositions show up, they only do during runtime, worst case during production.
Runtime interpretion also enables other kinds of errors. Some of the errors can be extremely simple, such as syntax errors. Depending on the implementation it is possible that a big part of the logic is implemented as plain string. When the original syntax is nothing but strings, such as SQL, the code can contain syntax errors that are only noticed during runtime.
Another type of solution is presented, which partially reminds EIP based systems, but doesn’t have one to one likeness. Instead of an EIP based system, a strongly typed functional system is proposed. EIP based systems are similar to funcitonal systems to a certain point, so it should be that a functional system should be suitable for integration systems as well. Strong typing alone can prevent many of the illegal compositions. A compiled language with strong typing allows one to notice many of the possible problems as early as possible.
The new system should prevent as many problems as possible and make maintenance easier. Some of the problems are semantic errors, syntactic errors and illegal states. From these the syntactic errors can be removed entirely and many of the illegal states should become impossible to represent.