Sunday, September 11, 2016

Oracle Workspace Manager - Basic POC with Spring Boot and Flyleaf

Working with a process to update configuration and master data within an enterprise is always a challenging task. While investigating possible solutions on how to have someone change data via a UI, then have those changes tested, signed off and approved before taking it to production. I stumbled on to Oracle Workspace Manager.
According to their developer docs, it seemed fit this use case exactly:

Manage a collection of updates and insertions as a unit before incorporating them into production data
Workspace Manager lets you review changes and roll back undesirable ones before making the changes public. Until you make the changes public, they are invisible to other users of the database, who will access only the regular production data. You can organize the changes in a simple set of workspaces or in a complex workspace hierarchy. A typical example might be a life sciences application in which Workspace Manager supports the discovery and quality assurance (QA) processes by managing a collection of updates before they are merged with the production data.


You could think of Oracle Workspace Manager as light "git"-like db versioning. 
Simply put:

  1. You create a workspace (branch)... 
  2. You make your changes there.. other people can connect to your workspace .. also make changes... or alternatively create their own branch from yours.
  3. You can refresh (fetch / merge) your workspace and resolve any conflicts that arise.
  4. Once everything is sorted and all is well with your changes you merge it back into the "LIVE" (origin: develop / master) workspace.

I used an existing Docker image of a oracle standard edition version. Oracle Workspace manager is not available on XE unfortunately. This is a rather large image, and it does take a couple minutes to initialise. The image is available on here on Docker Hub.


Connect database with following setting:
hostname: localhost
port: 1521
sid: xe
service name: xe.oracle.docker
username: system
password: oracle

To connect using sqlplus:
sqlplus system/oracle@//localhost:1521/xe.oracle.docker
To connect on mac os - install instantclient and run from there:

./instantclient_12_1/sqlplus system/oracle@local


To setup the initial DB I tried out Flyway. All quite simple and easy to implement. 
Under resources/db/migration there are a number of sql files that do the initial database setup.

  1. create the tables: CODE and CODE_TYPE, 
  2. insert initial data 
  3. enable versioning on those tables.

When you enable versioning the following happens, the table is renamed and a view is created allowing the "recording" of changes that occur.

Reference: (oracle presentation available here)



So after the initial setup you will seen a number of tables and views:



To try this out...

  1. Get the Oracle Docker image
  2. Once the DB is started... run the boot DataApplication.
  3. Use Postman on the REST resources below

To check the current workspace:
GET: http://localhost:9119/poc/workspace
To select all the information from the code table for the current workspace:
GET: http://localhost:9119/poc/workspace/data/code
Create code in the current workspace:
POST: http://localhost:9119/poc/workspace/data/code
BODY: 
{
"id":2,
"descr": "some code",
"type": 1
}
To change workspace (LIVE is default and available):
PUT: http://localhost:9119/poc/workspace/{workspaceName}
To create a workspace:
POST: http://localhost:9119/poc/workspace/{workspaceName}
To remove a workspace:
DELETE: http://localhost:9119/poc/workspace/{workspaceName}
To merge a workspace:
PUT: http://localhost:9119/poc/workspace/merge/{workspaceName}


These REST resources just wrap some of the functions from the DBMS_WM Package
This is maybe just the tip of a iceberg, as there is a ton of functionality available from this package.

All the code is available here.


30 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This Server is based on the Open Source Xen.org hypervisor, an industry open standard for virtualization with broad adoption from major ISVs like Oracle, IBM, HP, Sun, Dell, Red Hat, Novel, Debian, Citrix and the Linux community. salesforce custom dashboard

    ReplyDelete
  3. Really interesting and great bblog

    ReplyDelete
  4. Exceptionally valuable information.

    ReplyDelete
  5. Before you start buying games that you think your kids will enjoy, try renting them beforehand. Most of the time, you can't return a video game you don't want. Rentals give you a chance to try out the game for only a fraction of the cost of a purchase.

    Netflix Gift Card Codes Generator 2019 Online – Free Netflix Accounts
    6 Instagram Password Crackers – How Easy It Is To Crack Any Instagram

    ReplyDelete
  6. This blog is honestly beneficial concerning all educational understanding I earned. It covered a wonderful region of issue that may help some of needy humans. everything cited here is obvious and without a doubt beneficial. CSIR NET Online test

    ReplyDelete
  7. Customized Digital Marketing Courses for Beginners with Live Projects & Premium marketing tools.Enroll Now and get trained by Industry Experts. If you are looking for Digital Marketing Courses then visit our website to know more information.
    https://onlineidealab.com/digital-marketing-training/

    ReplyDelete
  8. Cognex offer AWS Training and certification in Chennai. And also cognex offers various courses according to the students requirements. Offering both online and offline classes. Other courses are microsoft azure, prince2 foundation, ITI V4 foundation,etc,

    ReplyDelete
  9. "I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article...

    " basic knowledge hub

    ReplyDelete
  10. 39 years old Video Producer Kristopher from La Prairie, has
    hobbies and interests for example model railways,
    and scrabble. that covered going to Tyre.출장안마

    ReplyDelete
  11. Download Cricket Mazza 11 live match cricket score app, Live Line & Fastest Score. Get Fastest Live cricket score app, Scorecard, Commentary, Match Info, and Schedules of All International & Domestic Matches, Series wise Stats, Records, Analysis and Facts, Trending News and Tweets, Recent ICC Player and Team Rankings. Also Download live cricket score apps for IOS, including real Cricket, Cricket T20 Fever 3D and other top answers suggested and ranked.

    ReplyDelete
  12. I will always let you and your words become noticed this weblog. Lastly something not a junk, which we undergo readers will also experience how I feel after reading your article 토토사이트검증

    ReplyDelete
  13. appreciate your information in this article. It’s smart the good performance of your site. You can also check my article you made it mice 메이저검증업체

    ReplyDelete
  14. I look forward to your kind cooperation. Guess I will just bookmark this site 토토추천

    ReplyDelete
  15. The blog is instructive additionally 메이저사이트 This post is invaluable

    ReplyDelete
  16. The Design looks very good You’re incredible! Thank you! 먹튀폴리스

    ReplyDelete
  17. Pandaranol can lead a horse to water AND make it drink 메이저놀이터

    ReplyDelete
  18. Just wish to say your article is as amazing. The clearness in your
    post is simply great and i could assume you’re an expert on this subject.
    Well with your permission let me to grab your feed to keep up to date
    with forthcoming post. Thanks a million and please continue
    the rewarding work.경마

    ReplyDelete
  19. That's a great article! The neatly organized content is good to see. Can I quote a blog and write it on my blog? My blog has a variety of communities including these articles. Would you like to visit me later? keo nhacai


    ReplyDelete
  20. How can you think of this? I thought about this, but I couldn't solve it as well as you.샌즈카지노I am so amazing and cool you are. I think you will help me. I hope you can help me.


    ReplyDelete
  21. Your posts are always informative. This post was a very interesting topic for me too. 파워볼사이트 I wish I could visit the site I run and exchange opinions with each other. So have a nice day.


    ReplyDelete
  22. It's really great. Thank you for providing a quality article. There is something you might be interested in. Do you know 바카라사이트 ? If you have more questions, please come to my site and check it out!

    ReplyDelete
  23. Discover the harmony of IT management with our guide on Oracle Workspace Manager POC using Spring Boot and Flyleaf. Learn the fundamental techniques for seamless integration and optimization in this insightful tutorial.

    Shopify Ecommerce Audits

    ReplyDelete
  24. Your posts are always informative. This post was a very interesting topic for me too. You can also check my website too - Website Design company in delhi

    ReplyDelete
  25. This is one of the best oracle workspace , visit Full stack web development training in agra

    ReplyDelete

Popular Posts

Followers