This is the first contribution of this blog to PL-SQL community, actually this is a tribute to my great friend Itagyba Abondanza Kuhlman, author of this source code, please visit his blog at http://blog.iak.com.br/

There are a lot of curiosities about the Oracle Database World, his specialty. He is one of those people who came to this planet to the mission of helping humanity to evolve, developing critical thinking, friendship, thinking of things never before thought, leaving wherever he goes a trail of good feelings. Thank You Gyba.

The purpose of this code is to calculate the distance (in Kilometers) between two geographical points using mathematics, specifically trigonometry.

This is a graphic software (tkinter) in Python to back up a file on your computer. A backup folder is created in the current directory of the selected file and then every x minutes a backup of the file is done, respecting the maximum number of files in the backup directory.

Hi People, tonight i was invited by http://www.otechtalks.tv/ to participate of a Podcast Session, a community of specialists at Oracle World through the planet. I’m am very happy with this, thank you OTechTalks.

This podcast is a reflection on the practical experience of implementing Oracle SOA Middleware products experienced by Victor Jabur (http://victorjabur.com) in some Brazilian companies. Let’s talk about the main difficulties, benefits, things that need to be modified to achieve success.

How you started journey with Oracle tech ?

I started my career at Oracle World in 2005 working as a developer in the Forms and Reports platform, using the PL / SQL language in a wholesale hypermarket company called Atacadão (http://www.atacadao.com.br/), later worked in a database integration project, joining two banks, REAL and Unibanco. working for TCS (http://www.tcs.com/). In 2007, I had my first experience of implementing Oracle SOA Products at the company Sem Parar (https://www.semparar.com.br), a pioneer in electronic billing passages in Brazilian toll through RFID tags in windshields of vehicles, with 12.5 million transactions a month and a turnover 1.68 billion reals in the same year. With experience acquired, I started to work in the SOA implementation of many companies, such as Fleury (http://www.fleury.com.br), a Laboratory Medicine company, Edson Queiroz (http://www.edsonqueiroz.com.br) a famous multi-brand group, WTorre (http://www.wtorre.com.br), a construction company, Port of Santos (http://www.portodesantos.com.br), development of a control system access for the main Brazilian port, Porto Seguro (http://www.portoseguro.com.br), vehicle insurance company, among other companies. Currently working as a Solutions Architect at Pernambucanas (http://www.pernambucanas.com.br), the famous Brazilian Retail company where many Oracle products are used, and the main ongoing project is the implementation of Oracle Retail, coexisting with the Legacy in Forms and Reports and communicating with other modules like EBS, BI, CRM, Government Systems, External Partners, and so on. SOA is being implemented too, along with mobile and big data initiatives, being considered one of the most innovative companies in 2014 (http://itforum365.com.br/noticias/detalhe/114416/correios-lideram-ranking-de-as-100-inovadoras-no-uso-de-ti), even with the age of 107 years old.

Brief topic of the day

For many years the Oracle sold in the market your product to Graphic User Interface development, launched in 1981 under the name Interactive Application Facility (IAF), changing its name to FastForms + IAG, becomes later SQL * Forms and more later Oracle Forms. Currently, Oracle is replacing the Forms for ADF technology (Advanced Development Framework), a new way of doing Screens in Java Language. Over all these years, many companies in Brazil and the world have used this tool, All the resources that was available were the database, PL / SQL, Forms/Reports and thus the entire business rules at the company were stored in the database through procedures or directly inside the Forms screens file. The world has evolved, competitiveness is much higher and companies need to be agile to keep up your market. You need to be close to the business, by changing its rules, making partnerships with other companies. The legacy left by Forms with all the business rule on the developer’s hand is not very good for the company, the business analyst does not know very well what rules are deployed, it is not easy nor quick for change them.

Fortunately Oracle followed the evolution acquiring partner companies, evolving their products and many of them focused in the business, implementing visual business flow (Business Process Execution Language – BPEL), business rules tools arrived, isolating business rules of the source code, making it very easy and fast editing. It’s not necessary implement your screen functions from scratch, a new paradigm emerged service-oriented-architecture (SOA), where there is a service bus that (Oracle Service Bus – OSB) exposes the enterprise service catalog and then, service is reused, saving up money with development, making it easy to maintain, starting new projects more easily, because with the reuse many things are ready when we need to build a new software in the enterprise. Partner companies could not communicate in the past because of the use of different programing languages and this is possible ​now by using WebServices over the internet, through the universal language called XML (Extensible Markup Language), new partnerships can be stablished, systems can be integrated and business leveraged. Manual processes made in the past by paper, email, phone calls, spreadsheets, tickets and text messages can now be computerized through the BPM (Business Process Management), the audit trail of approvals, analysis and comments are permanently saved, the information is protected, digitalizing process is saving the paper quantity used in times where the planet claims for help. Many governments have adopted processes digitalizing solutions, there is a product called Oracle UCM (Universal Content Management) that stores documents, even confidential, digitally signed with personal digital certificates, reducing fraud of manual signatures. Customers with mobile phones always is communicating with the companies: using the service channel to pay their bills, to buy products, ask for some support or share information. Smart shopping recommendation systems send messages to customers, encouraging them to buy. Really new times came, the technology has evolved, things are faster and who’s out of this process lose customers to the competitioners.

Said that, it is natural that many companies will want to apply these concepts, but where to start ? An important recomendation is that SOA is a concept, not a suite of tools that you can buy, install and all will be ok. Many companies are failing for not paying attention at this point. A cultural change is necessary, business leaders should take the lead and map very well their business processes, modelling the entities of your company, XML schemas known as Canonical Model, the developer no longer owns the business rules in the company, a renewal is required, the staff in many cases need to be replaced by others, with a more appropriated skills, if the company does not have an architecture team, this is a good start, create a team that advise the business people on how to things work, designing simple solutions to resolve complex problems. Oracle offers an excellent product, known as Soa Suite, a complete tool, with many effective resources, but alone it is not possible to cause any change at the company.

This work can start in a incremental way, with a little pilot of an important flow for the company and when the benefits have been demonstrated, the adoption can be increased for other projects of the company. You can start with the design of the business flows, modeling the corporate entities, electing candidates to become services, which in fact are reusable and increases value to the company, the business rules are created in the appropriated tool, then the previously flows designed can be implementated using BPEL languange for example, manual processes can be implemented in BPM, sensors measuring the business flows are installed, generating real time dashboards for business team, enabling them to act proactively to achieve the goals, for example, if the sale is not good and dashboards are indicating the bad scenario, promotions can be launched, actions are taken to encourage the sale in the shop and the situation can be reverted, as opposed to look at sales reports at end of the day or month and to check that the goal was not reached, proactivity is the keyword. Another common difficulty is that the SOA suite ships with many products (BPEL, BPM, OSB, BAM, ADF), people get lost, do not know what is the role of each product, implementing more things that should on a specific product. Here’s a tip on what and how to implement each module:

OSB: It should contain generic, reusable web services without any business rule, only routing and enrichment of messages.

BPEL: Light business flows, more complex rules must be implemented in any programming language and should be exposed as a service for a bpel flow orchestration, this flow represent the business, and not contain details of development implementation.

BPM: It must contain only the manual business flow, without business rules, it must rely on previously services made, almost never access directly the database, generally require notification services, whether e-mail, sms, social networking and others.

BAM: Monitoring Dashboards cannot cause overhead on the transactional database to generate the graphics, the necessary information should be used as an asynchronous messaging, sensors embedded in bpels or a replicated database to make the queries.

ADF: Framework that will replace Forms in the near future, screens are written in Java using Java Server Faces (JSF), all new Oracle products are already made using adf, enterprise manager for example. In BPM Suite, adf is widely used, because the screens are automatically generated in this product.

What is gained by doing this all worth it ?

The advantages are an I.T. department that speaks the language of business, saving money through reuse, automating manual processes that before were exposed to errors, agility for the company, fast changing their business rules reaching the necessary time to market, flexibility and high availability for all of these products work in auto scalable clusters ensuring maximum stability to the customer, ease of communication with external partners, security in communication and many other benefits.

What is needed to do this ?

A financial investment for the acquisition of software and hardware needed
Be aware that a culturally change is required in the company.
Relocate, demit, requalify and hire new people.
Rely on the expertise of qualified professionals to advise the company.
Breaking paradigms and accepting some risks.

What do you feel makes Oracle Users community special ?

Oracle is a large company present in many countries and special in this community is just it. The interaction with many cultures, and learning technology, you gain life experience.

If you could magically suggest all of your Oracle community members one thing in this world, what would it be, and why ?

I suggest that community members to create a personal blog, because of it i was invited to this podcast, invited to be a become a tecnical review of a book about Oracle ADF in last year and i often known people that come in at my blog of other countries. I feel very good about being helpful to people around the world.

For someone new to Oracle , how do they get the most out of it ? or how they should start a career in Oracle Middleware ?

There are many books about many products of Oracle Technology, mainly mostly books from Packt Publishing who is doing an excellent job around the world launching many books, written by members of the Oracle community around the world. For more senior people i recommend that they open schools and courses that offer Oracle Technology, my work friend try this here at Brazil (http://www.soaexpert.com.br/ and http://www.sciensa.com/) and it is success, training many people that offer more quality work for the Brazilian companies.

Thank you to OTechTalks to invite me for this Podcast Session. It was a pleasure to share my knowledge with the world, i am very happy with this.

I started a sample project which could reproduce the problem to show the community what I was experiencing, but to my surprise I was using the partitioner feature incorrectly. I am writing this post to share what I learned throughout this experience to help those who are going through the same questions.

My Goal: I wanted to use the resource partitioner for parallel processing but was worried to use the primary key of the table (column ID) because my table has gaps (id column is not incremental) and for this reason the partitioner would distribute number of different records for each thread, thus being inefficient in their distribution.

The Problem: Thread 1 receives only two records to process (The Id’s 1 and 8) and the thread 2 will receive 7 records to process. At this case the partitioner to split incorrectly number of records between threads.

My Goal: I want to split the number of records equally between all threads.

Where I was going wrong: To achieve my goal I tried to use a query that makes use of rownum and / or ntile oracle feature, the goal was to use the split an id that is sequential, with no gaps in the id column table, so the load would be uniform among the threads. The JdbcPagingItemReader class can not be used with multithreaded characteristics using Oracle ROWNUM because the query is partially executed multiple times in the database and there is no guarantee that all records are processed because a confusion of Ids between threads occurs.

The correct way: You can use JdbcPagingItemReader using the Primary Key column (may be single or multiple columns) or JdbcCursorItemReader can use both the PK column or Rownum / NTILE to do division.

Why use JdbcCursorItemReader not cause problems of mistaken IDs or lost records ?

This class executes the query once the database and will use chunk mode to fetch the records as needed. If you use a rownum column in this case will not cause data loss because every query is processed only once in the database.

To illustrate and facilitate understanding, I created a design example set with various possible configurations available here:

JdbcPagingItemReader-OracleNtile – It not works, don’t use this. PagingReader does not work with NTile

JdbcPagingItemReader-OracleRownum – It not works, don’t use this. PagingReader does not work with Rownum

JdbcPagingItemReader-TablePrimaryKey – It works, but the records aren’t distributed in an uniform way (same quantity for each thread)

What is Oracle NTile ?
This feature of Oracle Database can create a desired number of containers so that each thread can consume one. For example: I have 1000 records in the database to be divided among 10 threads:

Posts navigation

Victor Jabur

About Victor Jabur

Victor Jabur is a SOA / Java Consultant. Bachelor in Information Systems at University of Sao Paulo (USP). Works with Oracle Soa Products at Dscon, an Oracle Platinum Partner. I like to study and use the Python Language and your powerful web framework Django.