DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Self-Hosted Gateway Design Patterns Discussion
  • Breaking Up a Monolithic Database with Kong
  • What is MuleSoft and Anypoint Platform Capabilities and Strengths
  • Integration Patterns in Microservices World

Trending

  • Building Custom Tools With Model Context Protocol
  • The Human Side of Logs: What Unstructured Data Is Trying to Tell You
  • Build Your First AI Model in Python: A Beginner's Guide (1 of 3)
  • Analyzing Techniques to Provision Access via IDAM Models During Emergency and Disaster Response
  1. DZone
  2. Data Engineering
  3. Databases
  4. VETRO Pattern for API Gateways

VETRO Pattern for API Gateways

API gateways can support a number of microservices patterns. Learn about the VETRO pattern and what goals it can accomplish.

By 
Abhilash Juluri user avatar
Abhilash Juluri
·
May. 09, 18 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
14.1K Views

Join the DZone community and get the full member experience.

Join For Free

VETRO is a popular acronym that summarizes most of the benefits offered by middleware solutions like ESBs and API gateways. VETRO highlights the key functions of API gateways, though gateways can also support a number of microservices patterns like Microservice.io or EIP patterns.

VETRO stands for:

  • Validation – As the name suggests, it means validating request message as per any agreed conventions or contracts. Several frameworks or tools are used to validate the message before it reaches the backend services. Available frameworks are:
    • Bean validation (JSR 380) for doing validations in plain Java.
    • JSON Schemas are being actively developed, but XML Schemas for XML messages are fully developed if XML is an option.
    • Schematrons for XML are not relevant in JSON world
    • Authentication and Authorization are best done in OAuth 2.0/OpenID Connect using JWTs
    • Frameworks like SAML and WS-Policy do exist, however they are going irrelevant in REST/JSON era.
  • Enrich – As an active intermediary, a gateway enriches the messages in message flows before passing it to backend services
    • Smart endpoints and dumb pipes is one of the popular design pattern which makes a strong case to keep Gateways as dumb as possible. Service composition or aggregation is a slippery slope as it opens up for developers to add complex logic (could be business logic) in Gateways. 
    • Netflix like companies took U-turn on “smart endpoints and dump pipes” pattern and doing service aggregation in Gateway for improving scalability, performance to cater to a large variety of devices.
    • Enriching the messages between front and backend systems often involves validating security and adding relevant user context and tailoring messages for receiving party, but developers must use caution and not add any business logic in Gateway. 
  • Transform
    • Transformation of messages from backend systems to API friendly data representations like JSON or XML
    • It is common practice to transform the backend service data and filter the data fields that are interested by the consumer. Netflix sets a very good example towards this practice. 
  • Route & Operate 
    • Routing the calls to respective backend services based on request URL, query parameters and Operating the service i.e., actual invocation of the service over its real endpoint.
    • Often, service traffic is routed through many intermediaries like reverse proxies, web servers, load balancers, etc… It gets very annoying to isolate the one who ate your headers. So, use caution when using transport headers for routing the consumers. 

Conclusion

  1. SOAP services are deprecated in the industry in favor of lightweight replacements like REST services

  2. XML representation of data is being deprecated in favor of lightweight JSON representation. This also due to the amazing return of Javascript and its widespread adoption in modern applications.

  3. Resource-based services (RESTful APIs) over coarse-grained business functions as services

  4. Models in MVC are shifting to client-side instead of server-side MVC, again due to advancements in browsers and JavaScript engines.

Enterprise integration came long way and morphed into many shapes: EAI to SOA, SOA to API, API to Microservices, and now Serverless. We just need to wait and see where serverless architectures will take us!

API microservice Web Service

Opinions expressed by DZone contributors are their own.

Related

  • Self-Hosted Gateway Design Patterns Discussion
  • Breaking Up a Monolithic Database with Kong
  • What is MuleSoft and Anypoint Platform Capabilities and Strengths
  • Integration Patterns in Microservices World

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: