samoa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Wawrzyniak (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SAMOA-77) Rebuild and unification of data serialization
Date Tue, 28 Nov 2017 08:15:01 GMT
Piotr Wawrzyniak created SAMOA-77:
-------------------------------------

             Summary: Rebuild and unification of data serialization
                 Key: SAMOA-77
                 URL: https://issues.apache.org/jira/browse/SAMOA-77
             Project: SAMOA
          Issue Type: New Feature
          Components: SAMOA-API, SAMOA-Instances
            Reporter: Piotr Wawrzyniak


Currently all Loader instances are created in the Instances class constructors, by providing
proper parameters in constructor different implementation of Loader is instantiated (and Loader
implementations handle deserialization of “sources”- arff file, avro files etc.). In our
opinion this could be improved by creating a factory object designed to create proper Loader
instances. Such LoaderFactory could accept number of parameters and would return most appropriate
Loader implementation. This solution will benefit in the future when there will be need to
add new loaders/sources. Also the code will be cleaner and the process of adding another loaders
will be simplified, also thanks to ’strict’ use of factory design pattern.

So to sum up, it would mean we would keep all the serialization-related code in the samoa-instances
project, and we will use Loader interface (possible extended to support reading and writing
of data), and LoaderFactory class. Arguments for factory method would be passed as task options,
which means adoption of new serialization formats and data sources would be also simplified.
This would mean that we will redesign Kafka components so they will follow this pattern, but
on the other hand the pattern would be shared among all the possible sources of data. Moreover,
Instances class would be modified by removing some of its constructors and replacing them
by single constructor accepting Loader implementation as created by the LoaderFactory.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message