Home Blog Page 55

Google Summer of Code + Zephyr RTOS

The Google Summer of Code (GSoC) is an international annual program in which Google awards stipends to contributors who successfully complete a free and open source software coding project during the summer. Launched in 2005, GSoC takes place from May to August. Project ideas are submitted by host organizations involved in open source software development, though students can also propose their own project ideas.

This year, the program was opened to anyone 18 years or older – not just students and recent graduates. Participants get paid to write software, with the amount of their stipend depending on the purchasing power parity of the country where they are located.

This is also the first time the Zephyr Project is participating in GSoC under The Linux Foundation umbrella. Please join us in welcoming these contributors and their projects:

Project #1: Arduino module based on Zephyr

1 contributor full-size (350 hours).

Arduino’s popularity is renowned as a popular framework for providing a simplified interface to program embedded devices. Recently, Arduino adopted mbed OS as the base RTOS for some of their newer devices. With that work, they separated out Arduino Core as an independent abstraction layer from Arduino Core for mbed. This opens up the possibility for leveraging Arduino Core on other OSes. The project idea is to create a Zephyr module that leverages the Arduino Core so that a developer can use Zephyr as the underlying OS when they use the Arduino framework on Arduino-compatible devices. The benefits to the user include:

Access to Arduino APIs as well as advanced Zephyr capabilities
Broader set of devices than the standard Arduino ecosystem thanks to Zephyrs’ device support
Ability to re-use Arduino tools like the Arduino IDE and wealth of libraries

Arduino Core is licensed under the GNU Lesser General Public License and Zephyr is licensed under Apache 2. That means this project will most likely need to be developed out of tree and in a separate repo to keep code and license separation. See #22247 for a historic discussion & soburi/arduino-on-zephyr for an earlier attempt prior to the Arduino Core architecture.

The contributor’s task is thus:

Implement a bare-bones Module based on Arduino Core that can compile for any target (no functionality, possibly in QEMU)
Implement a common peripheral from the Arduino API based on Zephyr such as Serial
Target one physical board, such as the Arduino Zero

Mentors:

Jonathan Beri – CEO of Golioth and Zephyr TSC
Alvaro Viebrantz – Founding Engineer of Golioth and Google GDE

Code License: LGPL

Contributor Details:

Name: Dhruva Gole
Project Blog: https://dhruvag2000.github.io/Blog-GSoC22/
Project Poster:

About the contributor: Dhruva is an undergraduate student   majoring in Electrical engineering. He has a broad range of interests from embedded software development to hardware design and has experience in working on SBCs, microcontrollers, and embedded Linux platforms.

Project #2: Apache Thrift Module for Zephyr

1 contributor full-size (350 hours).

Apache Thrift is an IDL specification,RPC framework, and code generator that abstracts away transport and protocol details to let developers focus on application logic.It works across all major operating systems, supports over 27 programming languages, 7 protocols, and 6 low-level transports. Originally developed at Facebook in 2007, it was subsequently shared with the Apache Software Foundation. 

Supporting Thrift in the Zephyr RTOS would benefit the community greatly. It would lead to new software and hardware technologies, new products, and additional means for cloud integration. Thrift can be used over virtually any transport as well and for that reason, it is a natural choice for the many different physical communication layers supported by Zephyr. The project idea is to get the proof-of-concept Thrift for Zephyr Module into shape for upstreaming. To achieve that, the contributor must:

Perform additional integration for Thrift features (protocols, transports)
Author additional sample applications using supported boards or Qemu
Author additional tests and generate coverage reports using the Zephyr Test Framework
Ensure the module follows appropriate coding guidelines and satisfies module requirements
Contribute any necessary improvements back to the Apache Thrift Project.
Contribute any necessary improvements back to the Zephyr Project.

Mentors:

Christopher Friedt – SWE / ASIC FW at Meta and Zephyr TSC member
Stephanos Ioannidis – Zephyr CXX Subsystem Maintainer

Code License: Apache 2.0.

Contributor Details:

Name: Young

About the contributor: Young is a student majoring in  communication engineering, and he will pursue his Master’s degree in computer engineering. He has a broad range of interests from front-end development to hardware design, and has experience in working on the Web, IoT and embedded platforms. A low-cost single-board computer with a RISC-V 64 processor designed by him in 2021 was reported by several geek media.

The post Google Summer of Code + Zephyr RTOS appeared first on Linux Foundation.

ONE Summit North America, Hosted by LF Networking, Invites Industry Experts Across Access, Edge, Cloud and Core to Collaborate In-Person, November 15-16, 2022

LF Networking Announces ONE Summit North America 2022 Call for Proposals  and Registration are Now Open! ONE Summit is the one industry event focused on best practices, technical challenges, and business opportunities facing network decision makers across Networking, Access, Edge, and CloudReinvigorated for 2022, ONE Summit returns in-person November 15-16 in Seattle, Wash. with a more interactive and creative environment enabling attendees to transform, innovate and collaborate together

SAN FRANCISCO, July 7, 2022 LF Networking,which facilitates collaboration and operational excellence across open source networking projects, announced Registration and the Call For Proposals (CFP) for ONE Summit North America 2022 are now open. Taking place in Seattle, Wash. November 15-16, ONE Summit is the one industry event focused on best practices, technical challenges, and business opportunities facing decision makers across 5G, Cloud, Telco, and Enterprise Networking, as well as Edge, Acces, IoT, and Core. 

For anyone using networking and automation to transform business, whether it’s deploying a 5G network, building government infrastructure, or innovating at their industry’s network edge, the ONE Summit collaborative environment enables peer interaction and learning focused on open source technologies that are redefining the ecosystem. As the network is key to new opportunities across Telecommunications, Industry 4.0, Public and Government Infrastructure, the new paradigm will be open. Come join this interactive and collaborative event, the ONE place to learn, innovate, and create the networks our organizations require. 

“We are pleased to host a rejuvenated ONE Summit, which brings the ecosystem together in-person once again,” said Arpit Joshipura, general manager, Networking, Edge, and IoT, the Linux Foundation. “With a shifting industry that must embrace traditional networking now integrated across verticals such as Access, Edge, Core, and Cloud, we are eager to gather to learn, share, and iterate on the future of open collaboration.”

The event will feature an extensive program of 80+ talks covering the most important and timely topics across Networking, Access, Edge, and Cloud, with diverse options for both business and technical sessions. Presentation tracks include Industry 4.0; Security; The New Networking Stack; Operational Deployments (case studies, success & challenges); Emerging Technologies and Business Models; and more. 

The CFP is now open through July 29, 2022.

To register, visit  https://events.linuxfoundation.org/one-summit-north-america/register/. Corporate attendees should register before August 20 for the best rates. 

Developer & Testing Forum

ONE Summit will be followed by a complimentary two day LF Networking Developer and Testing Forum (DTF), a grassroots hands-on event organized by the LF Networking projects. Attendees are encouraged to extend the experience, roll up sleeves, and join the incredible developer community to advance the open source networking and automation technologies of the future. Information on the Spring 2022 LFN Developer & Testing Forum, which took place June 13-16 in Porto, Portugal, is available here.

Sponsor

ONE Summit  is made possible thanks to generous sponsors. For information on becoming an event sponsor, click here or email for more information and to speak to the team.

Press
Members of the press who would like to request a press pass to attend should contact pr@lfnetworking.org

About the Linux Foundation

Founded in 2000, the Linux Foundation is supported by more than 2,000 members and is the world’s leading home for collaboration on open source software, open standards, open data, and open hardware. Linux Foundation’s projects are critical to the world’s infrastructure including Linux, Kubernetes, Node.js, and more. Learn more at linuxfoundation.org.

The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see its trademark usage page: www.linuxfoundation.org/trademark-usage. Linux is a registered trademark of Linus Torvalds. 

###

The post ONE Summit North America, Hosted by LF Networking, Invites Industry Experts Across Access, Edge, Cloud and Core to Collaborate In-Person, November 15-16, 2022 appeared first on Linux Foundation.

How to modify SELinux settings with booleans

Use semanage, setsebool, and SELinux Troubleshooter to control SELinux policies and specify which files and processes are allowed to interact.

Read More at Enable Sysadmin

Morgan Stanley, Microsoft, and Regnosys Break New Ground in RegTech with FINOS

This post originally appeared on the FINOS blog. You can also listen to the latest FINOS podcast with Minesh Patel, Chief Technology Officer at REGnosys, discussing his upcoming talk at the FINOS Open Source in Finance Forum (OSFF) on July 13th in London about “Breaking new ground in RegTech through open source TechSprint innovation”.

In the first quarter of 2022, a multi-organisation, multi-location team of developers planned, scheduled and delivered an ambitious three day “RegTech” collaboration challenge.

The event, dubbed a “TechSprint”, looked to demonstrate how financial institutions could comply with trade reporting rules for the upcoming US CFTC requirements using entirely open-source components.

Why It’s Important

Every year, the financial industry spends billions trying to comply with often complex data reporting requirements. For every reporting regime and jurisdiction, firms must typically sift through hundreds of pages of legal text, which they must then manually interpret and code in their IT systems.

As a result, while many financial institutions share the same reporting obligations, they usually implement their logic in slightly different ways due to fragmented technology approaches, adding to risks and costs.

The field is ripe for a shake-up by “RegTech”, i.e. the application of technology to address regulatory challenges. In particular, the ability to build and store the reporting logic in an open-source and technology-agnostic way, and to run it based on open-source components too, could reap huge efficiency benefits for the industry.

Current Landscape

This RegTech space is one that FINOS has been actively investing in. In 2020, FINOS approved the contribution of the Regulation Innovation SIG, a Special Interest Group dedicated to the applications of open source to regulatory problems. Morphir, an open-source project contributed by Morgan Stanley, is positioned as a key component of that Reg SIG. Morphir allows to represent, store, share and process business logic in an implementation-agnostic way, including the types of rules and calculations often found in regulations.

The industry is also getting better organised to tackle pressing regulatory challenges more collaboratively. Under the auspices of the industry’s existing trade associations, the Digital Regulatory Reporting (DRR) programme is a mutualized, industry-wide initiative addressing the global trade reporting requirements. Those reporting regimes are being updated across the G20 and DRR starts with the US CFTC revised swap data reporting rules that go live this year. DRR involves industry participants working together to deliver an open-source, machine-executable expression of the reporting rules.

These two initiatives, Morphir and DRR, looked like a perfect match. A like-minded team of developers sitting across organisations decided to undertake the challenge of integrating them, thus demonstrating that reporting rules can be developed, executed and validated using entirely open-source components – all under three days!

Approach

Technical

In DRR, the rule logic is expressed in a Domain-Specific Language called the Rosetta DSL and then translated into executable code through an automated “code generation” process. The reporting rules’ inputs are modelled according to the Common Domain Model (CDM), an initiative initially championed by the International Swaps and Derivatives Association (ISDA), now joined by other trade associations, and involving many industry participants including buy- and sell-side firms.

The Rosetta DSL and its associated code generators, currently being proposed for contribution to FINOS, are open-source projects developed by technology firm REGnosys, which provides the software platform for the DRR and CDM programme.

The main objective of the TechSprint was to develop a Rosetta-to-Morphir code generator. This would demonstrate that Morphir can be used as a target for storing and executing the body of rules in DRR and that it produces results that are consistent with Rosetta. In addition, the TechSprint looked to provide a formal verification mechanism for the DRR code using Bosque, another open-source project developed by Microsoft that is already integrated with Morphir.

Scope

The first trade reporting regime available in DRR is the CFTC Rewrite, which is rolling out in the US this year. The TechSprint focused on handling a couple of CFTC reportable fields to demonstrate the Rosetta-Morphir-Bosque integration.

Logistics

Building on our proven approach seen over the last two years with the Legend pilot and the Legend hosted instance, the event was run as a “task-force” where teams sitting across organisations’ boundaries collaborated and shared knowledge on their respective open-source projects, all under FINOS’s sponsorship.

In total, seven representatives from three teams at Morgan Stanley, Microsoft and REGnosys have worked together for three days across three separate locations in the UK, Ghana and the US.

Given the time zone differences, the TechSprint was held virtually, starting with the UK/Ghana shift and closing with the NY shift. The teams were mostly self-organised, with regular checkpoints throughout the day.

Substantial Results at Record Speed

In just three days, a Rosetta-to-Morphir code generator has been developed successfully. Whilst not complete, it has been shown to handle increasingly complex logic from Rosetta. REGnosys is integrating this deliverable back into Rosetta’s main open-source code-base.

A couple of in-scope reportable fields were successfully tested by running the Morphir-Scala engine on a sample trade population and displayed in a UI, matching their expected results in Rosetta. The Morphir UI showed how the reporting logic stored in Morphir could be represented graphically.

Finally, the Bosque validation layer was successfully applied to the code generated from Rosetta, opening the way to a formal verification method for the rules developed in DRR.

Take-Aways and Next Steps

One of the most interesting take-aways from this TechSprint event was its task-force format, which allowed the teams to perform at their level best. This format could serve as a template for future “open innovation” initiatives engaging the FINOS community.

The key ingredients of success were:

A specific and tangible deliverable
Collaboration, not competition, on that shared objective
Diversity of participants, all goal-oriented
Clear responsibilities of the different team members
Careful preparation and planning
A “safe space” to contribute in open-source

As a next step, the TechSprint team will be demonstrating the result of their work at the upcoming Open Source in Finance Forum in London (July 13th). Those results will be encapsulated into a video that will be made publicly available.

The Morphir-to-Rosetta code generator delivered during the TechSprint is also included in a formal open-source contribution to FINOS. This will create a first bridge between the on-going DRR industry programme and the wider FINOS community, allowing to connect it to similar initiatives taking place under the Reg SIG.

Given interest and community engagement in that group, further open innovation events involving multiple firms could be run along a similar format.

The potential benefits of open collaboration in the regulatory space are massive. This TechSprint demonstrates how new ground can be broken when barriers tumble down.

Authors:

Leo Labeis, Founder and CEO at REGnosys
Stephen Goldbaum, Executive Director at Morgan Stanley
Mark Marron, Principal Research Software Development Engineer at Microsoft

The post Morgan Stanley, Microsoft, and Regnosys Break New Ground in RegTech with FINOS appeared first on Linux Foundation.

Configuring Ansible’s container image registry: What you need to know

Consider your options for configuring and maintaining your container image registry in Ansible Automation Platform 2.

Read More at Enable Sysadmin

The Impressive Scope of the Linux Foundation in the 21st Century Digital Economy

This post was originally published on June 30, 2022 on Irving Wladawsky-Berger’s blog

Last week, the Linux Foundation held its North America Open Source Summit in Austin. The week-long summit included a large number of breakout sessions as well as several keynotes. Open Source Summit Europe will take place in Dublin in September and Open Source Summit Japan in Yokohama in December.

I’ve been closely involved with open, collaborative innovation and open source communities since the 1990s. In particular, I was asked to lead a new Linux initiative that IBM launched in January of 2000 to embrace Linux across all the company’s products and services.

At the time, Linux had already been embraced by the research, Internet, and supercomputing communities, but many in the commercial marketplace were perplexed by IBM’s decision. Over the next few years, we spent quite a bit of effort explaining to the business community why we were supporting Linux, which included a number of Linux commercials like this one with Muhammad Ali that ran in the 2006 Super Bowl. IBM also had to fight off a multi-billion dollar lawsuit for alleged intellectual property violations in its contributions to the development of Linux. Nevertheless, by the late 2000s, Linux had crossed the chasm to mainstream adoption, having been embraced by a large number of companies around the world.

In 2000, IBM, along with HP, Intel, and several other companies formed a consortium to support the continued development of Linux, and founded a new non-profit organization, the Open Source Development Labs (OSDL). In 2007, OSDL merged with the Free Standards Group (FSG) and became the Linux Foundation (LF). In 2011, the LF marked the 20th anniversary of Linux at its annual LinuxCon North America conference. I had the privilege of giving one of the keynotes at the conference in Vancouver, where I recounted my personal involvement with Linux and open source.

Over the next decade, the LF went through a major expansion. In 2017, its annual conferences were rebranded Open Source Summits to be more representative of LF’s more general open source mission beyond Linux. Then in April of 2021, the LF announced the formation of Linux Foundation Research, a new organization to better understand the opportunities to collaborate on the many open source activities that the LF was by then involved in. Hilary Carter joined the LF as VP of Research and leader of the new initiative.

A few months later, Carter created an Advisory Board to provide insights into emerging technology trends that could have a major impact on the growing number of LF open source projects, as well as to explore the role of open source to help address some of the world’s most pressing challenges. I was invited to become a member of the LF Research Advisory Board, an invitation I quickly accepted.

Having retired from IBM in 2007, I had become involved in a number of new areas, – such as cloud, blockchain, AI, and the emerging digital economy. As a result, I had not been much involved with the Linux Foundation in the 2010s, and continued to view LF as primarily overseeing the development of Linux. But, once I joined the Research Advisory Board and learned about the evolution of the LF over the previous decade, I was frankly surprised at the impressive scope of its activities. Let me summarize what I learned.

Once I joined the Research Advisory Board and learned about the evolution of the LF over the previous decade, I was frankly surprised at the impressive scope of its activities.

According to its website, the LF now has over 1,260 company members, including 14 Platinum and 19 Gold, and supports hundreds of open source projects. Some of the projects are focused on technology horizontals, others on industry verticals, and many are subprojects within a large open source project.

Technology horizontal areas include AI, ML, data & analytics; additive manufacturing; augmented & virtual reality; blockchain; cloud containers & virtualization; IoT & embedded; Linux kernel; networking & edge; open hardware; safety critical systems; security; storage; system administration; and Web & application development. Specific infrastructure projects include OpenSSF, – the Open Source Software Security Foundation; LF AI & Data, – whose mission is to build and support open source innovations in the AI & data domains ; and the Hyperledger Foundation, – which hosts a number of enterprise-grade blockchain subprojects, such as Hyperledger Cactus, – to help securely integrate different blockchains; Hyperledger Besu, – an Ethereum client for permissioned blockchains; and Hyperledger Caliper, – a blockchain benchmark tool to measure performance.

Industry vertical areas, include automotive & aviation; education & training; energy & resources; government & regulatory agencies; healthcare; manufacturing & logistics; media & entertainment; packaged goods; retail; technology; and telecommunication. Industry focused projects include LFEnergy, – aimed at the digitization of the energy sector to help reach decarbonization targets; Automotive Grade Linux, – to accelerate the development and adoption of a fully open software stack for the connected car; Chips Alliance, – to accelerate open source hardware development; Civil Infrastructure Platform, – to enable the development and use of software building blocks for civil infrastructure; LF Public Health, – to improve global health equity and innovation; and Academy Software Foundation, – which is focused on the creation of an open source ecosystem for the animation and visual effects industry and hosts a number of related subprojects such as OpenColorIO, – a color management framework; OpenCue, – a render management system; and OpenEXR, – the professional-grade image storage format of the motion picture industry.

The LF estimates that its sponsored projects have developed over one billion lines of open source code which support a significant percentage of the world’s mission critical infrastructures. These projects have created over $54 billion in economic value. A recent study by the European Commission estimated that in 2018, the economic impact of open source across all its member states was between €65 and €95 billion. To better understand the global economic impact of open source, LF Research is sponsoring a study led by Henry Chesbrough, UC Berkeley professor and fellow member of the Advisory Board.

Open source advances are totally dependent on the contributions of highly skilled professionals. The LF estimates that over 750 thousand developers from around 18 thousand contributing companies have been involved in its various projects around the world. To help train open source developers, the LF offers over 130 different courses in a variety of areas, including systems administration, cloud & containers, blockchain, and IoT & embedded development, as well as 25 certification programs.

In addition, the LF, in partnership with edX, – the open online learning organization created by Harvard and MIT – has been conducting an annual web survey of open source professionals and hiring managers to identify the latest trends in open source careers, the skills that are most in demand, what motivates open source professionals, how employers can attract and retain top talent, as well as diversity issues in the industry.

The 10th Annual Open Source Jobs Report was just published in June of 2022. The report found that there remains a shortage of qualified talent – 93% of hiring managers have difficulty finding experienced open source professionals; compensation has become a differentiating factor – 58% of managers have given salary increases to retain open source talent; certifications have hit a new level of importance – 69% of hiring managers are more likely to hire certified open source professionals; 63% of open source professionals believe open source runs most modern technology; and cloud skills are the most in demand, followed by Linux, DevOps, and security.

Finally, in her Austin keynote, Hilary Carter presented 10 quick facts about open source from LF Research:

53% of survey respondents contribute to open source because “it’s fun”;
86% of hiring managers say hiring open source talent is a priority for 2022;
2/3 of developers need more training to do their jobs;
The most widely used open source software is developed by only a handful of contributors, – 136 developers were responsible for more than 80% of the lines of code added to the top 50 packages;
45% of respondents reported that their employers heavily restrict or prohibit contributions to open source projects whether private or work related;
47% of organizations surveyed are using software bill of materials (SBOMs) today;
“You feel a sense of community and responsibility to shepherd this work and make it the best it can be;
1 in 5 professionals have been discriminated against of feel unwelcome;
People who don’t feel welcome in open source are from disproportionately underrepresented groups;
“When we have multiple people with varied backgrounds and opinions, we get better software”.

“Open source projects are here to stay, and they play a critical role in the ability for most organizations to deliver products and services to customers,” said the LF in its website. “As an organization, if you want to influence the open source projects that drive the success of your business, you need to participate. Having a solid contribution strategy and implementation plan for your organization puts you on the path towards being a good corporate open source citizen.”

The post The Impressive Scope of the Linux Foundation in the 21st Century Digital Economy appeared first on Linux Foundation.

How to set user password expirations on Linux

Use the chage command to force users to change their passwords to comply with your password-aging policies.

Read More at Enable Sysadmin

Deprecated Linux commands, Podman Compose vs. Docker Compose, and more sysadmin tips

Check out Enable Sysadmin’s top 10 articles from June 2022.

Read More at Enable Sysadmin

How to use YAML nesting, lists, and comments in Ansible playbooks

Although YAML is considered easy to understand, its syntax can be quite confusing. Use this guide to the basics.

Read More at Enable Sysadmin

How Microservices Work Together

The article originally appeared on the Linux Foundation’s Training and Certification blog. The author is Marco Fioretti. If you are interested in learning more about microservices, consider some of our free training courses including Introduction to Cloud Infrastructure TechnologiesBuilding Microservice Platforms with TARS, and WebAssembly Actors: From Cloud to Edge.

Microservices allow software developers to design highly scalable, highly fault-tolerant internet-based applications. But how do the microservices of a platform actually communicate? How do they coordinate their activities or know who to work with in the first place? Here we present the main answers to these questions, and their most important features and drawbacks. Before digging into this topic, you may want to first read the earlier pieces in this series, Microservices: Definition and Main Applications, APIs in Microservices, and Introduction to Microservices Security.

Tight coupling, orchestration and choreography

When every microservice can and must talk directly with all its partner microservices, without intermediaries, we have what is called tight coupling. The result can be very efficient, but makes all microservices more complex, and harder to change or scale. Besides, if one of the microservices breaks, everything breaks.

The first way to overcome these drawbacks of tight coupling is to have one central controller of all, or at least some of the microservices of a platform, that makes them work synchronously, just like the conductor of an orchestra. In this orchestration – also called request/response pattern – it is the conductor that issues requests, receives their answers and then decides what to do next; that is whether to send further requests to other microservices, or pass the results of that work to external users or client applications.

The complementary approach of orchestration is the decentralized architecture called choreography. This consists of multiple microservices that work independently, each with its own responsibilities, but like dancers in the same ballet. In choreography, coordination happens without central supervision, via messages flowing among several microservices according to common, predefined rules.

That exchange of messages, as well as the discovery of which microservices are available and how to talk with them, happen via event buses. These are software components with well defined APIs to subscribe and unsubscribe to events and to publish events. These event buses can be implemented in several ways, to exchange messages using standards such as XML, SOAP or Web Services Description Language (WSDL).

When a microservice emits a message on a bus, all the microservices who subscribed to listen on the corresponding event bus see it, and know if and how to answer it asynchronously, each by its own, in no particular order. In this event-driven architecture, all a developer must code into a microservice to make it interact with the rest of the platform is the subscription commands for the event buses on which it should generate events, or wait for them.

Orchestration or Choreography? It depends

The two most popular coordination choices for microservices are choreography and orchestration, whose fundamental difference is in where they place control: one distributes it among peer microservices that communicate asynchronously, the other into one central conductor, who keeps everybody else always in line.

Which is better depends upon the characteristics, needs and patterns of real-world use of each platform, with maybe just two rules that apply in all cases. The first is that actual tight coupling should be almost always avoided, because it goes against the very idea of microservices. Loose coupling with asynchronous communication is a far better match with the fundamental advantages of microservices, that is independent deployment and maximum scalability. The real world, however, is a bit more complex, so let’s spend a few more words on the pros and cons of each approach.

As far as orchestration is concerned, its main disadvantage may be that centralized control often is, if not a synonym, at least a shortcut to a single point of failure. A much more frequent disadvantage of orchestration is that, since microservices and a conductor may be on different servers or clouds, only connected through the public Internet, performance may suffer, more or less unpredictably, unless connectivity is really excellent. At another level, with orchestration virtually any addition of microservices or change to their workflows may require changes to many parts of the platform, not just the conductor. The same applies to failures: when an orchestrated microservice fails, there will generally be cascading effects: such as other microservices waiting to receive orders, only because the conductor is temporarily stuck waiting for answers from the failed one. On the plus side, exactly because the “chain of command” and communication are well defined and not really flexible, it will be relatively easy to find out what broke and where. For the very same reason, orchestration facilitates independent testing of distinct functions. Consequently, orchestration may be the way to go whenever the communication flows inside a microservice-based platform are well defined, and relatively stable.

In many other cases, choreography may provide the best balance between independence of individual microservices, overall efficiency and simplicity of development.

With choreography, a service must only emit events, that is communications that something happened (e.g., a log-in request was received), and all its downstream microservices must only react to it, autonomously. Therefore, changing a microservice will have no impacts on the ones upstream. Even adding or removing microservices is simpler than it would be with orchestration. The flip side of this coin is that, at least if one goes for it without taking precautions, it creates more chances for things to go wrong, in more places, and in ways that are harder to predict, test or debug. Throwing messages into the Internet counting on everything to be fine, but without any way to know if all their recipients got them, and were all able to react in the right way can make life very hard for system integrators.

Conclusion

Certain workflows are by their own nature highly synchronous and predictable. Others aren’t. This means that many real-world microservice platforms could and probably should mix both approaches to obtain the best combination of performance and resistance to faults or peak loads. This is because temporary peak loads – that may  be best handled with choreography – may happen only in certain parts of a platform, and the faults with the most serious consequences, for which tighter orchestration could be safer, only in others (e.g. purchases of single products by end customers, vs orders to buy the same products in bulk, to restock the warehouse) . For system architects, maybe the worst that happens could be to design an architecture that is either orchestration or choreography, but without being really conscious (maybe because they are just porting to microservices a pre-existing, monolithic platform) of which one it is, thus getting nasty surprises when something goes wrong, or new requirements turn out to be much harder than expected to design or test. Which leads to the second of the two general rules mentioned above: don’t even start to choose between orchestration or choreography for your microservices, before having the best possible estimate of what their real world loads and communication needs will be.

The post How Microservices Work Together appeared first on Linux Foundation.