Software Defined Networking
1826501 Members
1669 Online
109692 Solutions
New Discussion

Re: Persistent data store

 
ItamarTal
Occasional Advisor

Persistent data store

While writing a native application to the SDN controller, we got into a situation where we need to store many entries which needs to be persistent across each instance of the controller, but shouldn't be distributed and replicated across the teams controllers. Moreover, the data itself is absolutly relational and the nosql structure of Cassandra doesn't fit for our case. So we thought maybe we could store our data streight to the underline Postgresql where the controller store it's alerts and internal data.

My question is this: is there an API which make it possible to create a table in the postgresql sdndb schema and store the data there?

 

Itamar,

Guardicore

Itamar Tal,
Guardicore, LTD
6 REPLIES 6
sdnindia
Trusted Contributor

Re: Persistent data store

Hello Itamar,

 

You can use the  Package com.hp.util.persistence for the data operations , but there is no API to create a table in the postgresql  sdndb schema and store the info,  you can also use other remote database and access it from your application.

 

Thanks,

HP SDN Team

sdnindia
Trusted Contributor

Re: Persistent data store

Hello Itamar,

Doing a follow up to check if you need any further assistance with respect to the query posted.
Please do let us know  if your problem is solved.

If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.


Thanks
HP SDN Team

sdnindia
Trusted Contributor

Re: Persistent data store

Hello Itamar,

 

There’s no direct API to persist on Postgres DB. According to flare standards the customer has to implement three new bundles: DAO-API, DAO-MODEL and DAO itself.

In the DAO-MODEL he has to create all JPA-annotated classes, that will be his tables and the hibernate xml configuration. In the DAO-API he has to define some persistence Service interface that will be exposed to the business layer of the application and the DAO, extending AbstractDao from Flare, with all the code to convert Objects from/to

Relational DB (that he has to write by himself), implement query api’s and also implement the API’s he has defined in the DAO-API bundle.

 

Thanks,

HP SDN Team

sdnindia
Trusted Contributor

Re: Persistent data store

Hello Itamar,

 

Doing a follow up to check if you need any further assistance with respect to the query posted.

Please do let us know  if your problem is solved.

 

If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.

 

 

Thanks

HP SDN Team

--jd--
Occasional Advisor

Re: Persistent data store

Hi Sdnindia,

Any chance you can provide a small demo project for connecting to a postgresql db?

Or point us to one?

Thanks

James
TurboLuk
Occasional Advisor

Re: Persistent data store


@sdnindia wrote:

Hello Itamar,

 

There’s no direct API to persist on Postgres DB. According to flare standards the customer has to implement three new bundles: DAO-API, DAO-MODEL and DAO itself.

In the DAO-MODEL he has to create all JPA-annotated classes, that will be his tables and the hibernate xml configuration. In the DAO-API he has to define some persistence Service interface that will be exposed to the business layer of the application and the DAO, extending AbstractDao from Flare, with all the code to convert Objects from/to

Relational DB (that he has to write by himself), implement query api’s and also implement the API’s he has defined in the DAO-API bundle.

 

Thanks,

HP SDN Team


Hi HP SDN Team,

 

I generated "persistence" bundles with tool from SDK 2.3.5. The implementation follows patterns as you mentioned, but the app installation failed. Details are in this post.

 

I will highly appreciate any help.

Thanks,

Lukas