We use machine learning technology to do auto-translation. Click "English" on top navigation bar to check Chinese version.
Introducing Serverlesspresso Extensions
Today the Serverless DA team is launching
What is Serverlesspresso?
The architecture comprises several serverless apps and has been
What is extensibility?
Extensibility is the ability to add new functionality to an existing piece of software without modifying the core code already in place. Extensions for web browsers are an example of how useful extensibility can be. The core web browser code is not changed or affected when third parties write extensions, but end users can gain new, rich functionality not envisioned or intended by the original browser authors.
In many production business applications extensibility can help you keep up with the pace of your users requests. It allows you to create new and useful functionality without having to rearchitect the core, original part of your code. Choosing an architectural style that supports this concept can help you retain flexibility as your users needs change.
How EDA supports extensibility
Serverlesspresso is built on an
Loosely coupled microservices are able to scale and fail independently, increasing the resilience of the application. Development teams can build and release features for their team’s microservice quickly, without needing to worry about the behavior of other microservices in the application. In addition, new features can be added on top of existing events without making changes to the rest of the application.
Choreography achieves communication without tight control. Events flow between services without any centralized coordination. Many applications, including Serverlesspresso use both choreography and orchestration for different use cases. Event buses such as
New functional requirements come up all the time in production applications. We can address new requirements for an event driven application by creating new rules for events in the Event Bus. These rules can add new functionality to the application without having any impact to the existing application stack.
Characteristics of a Serverlesspresso EDA extension
- Extension resources do not have permission to interact with resources outside the extension definition (including core app resources).
- Extensions must contain at least one new EventBridge rule that routes existing Serverlesspresso events.
- Extensions can be deployed and deleted independently of other extensions and the core application.
Building a Serverlesspresso extension
This section shows how to build an extension for Serverlesspresso that adds new functionality while remaining decoupled from the core application. Anyone can contribute an extension to Serverlesspresso. Use
- Complete the
GitHub issue template :
- Clone the repository. Duplicate, and rename the example
_extension_model directory. - Add the associated extension template and source files.
- Add the required meta information to `
README.md `. - Make a pull request to the repository with the new extension files.
Additional guidance can be found in the repository’s
Tools and resources to help you build
Event decoupling introduces a new set of challenges. Finding events and their schema can be a difficult process. Developers must coordinate with the team responsible for publishing an event, or look through documentation to find its schema, and then manually create an object for the event in order to use it in their code.
The
The event player
The event player is a Step Functions workflow that simulates 15 minutes of operation at the Serverlesspresso bar. It does this by replaying an array of realistic events. Use the event player to generate Serverlesspresso events, when building and testing your extensions. Each event is emitted onto an event bus named Serverlesspresso.
- Clone this repository:
git clone https://github.com/aws-samples/serverless-coffee.git
- Change directory to the event player:
cd extensibility/EventPlayer
- Deploy the EventPlayer using the Amazon Web Services SAM CLI:
sam build && sam deploy --guided
This deploys a Step Functions workflow and a custom event bus called “ Serverlesspresso ”
Running the events player
- Open the event player from the Amazon Web Services Management Console.
- Choose Start execution , leave the default input payload and choose Start execution.
The player takes approximately 15 minutes to complete.
About your extension submission
Extensions will be reviewed by the Serverless DA team within 14 days of submission. When submitting your extension, your extension will become part of the open source offering and is covered by the existing license in the repo. It may be used by any customer under the same license. For additional guidance and ideas to help build your Serverlesspresso extensions, use the following resources:
-
Learn more about Serverlesspresso! -
The serverlesspresso workshop -
What is Event driven Architecture -
Building next-gen applications with event-driven architectures -
Advanced serverless workflow patterns and best practices
Conclusion
You can now build extensions for Serverlesspresso, and potentially be featured on the Amazon Web Services Compute Blog by submitting a Serverlesspresso extension. The best extensions will be added to Serverlesspresso in production.
Some demo extensions have been built and documented at
Visit the
The mentioned AWS GenAI Services service names relating to generative AI are only available or previewed in the Global Regions. Amazon Web Services China promotes AWS GenAI Services relating to generative AI solely for China-to-global business purposes and/or advanced technology introduction.