Good work Graham,

Has anyone been able to test Graham's work?

When can we have this merged into develop ? so we can make a release
Fineract CN v1 before December 2019

On Sun, Aug 25, 2019 at 2:43 PM Ebenezer Graham <egraha...@alustudent.com>
wrote:

> Hello Devs,
>
> I would like to revive the topic discussed in the previous mail.
>
> I have been running Fineract CN on EclipseLink and PostgreSQL for a
> while now and I believe it's ready to be merged into the develop branches.
> But before that, it is paramount that other experienced developers in the
> community examine what has been done so far and QA it.
>
> Simply execute this script
> https://raw.githubusercontent.com/ebenezergraham/fineract-cn-demo-server/FINCN-141/scripts/Unix/eclipselink-test-setup.sh
>  to
> get all the necessary branches.
>
> *PS: *I have experienced better performance with PostgreSQL and
> EclipseLink on my workstation.
>
> For instance, Application Startup + Provisioning took 14 mins
>                       Application Startup alone took 12 mins
>
> With MariaDB and Hibernate out of the way, we will be closer to making
> Fineract CN compliant. On top of that, if we are able to upgrade the spring
> versions, this should significantly improve Fineract CN's response time,
> performance and memory usage.
>
> Looking forward to hearing from you.
>
> Regards.
>
>
> On Tue, 16 Jul 2019 at 04:47, Ebenezer Graham <egraha...@alustudent.com>
> wrote:
>
>> Hello Fineracters,
>>
>> I just finished integrating EclipseLink into Fineract CN. I would like to
>> request your participation in the testing of the new ORM. Your constructive
>> feedback will help me to fine-tune the integration and resolve all known
>> issues with PostgreSQL.
>>
>> *Approach Used *
>> Migrating from Hibernate to EclipseLink in Spring is actually very simple
>> and seamless.
>>
>> 1. I simply removed hibernate core and entity-manager from
>> spring-data-jpa [1]
>> 2. Then, I added the recommended EclipseLink JPA dependency [2] to the
>> MariaDB and PostgreSQL libraries.
>> 4. I extended the JpaBaseConfiguration and configured it to use
>> EclipseLink as the provider. As discussed earlier, Spring provides an
>> adapter for EclipseLink so it was quite straightforward.
>> 5. One critical decision I made, was choosing static weaving over the
>> default dynamic weaving done at runtime. Static weaving improves
>> performance and stability as it occurs during build-time. In addition, this
>> approach is recommended for large applications with lots of entities. Read
>> more at [3] and let me know what you think.
>>
>> Please conduct your tests and report any issues on this thread so that I
>> can work on them.
>>
>> *Testing EclipseLink and PostgreSQL*
>> You can test EclipseLink and PostgreSQL by using this script [4]. The
>> eclipselink-test-setup script will clone and publish the relevant artefacts.
>>
>> NB: Remember to shut down your Postgres server when doing component tests
>> so that the embedded db can start.
>>
>> NB: Use this for full integration tests
>> java -Ddemoserver.persistent=true -Dcustom.cassandra.contactPoints=
>> 127.0.0.1:9042 -Dcassandra.cluster.user=cassandra
>> -Dcassandra.cluster.pwd=password -Dcustom.postgresql.host=localhost
>> -Dcustom.postgresql.user=postgres -jar
>> ~/<fineract-cn-dir>/integration-tests/fineract-cn-demo-server/build/libs/demo-server-0.1.0-BUILD-SNAPSHOT.jar
>>
>> NB: The logs are a bit excessive as I'm currently outputting all
>> EclipseLink logs but once testing is over, I will tone it down.
>>
>> I have conducted component test for each microservice and a full
>> integration test. A few tests failed during the component test however, the
>> causes are not from the ORM but the test cases themselves. I will try and
>> fix them once I have met all of my milestones for this project or raise
>> issues for them in Jira.
>>
>> *Known Issues in Postgres (My current focus):*
>> 1. ERROR: relation "khepri_beats" does not exist. click on the link at
>> [5] to see the full log. This issue is not directly related to the ORM. I
>> actually identified this error whiles testing Postgres and Hibernate. This
>> is related to Postgres and I am currently looking into it.
>>
>> 2. Error: org.postgresql.util.PSQLException: FATAL: sorry, too many
>> clients already. click on the link [6] to see the full log.
>>
>> *Solution*, Increase max_connections found in the postgresql.conf. *260*
>> worked for me.
>> Rational, each microservice can have up to 20 unique connections to the
>> db per the BoneCP configuration.
>>
>> Also, you can test EclipseLink and MariaDB by pulling the FINCN-2 branch
>> into fineract-cn-mariadb link [7] and rebuilding all of the microservices.
>>
>> *Identified Issue when using embedded dbs in full integration test  *
>> Tenant context not set, resulting in this error [8]
>>
>> Which brings me to my concern about MariaDB. Given that MariaDB is not
>> compliant with Apache, can I safely assume that it's not relevant to
>> migrate it's ORM as well?
>>
>> Looking forward to hearing from you all.
>>
>> *At your service,*
>> Graham.
>>
>> [1]
>> https://github.com/ebenezergraham/fineract-cn-postgresql/blob/FINCN-2/build.gradle#L76-L80
>> [2]
>> https://github.com/ebenezergraham/fineract-cn-postgresql/blob/FINCN-2/build.gradle#L74
>> / https://www.baeldung.com/spring-eclipselink
>> [3]
>> https://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Performance/Weaving/Static_Weaving
>> https://pastebin.com/FDAzd6bx
>> [4]
>> https://raw.githubusercontent.com/ebenezergraham/fineract-cn-demo-server/FINCN-2/scripts/Unix/eclipselink-test-setup.sh
>> [5] https://pastebin.com/WFQ9satu
>> [6] https://pastebin.com/M8GAHsit
>> [7] https://github.com/ebenezergraham/fineract-cn-mariadb/tree/FINCN-2
>> [8] https://pastebin.com/FDAzd6bx
>>
>

Reply via email to