Sunday, June 16, 2013

SOA Black Belt Workshop, Day 4: Solution Areas

Sadly, Friday was the last day of the black belt training. The topic of today was Solution areas. The architecture of OSB was explained by Simone and Rajesh talked about Cloud integration.

OSB Architecture: transports inside out

We have used both OSB and SOA Suite in our projects. Technically, the OSB is part of the SOA Suite. However, the use cases for both are very different. The OSB is a layer to virtualize your services. It offers validation, enrichment, transformation, routing and operation (VETRO) functionality. As Simone emphasized a couple of times, you are not supposed to program business logic in the OSB. You do that in SOA Suite. We discussed what a proper name is for the part of SOA Suite without OSB so you can point to that in your design guidelines. Unfortunately, we did not come up with a satisfying solution.
The presentation discussed the high level architecture briefly, and the core components. This was a bit boring if you had any experience with OSB. I was very pleased when the presentation continued and the architecture of OSB was discussed in depth. The architecture of transports was explained as well as some functional differences between some transports and adapters. This was exactly the kind of information I would expect from a training like this :)  Icing on the cake would have been if the lab would have included creating your own transport or something that showed the MDB that is deployed when you create a JMS transport. Unfortunately the lab was fairly basic and focussed on creating a message flow. It showed all the steps in detail, like many of the hands-on labs that I have attended at Oracle OpenWorld.  Fortunately the other labs during this training were formulated as a specific problem to solve, with little or no hints for the solution. This way you really think about it, instead of just following the steps.
Apart from the architecture of the transports, I took a few new things out of this session: local transports for proxies calling proxies and jejb transports that use POJOs instead of XML.

Cloud integration: fine grained APIs are ruling

The presentation about cloud integration focussed on the challenges one encounters when integrating with cloud solutions.  The example of RightNow, FusionApps and were used to discuss API styles, lack of a consistent set of standards, governance, security and scalability. Interestingly patterns you might want to use internally for performance reasons (synchronous communication) can be a bad idea in cloud situations because of the unreliability of internet connections. So in cloud integration you might apply asynchronous solutions much more often to cater for that. The content of the presentation was good, but even better was the experience that Rajesh brought in while explaining it. We discussed why packaged apps offer APIs instead of coarse grained services. Therefore it is important that you encapsulate these services in your enterprise and offer coarse grained services to the other service consumers. You can use Oracle SOA Suite to accomplish this.

The day ended with another performance lab, showing the difference between latency and throughput and the effect asynchronous communication has on latency.

And so it ended

This concludes the last blog about the SOA Black Belt training. For me it was definitely worthwhile: I learned a lot, practiced some of that and met great new people.

If anybody is interested in participating, they should contact Juergen Kress. I definitely recommend this training!

Friday, June 14, 2013

SOA Black Belt Workshop, Day 3: Architecture Internals

The topic of today was architecture internals.

Adapters: added value 

We were supposed to start with Fault handling, but the adapter session by Niall was preponed. He is a very good presenter, but unfortunately part of the slide deck was the usual marketing mumbo jumbo about how easy it is to integrate to any system. Since this day was "architecture essentials", I would have enjoyed a discussion on whether you want to use an adapter or build a 'proper' web service in Java more. The lab that accompanied this session was fun: we needed to fix the adapters that were configured beforehand. It was very much like what happens in real life.

Fault handling: expect the unexpected

The session on fault handling did not cover anything new as far as I am concerned. There is a lot of material out there that covers this topic. A lot of emphasis was placed on transaction management. This makes sense in the context of Fault handling, but it made the whole thing a bit repetitive. I would have preferred a shorter presentation about the different fault types and then a lab where we would actually build complicated fault handling scenario's (catchAll, fault policies, rolling back transactions). 

Security: we all have our role

Flavius explained the OPSS framework, virtual directory and how you can manage application roles in Enterprise Manager. This is particularly relevant in a human task service. A lot of people I know use groups in LDAP for that which makes the groups way to fine grained to be manageable. The other feature I was not aware of was using a light weight OVD by turning on 'virtual' in the WebLogic console.

Performance tuning essentials: a journey through the database 

Niall then traced all the database inserts and updates for a simple BPM process. It was interesting, but the title was misleading. The important part to remember is that every design decision you make in your composite as a developer will result in a write to the database. Performance is not always the key requirement, but it is something to take into account, of course.

Fusion apps: oer is the new irep

Niall showed us the Oracle Enterprise Repository for Fusion apps. It contains all the business objects, Web Services and other artefacts that you need to integrate with Fusion Apps. A lot of the integration is still based on an API model, rather than services. From a product vendor perspective it makes sense, but as an implementer you need to make sure that you don't expose all these fine grained services on your Enterprise Service Bus. 

Anti patterns are the new patterns

Ravi Sankaran did the last session over the phone. He presented a number of anti patterns, reasons why they occur and recommendations to follow to avoid them or only apply them if needed. The content was interesting but listening to somebody over the phone in a hot room (27 degrees and humid outside) after three days of training is not the best condition for knowledge transfer. I will have to take a look at the slides as soon as they are available.

The evening

Jürgen organized a boat tour and a really really nice dinner at a very interesting restaurant and handed everyone their blackbelt. It was a great way to talk to some new people and to see something of the city at the same time. 

Tomorrow is the last day, then it is back to reality again...

Wednesday, June 12, 2013

SOA Black Belt Workshop, Day 2: Engine Internals

The second day of the workshop took a deep dive into EDN and two service engines: the Mediator and BPEL.

Mediator Service Engine: parallel routing and the resequencer 

This was very interesting because the threading and transactions within the parallel routing rules were explained. I like to use mediator in composites, but had never encountered the need for parallel routing rules. The explanation helps especially when you look at performance issues in your composite.
The storyline about the fabric was continued nicely in the discussion about the Mediator component: Simone explained what operations were implemented by the service engine. On top of that she told us what type of threads are active when handling parallel routing rules. 
Next up was the resequencer. It is a very powerful mechanism to put messages that are out of order back in sequence. The only caveat is that it is sometimes really difficult to determine the right order. Unfortunately this can't be easily solved by a tool ;) 

EDN: making governance easier

Business events is a concept that is well known to E-Business Suite users. This concept has been used in SOA Suite too. It abstracts away the implementation of a the events (JMS or AQ) from the developer and (the most important feature) makes governance of events easier. Because you can keep track of the events you can subscribe to, and of the subscribers to events. This features is applied in Fusion apps and OER. During this presentation I learned a number of new things: The AQ implementation has a Java API that allows you to publish business events. Secondly, there is an extra queue for Once and Only once implementations (and it makes sense ;) ).

BPEL Service Engine: the Cube engine and idempotent invokes at Starbucks 

I know the BPEL engine fairly well after doing work both in BPEL10g and BPEL11g. So I was afraid that this part would be a bit boring for me. Fortunately, it started with a section about the Cube Engine and the components of this engine. It validated the mental model in my mind and added a lot of information to it. An interesting detail about BPEL 2.0 is it generates the runtime model in memory during load(). Some things about the BPEL engine were new to me: the possibility to set an invoke to non-idempotent (causing it to dehydrate the process), and the methods from the Fabric that are implemented by the engine. Last but not least, the function of the two threads, invoke threads and engine threads were explained. This helps a great deal in tuning the performance of your BPEL engine! 
In the session about correlation Simone told us about a mnemonic from Gregory Hohpe I will never forget: only the customer cares about the correlation id (your name and your drink type). The same is true for your BPEL process: Whenever you implement correlation, remember where to define it by realizing that only the 'waiting' process needs to define correlation sets, like the customer at Starbucks. The barista couldn't care less. He or she only cares about preparing the drink!

We did not have enough time for all the labs; I am going to do the resequencer lab as soon as I publish this post. However, the correlation lab and the performance lab were a lot of fun and especially the performance lab was challenging!

One thing is for sure, after today I know a lot more about the database structure and the threading models that are used by the service engines. This will make tuning a lot easier. Again, I can't wait what tomorrow will bring....

Tuesday, June 11, 2013

SOA Black Belt Workshop, Day 1: Infrastructure Essentials

Today was the first day of the SOA Black Belt Workshop that is organized by Jürgen Kress and is delivered by people from Product Management: Flavius Sana, Simone Geib and Rajesh Raheja.

The theme of the day was infrastructure essentials. There were four topics. I took away the following points:

WebLogic Server essentials for SOA: CAT, Errors and Exceptions

Flavius explained how class loading works in WebLogic. As a JEE developer, this was pretty straight forward. However, I still learned two new things:
  • Using CAT, WebLogic Server class loader analysis tool to analyze class loading on WebLogic (http://localhost:7001/wls-cat/ )
  • The difference between a ClassDefNotFoundError and a ClassNotFoundException. Knowing the difference helps in trying to solve class loading problems. The ClassNotFoundException is an exception from a class loader that tries to load a class that is not available to that specific class loader. The ClassDefNotFoundError is an error because a class that was there during compilation can not be found by another class at runtime. There was an interesting lab to show the differences. 
Tip for the organizers: it would have helped my understanding a lot if you would have drawn a picture that showed in what library or war file what class was residing. Because of the name I was incorrectly assuming the CLTestHelperInner was in the same jar as the CLTestHelper class and it was unclear why the ClassDefNotFoundError was thrown. 

Another interesting topic was the server architecture, including WorkManagers in WebLogic. Unfortunately there was not a lot of time spent on this topic and there we no labs about this either.

SOA Composite essentials: what will 12c bring us?

This was an overview of what a composite consists of. As far as I am concerned this could have been skipped: we were all supposed to have prior knowledge and experience of the SOA Suite. The advantage of covering the subject was that we got to ask Simone a bunch of questions about plans for SOA Suite 12c :D

SOA infrastructure essentials: the stack trace, the soa bundle and the reference endpoint

The first part of this presentation covered some basic stuff, like SCA and Spring. Then it got really interesting: Rajesh showed us the Spring configuration of the Fabric (Service Infrastructure) and the Message routing that occurs when a request is delivered to the Service infrastructure. It makes the stack traces that you find in SOA Suite a lot more readable and usable!

In terms of deployment the one new thing I learned was to combine a MAR (MDS archive) and a SAR (a SCA archive or JAR) into one ZIP file, a SOA Bundle. Usually I deploy the MDS artefacts separate from my composites. The advantage of the SOA Bundle approach is obviously that your MDS artefacts don't get out-of-synch with your composites. The downside is you create new versions of the documents in MDS that are part of the application even if you did not change these artefacts.

Tip from me: Use deployment scripts rather than deployment from JDeveloper or Enterprise Manager and don't go crazy with the SOA bundle option: you don't want to redeploy everything in your workspace every time.

Last but not least he explained that you can only override endpoints from WSDLs that are local to the project (or composite). So overriding the endpoint in Enterprise Manager from a reference that has a remote WSDL location won't work. Unfortunately you can't see this in Enterprise Manager, the only way to know this is to look in the composite.xml and inspect the location of the WSDL. This was shown in the lab. This lab did not add a lot of value in my opinion and could have been skipped.

MDS Essentials: tell me more!

This was a very basic overview. Unfortunately it did not cover the data structure(s), purging and other topics that I was expecting from an advanced class like this. The lab showed some basic stuff like creating connections to MDS and deploying the SOA bundle from JDeveloper. And again we talked about the upcoming version of SOA Suite 12c :D

All in all a very interesting day with interesting people. I can't wait to see what tomorrow will bring!