{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • API Design /
avatar image
2
Question by Martijn Stellinga · Feb 14, 2019 at 08:32 PM · 273 Views hosted targetsflowslogic

How to best to handle complex flow logic?

We’re currently looking at how best to handle certain flows in our infrastructure. Whenever we have complex flows in API proxies, we end up with hard to maintain code, and we’re looking for a solution.

For example, we have one API that places an order. During the ‘place order’ API call, if the user is not known, we perform a service callout to create a customer record. If the callout fails, we still want to continue with the ‘place order’, but without a customer. If the call does succeed we want to use the new customer and create a login account for them. And so on. In these cases we end with long chains of policies, with complex conditions on each step.

It’s hard to read, error prone, and hard to extend.

We’re trying to find a way to create more maintainable code in the above situation. Shared flows don’t help, because they spread the logic across different places, making it harder to read and code, and still require complex conditions.

Hosted targets seem like the solution here, but…When we use hosted targets in the above scenario, we have to perform calls from the hosted target to our back-office systems. However, hosted targets lack access to key-value maps, target servers, and certificates, etc. meaning we have to code target server information and security measures inside the hosted targets. That’s not ideal.

The calls from the hosted target also don’t end up in the analytics, meaning we have no way to see what the load on our back-office is.

Another solution would be to move the above code from Apigee to back-ends. However, that means adding an extra layer of software, which we then have to maintain and monitor.

My questions are:

  • How have other people handled similar scenarios?
  • Are hosted targets the way to go?
  • If so, will future updates add the ability to access target servers, add analytics, etc.?
  • If there are other alternatives besides hosted targets, what are they?
  • How best to monitor load on back-office systems in these cases?
Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
1

Answer by Dino-at-Google   · Feb 15, 2019 at 11:56 PM

Solid question.

There's a threshold of complexity of flow logic, beyond which it's easier to do it elsewhere.

Simple things like matching on a verb + path are easy in Apigee Edge. With all the other cases, not so easy. Simple conditions like "is the item in the cache" are also easy. But chain a few of these together and you will be stretching the tool beyond its comfortable usage scenarios. Sure, you can do it, but as you point out, the flow is not easily readable and maintainable.

I would think the options would be:

  • SharedFlows
  • Chained Proxies - encapsulate logic within proxies and call them locally
  • Hosted Targets
  • full IPaaS. Integration Platform as a Service. Apigee has a partnership with Informatica. https://apigee.com/api-management/#/solutions/informatica-integration-cloud

And there will be pros and cons for each of those.

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ravindra Singh · Aug 23, 2019 at 08:35 AM 0
Link

I do think we should avoid using chaining the proxies as it may cost you extra.

Follow this Question

Answers Answers and Comments

63 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can we generate Unique Aceess token for different oAuth flows in Apigee v 4.17.09.00 1 Answer

How can I add different policies for different flow. And what is the main - how can I map it to proper URL 1 Answer

Connecting to backend directly from Apigee 1 Answer

How to execute flow before some other flows, not all 2 Answers

Hosted target response issue 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges