Showing posts with label Mule 4. Show all posts
Showing posts with label Mule 4. Show all posts

Wednesday, August 30, 2017

Mulesoft Milestone Demo: Mule 4 and Studio 7 - Highlights & Discussion (Part 2 of 3)

In this post I will discuss the highlights of the Mulesoft's webinar -  Mule 4 / Studio 7 Beta Walkthrough. This webinar is the second part of a three part series that Mulesoft is providing to introduce and drive beta testing of the new Mule 4 platform that includes improvements to the Anypoint Platform, release of Studio 7 and release of Mulesoft engine 4.

FAQ Review

  • Mulesoft is looking for feedback to what they have changed in mule 4.  I will be downloading and trying out some of the new features and look for additional posting as I dive using 
  • Some  users are having issues with new Studio with no connectors and this is caused by not having the JDK in the system path before any jre installations.  Studio 7 requires the additional tools from the JDK to run all the components.  I hope this is called out in the documentation or a check is added to the start up of Studio 7 letting the users know.  Here is a screen shot of the error from the webinar:
Error from Studio 7 when the JDK is not used to start it
  • Mulesoft now has a page tracking the changes for Mule 4 - https://mule4-docs.mulesoft.com/mule-user-guide/v/4.0/mule-4-changes
  • The next Mule 4 Beta release will focus on - Mule SDK, CE distribution with DataWeave(This could be an interesting development and might allow for a hybrid license/open source deployment models), APIkit DataSense support, Scripting components, API Gateway, DataWeave support for COBOL copy book/flat files and new connectors

DataWeave Expression Language

  • Why DataWeave?
    • memory handled by the egnin
    • random access
    • concurrent access
    • cache payloads if larger than memory
    • reduce steps in flow - don't have to learn MEL and Java to get access to data
  • When to use DataWeave?
    • Mulesoft's opinion is that integration logic should be broken apart for separation of concerns, testability, maintainability and using the best tool for the job.  I agree with the  
Mulesoft's stance that Flows should only sequence data and operations, Expressions should transform, extract and make flow decisions and code should be used for business logic and formatting
      • Flows - should only handle sequencing of data and the operations of data.  I do agree that this makes sense that flows are well suited to control the flow of the data and operations against the data.  This really shines in the studio with the ability to create a visual shell of how data and operations to data would work without writing a line of code.
      • Expressions (DataWeave) - Mulesoft has optimized DataWeave for data and with built in streaming it makes it easy to have random access to the data throughout the flow,  the code will be less verbose and easier to maintain
      • Code (Java Classes or Groovy, JavaScript (Rhino), Python, Ruby, or Beanshell) - Mulesoft recommends externalizing the code outside of mulesoft and allowing mulesoft to make calls to it.  This really seems no different than the API Led Connectivity and if your calling code it really should be built as a micro service that could be fronted by a Mulesoft API or not.
  • Calling Java code from DataWeave 
    • The webinar does a review of how to call Java code from DataWeave, however I would avoid doing this so the DataWeave expressions focus on data and not business logic which can be built in.
  • Simplified Precedence Rules
    • All operators and traits are functions in Mule 4 will make it easier to understand DataWeave
Example of Mule 3 and Mule 4 for Operators in DataWeave
    • The style for name types seems cleaner to me, but I think this is really just a personal preference on this change 
Example of Mule 3 and Mule 4 style changes for type names in DataWeave
    • The additional parentheses will drive developers up a way, but I think in the end we will actually appreciate the auto complete when building complex DataWeave operations
Example of Mule 3 and Mule 4 for order of operations for DataWeave
    • Typing for Variables/Function Parameters
DataWeave Function and Variable Definitions
    • Multi Line comments is now supported!!!!
Example of a multi line comment in DataWeave

Streaming

  • Payload is read into memory as it is consumed
  • Concurrent & random access is enabled
  • Streaming defaults can be customized on a stream strategy 
    • File Store (This approach is actually faster than in memory)
      • half MB stored in memory and rest is stored to disk and read in in half MB chunks
    • In Memory
      • half MB stored in memory and is incremented
    • Example how to configure the stream:"
Mulesoft Stream Configuration Example

    • Streaming can be disabled
    • Streams can work for object as object streams
Mulesoft Object Stream Example

Execution Engine

  • Processing strategies and exchanges no longer needed
  • Flows are non blocking
  • Flows are synch by default (Same as Mule 3)
  • Use async instead of one way exchange pattern
  • Global thread pools for all flows
    • These pools can be configured 
    • Thread pools are now built around I/O, Light CPU and Heavy CPU and the number of threads is optimized for you
  • Controlling Concurrency - Coming soon in a release candidate and will be controlled at the flow level and it is not controlled at the thread pool level
    • This removes processing only one message at time for that use case

Additional information:

Monday, August 28, 2017

Mulesoft Milestone Demo: Mule 4 and Studio 7 - Highlights & Discussion (Part 1 of 3)

In this post I will discuss the highlights of the Mulesoft's webinar -  Milestone Demo: Mule 4 & Studio 7.  This webinar is the first part of a three part series that Mulesoft is providing to introduce and drive beta testing of the new Mule 4 platform that includes improvements to the Anypoint Platform, release of Studio 7 and release of Mulesoft engine 4.

Simplified Development and Studio 7 Improvements 

Data Access and Transport Streaming

  • Dataweave can be used directly in connectors.  
    • This should help developers have a common data access model
    Screenshot of Dataweave in a choice
  • Auto Caching of payloads larger than memory space 
    • Developers will have to be cognizant that the cache would most likely be not encrypted on disk and care will have to be taken when dealing with  PHI or PCI data)
  • Mule now allows access to payloads without the need to transform to java objects
    • This will reduce clutter in flows and allow for developers to focus on the work and not transforming data.

Simplified Connectors (File, JMS, FTP and VM)

  • Now operation based such as read file, write file, read jms, etc...  
    • Studio 7 will actually have new connectors for each operation which will make it a lot easier to use these types of connectors 
  • Retry logic will be built in
    • Really looking forward to more information about retries as this is a pretty basic use case in data integration 
  • Mulesoft provided a simple flow with a filewatcher, File Create Directory and File Write connections to highlight how it will work
Mulesoft Flow where reading a file and write is three steps and shows how the developers can focus on business value and not simple data transforms

Try Catch Scope Improvements

  • Try block introduced to allow try catches at any point in the flow
  • Errors that can be caught are now displayed in Studio to allow for easier 
  • The catch block can propagate errors to calling flows
  • Improved exception information and still able to get low level exception trace
  • Example from the slide deck that highlights wrapping components and how the error types are called out:

1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<try  
  transactionalAction=”ALWAYS_BEGIN” 
  transactionType=”XA”>
  <http:request .. />
  <email:send .. />
  <error-handler>
 <on-error type=”500_STATUS_CODE”>
   <notify-admin-of-possible-bug/> 
 </on-error>
    <on-error type=”CONNECTIVITY”>
      <notify-admin-critical-error/>
    <on-error>
    <on-error type=”WRONG_ADDRES”>
      <send-email/>
    </on-error>
  </error-handler>

Runtime Changes

Connectors distributor outside the runtime

  • The runtime now isolates the connectors from the runtime which allows the connectors to be upgrade independently of the runtime.  This will be be helpful if you need a new feature of a core connector, but don't have the time to wait for a full upgrade
    • It appears that the Anypoint Exchange will be how the connectors will be managed and it also appears from the webinar that you will be able to extend your APIs as connectors in exchange and then pull them into Studio 7.  If this works as it looks it will drive reuse and make it really use to use other teams APIs

Self Tuning Runtime


  • Mule engine is now non blocking
    • This will help with high load APIs and interested in any metrics Mulesoft will have around this
  • Tunes based on the workload such as high IO processes will be handled differently than high CPU loads
  • Global thread pool with reduced memory footprint


Mule API and SDK

Single Extensibility Layer


  • Mulesoft will now have a single extensibility layer for Java components, Mulesoft flows and API specs (RAML or Swagger)
  • Consistent UX for all connectors
  • Enhanced metadata that will allow the Exchange to track dependencies of APIs, measure impacts and measure reuse

Mule 4 Migration 

  • 3.X will continued to be supported till 2021 
  • 3.9 is already planned
  • Migration tools are being developed 


My thoughts are Mule 4 is going to be an exciting update to the platform and I can't wait for the remaining parts of the webinar.  I hope mulesoft provides additional in depth details around the items in the presentation.

If anyone would like the slide I have found them available at -  https://www.slideshare.net/eaiesb/mule-4-and-anypoint-studio-demo

If you would like to have access to the Webinar or sign up for part 3 - https://www.mulesoft.com/demo/beta/mule-4