OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

soa-rm message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [soa-rm] MSA: list of questions to experienced MS developers -- round 1


Generating comments to the use case email as I also go through this.  Some comments in one are also relevant to the other.

Ken

On Feb 12, 2017, at 4:07 PM, rexbroo <rexb@starbourne.com> wrote:

I've entered my thoughts and how aspects of my use can be used to explore those questions below Ken's comments.

Rex


On 2/11/2017 6:43 PM, Ken Laskey wrote:
Some thoughts and further questions inline.

Ken
------------------------------------------------------------------------------
Dr. Kenneth Laskey
MITRE Corporation, M/S F510          phone: 703-983-7934
7515 Colshire Drive                           fax: 703-983-1379
McLean VA 22102-7508

On Feb 1, 2017, at 5:12 PM, Martin Smith <bfc.mclean@gmail.com> wrote:

Ken/all--

OK, pursuant to my action ("develop questions") from today's meeting, I looked at discussion of MSA captured in recent minutes.  I think the following captures most of what has been discussed (though probably not exactly how anyone else would have experssed it. <g>) 

Consider this the first draft of my homework. If I get comments or additions before the next meeting I'll make an effort to incorporate them.

Regards,
Martin

Starter list: 

  1. Are all/most MS deployed in containers? (Examples of exceptions?) 
Seems if not containers, then VMs.  This then depends on VM/container tradeoff.  I don’t recall seeing a microservice deployed separately from a VM or a container
From his website microservices.io consultant Chris Richardson cites six microservice deployment patterns:
Multiple service instances per host: "... Run multiple instances of different services on a host (Physical or Virtual machine). There are various ways of deploying a service instance on a shared host including:
  • Deploy each service instance as a JVM process. For example, a Tomcat or Jetty instances per service instance.
  • Deploy multiple service instances in the same JVM. For example, as web applications or OSGI bundles..."
I wonder how performance measures up when multiple microservice instances are running within a single JVM, for instance?

I think that behind the scene with Severless deployment and Service deployment platform we could find VMs or Containers/Pods but they are provisioned opaquely on the fly by the PaaS providers (various clouds, AWS, MS Azure, etc.)

From the use-case: there could several different microservices that use only certain parts of the raw XML CAP alert message, e.g. the <event>, <headline> and <instructions> which could then be delivered by the microservice to end users on mobile devices(smartphones) as small windows/panes, desktop webpages where they are inserted into small windows within a webage, and as scrolling text across television screens as we see in regular EAS tests.

See deployment comment in use case response.
  1. How does MSA encourage re-use? (Is it even a goal?) 
This still isn’t clear.  If an application consists of communications across numerous microservices, there doesn’t seem to be a reason not to reuse a tightly scoped microservice that has wide applicability.  The microservice would likely be stateless and I believe best practice would  say to avoid integration through the local database.
I don't think that MSA does encourage reuse because it encourages formerly monolithic systems to be decomposed into more atomic microservices that are intended to work together (perhaps through a mutual event-driven approach that "commits" updates) with one microservice using the output of another microservice, but with both/many independently choreographed or orchestrated by sharing the choreography rules or orchestration engine. This decomposition of monolithic systems into what can be thought of as relatively "closed" MSA ecosystem doesn't lend itself well to having some other MSA ecosystem to use a particular part of the former MSA ecosystem. For instance, an authorization microservice for an investment banking MSA ecosystem probably wouldn't work well for a credit card MSA ecosystem, even if it was for the same corporate conglomerate.

From the use-case: there is a case to be made for a CAP Alert Microservice that could be shared because the CAP-v1.2 specification is so small that the data-rich content could be sliced and diced a dozen different ways by other microservices for delivery to different devices as noted in 1. above. This is something that I am looking into.

A long time ago (or so it seems), I asked whether “reuse” was simply making a local copy of the service to be “reused”.  I think the answer for microservices is yes.  An application can combine several microservices (say) running in there own containers.  If Rex developed an OAuth2 authentication service and Martin needed the same functionality, Martin could spin up an instance using Rex’s image, but Rex’s instances would be local to Rex and separate from Martin’s instances except for the image that is their common lineage.  Change that image and all instances subsequently spun up are again in synch.  Don’t update instances, just regenerate them.

Note this is a significant difference from what we said for SOA.  For SOA, we said a consumer used a service from the endpoint at which it was being offered rather than (except for mirrors) having separate local copies.  This was because keeping distributed copies in synch was likely to be a nightmare.  However, this was before we could spin up instances of fully-configured compute resource images like candy.

Now, do teams doing development have a way of knowing what neat things another team has already done.  There we are back to the discovery challenges that burdened SOA.  The only things clear was that UDDI was not the answer.
  1. by more than one MS? (Rex)
Falls under Event-Driven Data Management.  One of the benefits of the NGINX eBook is it discusses this in more detail than I’ve seen handled elsewhere.
From the use-case: this is exactly what I'm looking into because the data in a CAP message is fairly easily teased out into special concerns since it covers everything from daily occurences to major events, so while the weather service handles the regular repeating meterological events, other CAP feeds come into play for "Amber" alerts, or roadway closures, or fires, etc. With the worldwide adoption of CAP, there are too many, rather than too few use-cases to be analyzed. And that doesn't touch the surface of the whole Emergency Data Exchange Language (EDXL) set of specifications--they are all data-heavy.

One thing I’ve done in my day job is to use processing that is common no matter what the specific content and have a parameter that identifies the content schema (or other data structure) to branch off to schema-specific processing.  If a particular service understand the schema, it does the processing; otherwise, it throws a known fault.  Sending an alert when a source changes would fall into a common (reusable) service.
  1. Is it fair to say that MSA doesn't really address how run-time and versioning dependencies across multiple MS or resource owners/providers are to be managed (when multiple "owners" are involved in delivering a complete application)? (Michael) 
Still a good question.  My previous email tonight touches on this.
The links I provided in 1. highlight the fact that these technological choices are crucial and we need to get more results to look at to benefit from the experience of early adopters. That website also has a collection of such use-cases and if you have the patience to follow links, also offers example code. Warning: this is a Java guy. So am I now that I think about it. Never spent a lot of time in the .Net universe. However, the work I'm doing now to promote adoption of EDXL demands agnosticism and the cloud environment doesn't seem to favor one platform at the expense of others and the Linux/Apache server world still holds sway. At least as far as I know.

And what I think I was referring to from “previous email tonight”
- Microservices talk to independent deployment of services, and this is potentially the same fallacy as advocated for SOA, i.e. if the interface still works, a new service version (or alternate service) can be swapped in for the one you thought you chose.  Assuming the new service does something differently than the old one, it was never resolved when the consumer needed to be told something changes vs. no notice and just the danger of unpleasant surprises.  I consider this an open issue.

  1. What is the basis for any run-time performance benefits attributed to MSA?  Are there inherent efficiencies in inter-process calls, for example?  If so, are these efficiencies due to MSA or to container architecture? 
Think I’ve seen some RedHat material on performance.  Need to distribute a reference.

see RedHat attachment.  I can provide link to register for the audio.

Attachment: When_Containers_and_Virtualization_Do_-_and_Don’t_-_Work_Together 2.pdf
Description: Adobe PDF document


I think the main point to Microservices was to strip down to optimal functionality for just this purpose, plus the ability to respond to market with continuous deployment so that both the velocity of processing and Lean-DevOps programming move in lockstep to maintain optimality.

I think this is the heart of our discussion on appropriate scoping of finer-grained Microservices or coarser-grained  SOA services. Also we need to think about how to optimize inter-service messaging for event-driven architectures.

We also need to think about how to ensure eventual-consistency
  • from finer-grained dedicated key-value tabular ACID databases (which highly favors JSON data representations rather than XML-based data representations) per microservice instance
  • to regular 2-phase ACID commits from those rapidfire RESTful databases to enterprisewide or formerly monolithic relational datastores where the eventual consistency gets achieved (maybe whole seconds after enduser transactions) and maintained with full SQL functionality.
I haven't found any discussion of this yet, but I'm sure somebody must have thought of it. This could be one way to marry MSA to SOA.

The explanations that touch on this say to give up on 2-phase ACID commits — just ain’t gonna happen across microservices.

From the use-case: this is one problem that isn't encountered much, but an example in the case of a Winter Storm Warning update would be the added <instruction>Chains are now required from Truckee to South Lake Tahoe on I-80 from 2:30 A.M January 22, 2017 until 12:00 P.M. noon January 22, 2017</instruction> Each microservice that pulls this feed would then update its local database and format the data according to whatever device/application it delivers the change to. Since this is the last-mile to the enduser there is no need to update any other database

I think this follows the Notional Solution I suggest in the parallel use case email.
  1. In a typical MSA-based application made up of multiple MS (plus back-end resources), is there a standard/typical way to control application flow (functions like orchestration, choreography or workflow)? If there is such a  standard/typical component in an MSA-based application, what's it called? (Possibly related: what functions does an "API Gateway" commonly perform?)   
Martin once asked whether an API Gateway is the new ESB.  For me, that is more of a question after reading the NGINX D&D eBook section on the API Gateway.  In particular, what does it mean for the API Gateway to get a request, distribute it to multiple microservices, and then recombine into the final answer?  As with traditional SOA, I can minimize the dependencies for a component service but I still have the dependencies of the “integrating” controller on the pieces it integrates.  The NGINX eBook also notes the API Gateway becomes a critical high availability component.
My reading indicates that we are still faced with the old orchestration or choreography choice. And, of course, we see a lot of combined-product offerings like Red Hat's combination of OpenShift/Kubernetes for container clusters on the orchestration side. Unfortunately this can lead to contract-side coupling and can actually inhibit finding the most appropriate design for a given proposed-scope Microservice. Apparently the smart endpoints-dumb pipes approach of choreographing MS is finding wider appeal. Quoting from the link immediately preceding,

"...Applications built from microservices aim to be as decoupled and as cohesive as possible - they own their own domain logic and act more as filters in the classical Unix sense - receiving a request, applying logic as appropriate and producing a response. These are choreographed using simple RESTish protocols rather than complex protocols such as WS-Choreography or BPEL or orchestration by a central tool. The two protocols used most commonly are HTTP request-response with resource API's and lightweight messaging..."

From the use-case: this is what we are doing with CAP through an adaptation of Google's CAP Validator which uses a protocol buffer. That protocol buffer is a kind of combination of HTTP request-response and lightweight messaging that can be used between microservices or for capturing direct input from endusers. What are protocol buffers?  You can play with the validator using the newly revised use-case example I will be sending shortly or Google's CAP examples available on the site.

Please note:
when I pasted the xml of the original use-case example into the validator it threw an error so I had to copy the WGS84 coordinates from one of Google's example CAP messages and pasted it into the example to eliminate the error and then pasted the corrected CAP xml into the validator and it worked! I have pasted those same coordinates into the use-case example and sent it to the list again so we will have the corrected version to use.


  1. What are the [three] main benefits of MSA?  How does MSA deliver each (vs a specified alternative methodology)?  (What architectures were MSA developers typically using before adopting MSA?)  
If microservices is SOA done right, the major benefits of microservices are their convincing realization of what SOA was intended to be.
Agreed.
  • Benefit 1. Better, faster user experience of service on the web because the combination of microservices behind the interface operate faster and more reliably because they are simpler, focused on doing their single responsibility scoping as well as they can.However we need better metrics to measure this.
  • Benefit 2. Easier to change or improve and deploy due to smaller size and scope, so more adaptable, too. Due to Lean-DevOps teaming approach.
  • Benefit 3. Improved scoping of decomposed monolithic system SHOULD reduce overall costs by eliminating wasted efforts.







  

--
Martin F Smith, Principal
BFC Consulting, LLC
McLean, Va 22102
703 506-0159
703 389-3224 mobile


-- 
Rex Brooks
Starbourne Communications Design
Email: rexb@starbourne.com
GeoAddress:
1361 Addison St. Apt. A
Berkeley, CA 94702
Phone: 510-898-0670 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]