On the Development of a CSPA Error Correction Service: Design and Implementation Issues Donato Summa, Monica Scannapieco, Marco Silipo, Diego Zardetto, Mauro Bruno Istat, Italy Istituto Nazionale di Statistica – ISTAT
The CSPA concept • CSPA (Common Statistical Production Architecture) is a project promoted by UNECE HLG • provides a template architecture for official statistics • Final goal: standardized & reusable services • Begun in 2013, now CSPA 1.1 (http://www1.unece.org/stat/platform/display/CSPA/Common+Statistical+ Production+Architecture+Home) Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 2
The CSPA concept CSPA is based on Service Oriented Architecture (SOA) and includes some specifications intended to define interfaces of services in a standard way with a focus on service inputs and outputs . Statistical services are self-contained and can be reused by a number of business processes (either within or across statistical organizations). Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 3
Our work in CSPA 2014 In CSPA 2014 project there were 10 CSPA compliant services developed. Istat in particular developed the Error correction service by : – Defining the CSPA service definition – Defining the CSPA service specification – Implementing the service Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 4
CSPA Error Correction service definition Name It is a conceptual-level Level definition of the service where are described: GSBPM Business Function Outcomes • the principal business Restrictions functionalities GSIM Inputs GSIM Outputs • the inputs and outputs Service dependencies according to GSIM Process Method Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 5
CSPA Error Correction service specification It is a logical-level specification Name of the service in which: Service location: • some design issues are Protocol addressed with respect to for Parameters the methods of the service invoking passing (e.g. how to invoke such mode: the Service methods) List of • GSIM inputs and outputs parameters implementation is specified Input Messages according to a defined Output Messages “logical” model (e.g. SDMX Adopted methodology or DDI) Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 6
CSPA Error Correction issues & solutions The development of this service was much more than a technological exercise. Issues emerged on : • the format/model of I/O data JSON Table schema • the protocol and on the interface to implement REST Web Service The final output is compatible with the solutions provided by the AWG to such issues Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 7
CSPA Error Correction service implementation • Once a formal Service Specification is carried out, then you can produce several Service Implementations of it in order to provide the business function to the community. • Normally it is possible to use different ICT technologies to wrap different statistical techniques. • We decided to use the “ rspa ” R package as a tool able to implement the Error Correction task although any other could have been used. Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 8
CSPA Error Correction service implementation • We have wrapped the R script into a RestFul web service running on a node.js infrastructure, powered by the Restify library. • Such a wrapper is specified by a file named service.yaml , in which you can find all service input and output parameters with their types and all other associated metadata, and the syntax for running the wrapped tool. Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 9
CSPA Error Correction service how it works In order to invoke the service a client must make an HTTP POST request to the server , by using any kind of client- side technology such as curl or a web browser but also including another CSPA compliant service in a chain fashion. Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 10
CSPA Error Correction service how it works The content of the POST request consists of a JSON structure which contains all the actual paths or links to the files on which the tool will work, namely all input and output parameters. Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 11
CSPA Error Correction service how it works Once the request is made, a process is spawn on the server to handle asynchronously the execution in a non- blocking manner and a job identifier is returned to the client . Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 12
CSPA Error Correction service how it works At any time a client can poll the status of the job by sending additional GET requests for the returned job id. Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 13
CSPA Error Correction service how it works When the job status is ‘finished’ the results are stored on the server and made available to the client, which can obtain them by making a GET request for each produced output resource . Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 14
CSPA architecture and technologies Each NSI or organization that implements a CSPA compliant architecture can be both a service consumer or provider Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 15
Conclusion • Future perspective – Integration with NSIs environment – Services wrapping “standard” functionalities in order to maximize reuse – Off-the-shelf CSPA services • CSPA 2015: Develop and implement CSPA services in full production during 2015 – Istat: Coding service Donato Summa, NTTS 2015, Session 6C - Enterprise architecture and integration, Brussels, 10-12/03/2015 16
Recommend
More recommend