TEIID Springboot integration - teiid

i read about Teiid and i liked it, but because it has a lot of changes, i got some problems first to deal with it, but what i understand now is the following:
1- teiid wildfly and thorntail are going to be obsolete, so, i will not use them.
2- teiid spring boot and openshift are the most active projects now, so, i chose one of them which is sprintboot.
my thoughts for using teiid in springboot is for the following:
1- integrate my different schemas in a micro-service architecture pattern to solve the problem of data integrity for all services.
2- create a standalone data virtualization (data warehouse) for my internal database systems to be used in reporting.
for the reporting system, i created a ddl vdb file, and i was able to deploy springboot application with jdbc enabled, and used the existing Simple-java-client to connect to it, but i tried to use apache superset to get my reports in a BI application, and i enabled the ODBC with the postgres, but i always have the below error
Connection failed (psycopg2.OperationalError) TEIID30528 javax.transaction.SystemException: The system is only setup for spring managed transactions. If you need Teiid to manage transactions, then a third-party transaction manager like narayana-spring-boot-starter needs to be configured.
DETAIL: org.teiid.jdbc.TeiidSQLException: TEIID30528 javax.transaction.SystemException: The system is only setup for spring managed transactions. If you need Teiid to manage transactions, then a third-party transaction manager like narayana-spring-boot-starter needs to be configured.
although i tried to integrate with narayana, but i couldn't configure it,
sorry for this long discussion, but i need to know:
1- is the above approach is good, or should i try other things.
2- is the above error has any fix or there is any other suggested BI tool i can use with Teiid?
thanks in advance

What I can say (https://teiid.io/blog/post-2020-3) Teiid won't be obsolete for WildFly. The Teiid supports currently the WildFly and Spring Boot as could be found on their pages. If you are looking for the Java EE components and the best integration amongst other JBoss projects (e.g. Narayana) then you could try to check the WildFly version of Teiid. It's right that Thorntail develoment efforts are decreases for the sake of Quarkus. But it seems (as the post above mentions) the Teiid considers the support of Quarkus. But WildFly is(!) still supported.
On your question about the setup of the third party transaction manager for Spring Boot and with Narayana in particular you should check information from Snowdrop project and the README of the Narayana Spring Boot integration.
The thing which should be enough to configure the Narayana starter is to add the starter to your pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-narayana</artifactId>
</dependency>
If there is a need for configuring Narayana in particular the configuration properties start with spring.jta.narayana

thanks a lot for your help, and by adding the below dependency to the POM file
<dependency>
<groupid>me.snowdrop</groupid>
<artifactid>narayana-spring-boot-starter</artifactid>
<version>2.1.0</version>
and adding narayana.dbcp.enabled=true, spring.jta.enabled=true to the application.properties, i could do some graphs using the apache superset.
also, as long as wildly is still supported, i will go on for the wildfly solution, as it is more suitable to have more VDBs in a single container.
thanks a lot

Related

How to configure: WS-AT Narayana standalone?

I want to use Narayana - WS-Transaction in a standalone springboot app that calls two different Webservics in a single transaction. One of those internally uses db resource for insert/update.
Is standalone-WSAT-possible with narayana? If yes :
How do I configure UserTransaction, PlatformTransactionManger etc in Springboot java config?
How to add those two WebServiceTemplate (s) as "WS-AT transactional resources"?
The example here does not show those beans: https://github.com/jbosstm/quickstart/tree/master/spring/stock-market-with-narayana-spring-boot/src/main
Unfortunately there is no Narayana Spring Boot WS-AT quickstart that would show you how to utilize the technology. WS-AT is the best integrated in WildFly application server. You can find the Narayana quickstarts containing examples of running it at https://github.com/jbosstm/quickstart/tree/master/XTS. If you consider using Spring Boot then in general it should be possible but you need to configure all the integration on your own. That's not prepared and/or maintained by the Narayana team. You can get inspiration at quickstarts of itegrating Narayana with Spring Boot at https://github.com/jbosstm/quickstart/tree/master/spring. If you want to check how the integration to WildFly is done then a good starting point could be https://github.com/wildfly/wildfly/blob/master/xts/src/main/java/org/jboss/as/xts/XTSSubsystemAdd.java.

Deploying Web job with appropriate environments variable

We are trying to deploy a web job via octopus. We have different eventhub keys saved in the variables and we expect the webjob to pick up the right key depending on the environment that it is being deployed to. Has one one done this before? Any advice on settings up configurations in octopus?
<========== UPDATE ===========>
We were being careless and didn't quite set our octopus process to transform the Configuration Variables. You should be able to do so by clicking 'configure variables' in the process step.
I don't think it being deployed via Octopus is all that relevant here. Generally, a .NET WebJob is able to access Azure App Setting using standard configuration API.
If that is not working for you, please update your question to clarify what you tries, and specifically what didn't work.

How to handle DB migration using AWS deployment tools

Amazon Web Services offer a number of continuous deployment and management tools such as Elastic Beanstalk, OpsWorks, Cloud Formation and Code Deploy depending on your needs. The basic idea being to facilitate code deployment and upgrade with zero downtime. They also help manage best architectural practice using AWS resources.
For simplicity lets assuming a basic architecture where you have a 2 tear structure; a collection of application servers behind a load balancer and then a persistence layer using a multi-zone RDS DB.
The actual code upgrade across a fleet of instances (app servers) is easy to understand. For a very simplistic overview the AWS service upgrades each node in turn handing connections off so the instance in question is not being used.
However, I can't understand how DB upgrades are managed. Assume that we are going from version 1.0.0 to 2.0.0 of an application and that there is a requirement to change the DB structure. Normally you would use a script or a library like Flyway to perform the upgrade. However, if there is a fleet of servers to upgrade there is a point where both 1.0.0 and 2.0.0 applications exist across the fleet each requiring a different DB structure.
I need to understand how this is actually achieved (high level) to know what the best way/time of performing the DB migration is. I guess there are a couple of ways they could be achieving this but I am struggling to see how they can do it and allow both 1.0.0 and 2.0.0 to persist data without loss.
If they migrate the DB structure with the first app node upgrade and at the same time create a cached version of the 1.0.0. Users connected to the 1.0.0 app persist using the cached version of the DB and users connected to the 2.0.0 app persist to the new migrated DB. Once all the app nodes are migrated, the cached data is merged into the DB.
It seems unlikely they can do this as the merge would be pretty complex but I can't see another way. Any pointers/help would be appreciated.
This is a common problem to encounter once your application infrastructure gets into multiple application nodes. In the olden days, you could take your application offline for "maintenance windows" during which you could:
Replace application with a "System Maintenance, back soon" page.
Perform database migrations (schema and/or data)
Deploy new application code
Put application back online
In 2015, and really for several years this approach is not acceptable. Your users expect 24/7 operation, so there must be a better way. Of course there is, the answer is a series of patterns for Database Refactorings.
The basic concept to always keep in mind is to assume you have to maintain two concurrent versions of your application, and there can be no breaking changes between these two versions. This means that you have a current application (v1.0.0) currently in production and (v2.0.0) that is scheduled to be deployed. Both these versions must work on the same schema. Once v2.0.0 is fully deployed across all application servers, you can then develop v3.0.0 that allows you to complete any final database changes.

Developing SAPUI5 applications with WebStorm

Looking at some of the delivered SAPUI5 code on HANA I noticed that WebStorm and even RubyMine was used by some SAP developers. I have also heard that various other developers on customer sites use WebStorm for code checked into the ABAP repository.
Both the HANA and ABAP repositories technically look to be proprietary. The default method for syncing SAPUI5 code with HANA and ABAP repos seems to be using Eclipse or the Eclipsed based HANA Studio, via SAP delivered plugins installed.
I searched and couldn't find any plugins or help on how you could check in and out of HANA or ABAP repo easily not using Eclipse or Orion.
For HANA you can put Github in the middle using something like the SAP HANA Deployment Shell and on the ABAP stack you can /UI5/UI5_REPOSITORY_LOAD to manually upload, i have heard alternatives for both where developers have reverse engineered the services eclipse use by listening on the HTTP traffic or de-compiling the plugins.
My question how are others using Webstorm to develop SAPUI5 applications within a team and how do you sync your code with the SAP repository?
I use Webstorm for my UI5 development. We store the code in a GIT repository hosted through an internal Gitlab server (https://about.gitlab.com/) running on Ubuntu! You could just as easily use cloud solutions such as Gitlab or Bitbucket.
There are two ways to circumvent Eclipse and remove the need for the ABAP team repository:
(1) Use the abap program /UI5/UI5_REPOSITORY_LOAD in t-code SE38 on your Gateway ABAP stack. Just point it to your git directory and execute!
(2) Use the program /UI5/UI5_REPOSITORY_LOAD_HTTP to do the same thing from a webserver. You could imagine a scenario where you have a HTTP service that triggers the pull on SAP but we always use the first method!
Edit # 03-SEP-14
To clarify my thoughts on (2) the ideal scenario would be to implement a small post commit handler so that on a repository change it would:
Pull the changes from the repository
build the UI (i.e. perform minification/uglify on the JS & CSS) to a separate build folder (create preload files)
perform any unit tests on the code (if they exist)
if the tests pass, upload to Gateway by either:
zip the build folder and post it to a custom Gateway service (or)
call a custom gateway service to then trigger a pull of the build folder via HTTP
(Since master is always deployable :-)!)
You end up with a continuous integration platform that ensures the integrity of your code and ensures that you also deploy only the production code (always a little uncertain of deploying non-minified source code with comments etc. to a productive internet facing server..).
This method is agnostic of the IDE you use and if you do it right, also of the source code repository setup.
Hope this helps & happy developing!
Oli

Looking for a .NET BuildServer SaaS

I've a question regarding Build Servers for .NET Projects. Currently I'm using TeamBuild in conjunction w/ TFS 2010 to do automated builds in the .NET world. Some older projects are built using plain old MSBuild scripts.
To get rid of the administrative effort I'm currently moving my sources to github. Github offers, as many other sites service hooks to trigger build servers for doing automated builds such as CI or nightly builds.
Sure I could use TeamCity OnPremise and dynamically create Build Agents in Windows Azure using VMRole and Virtual Disks, but I think this hybrid solution is a little bit moronic.
So what are your thoughts about the following architectural idea?
Let's say you're using github as source control platform. When commiting sources to your repository an Azure WebRole hosting a WCF Service will be triggered.
The WebRole itself will just use the Azure API to fire up a new instance of a custom Azure VMRole.
The Azure VMRole itself will use some kind of buildscript such as Rake or MSBuild to have as few developer tools installed on the build agent as needed. After building the entire project the artifacts will be published to Azure BlobStorage and the WebRole hosting the WCF service will be called again, but right now the Azure WebRole is going to terminate the BuildAgent.
While using such a setup you could minimize the costs for the build agent and build nearly any kind of project as far as you're able to install the required element for the build by using PowerShell.
So in bottom line: what are your thoughts on this architecture? Other Ideas? Is there an existing service offering such a solution?
Thorsten
have you looked at https://appharbor.com ? I know a number of people who are using it to do exactly what you are doing.
Check out Team Foundation Service as it can do the following:
Continuous Delivery to Azure
Deploy to production on Windows Azure with two clicks from Visual Studio, or automatically as part of your build process.
Just found this one http://www.appveyor.com/ AppVeyor is also free for OpenSource projects.