question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How To Add Further Application/Business Logic

See original GitHub issue

Using GraphQL in a Lambda function is promising. We’ve reduced a REST API with many endpoints into a single endpoint Graph API connected to one Lambda. This results in less administration, less code, and a great developer experience on the client-side.

However, this encourages adding lots of logic into that single Lambda function, resulting in a monolithic architecture. How can we make room for people to easily add application/business logic, in a microservices way, without encouraging a monolithic Lambda function?

Perhaps, in the GraphQL resolve functions, we could invoke other Lambda functions that contain further application/business logic. These separate Lambdas could be invoked synchronously, but would most likely be invoked asynchronously to reduce latency. For example, a user could be added to a transactional email list in a separate lambda function, after they have been created in the graphql function.

What do you think of the above approach and does anyone have other suggestions?

cc @pmuens @doapp-ryanp @minibikini @eahefnawy @flomotlik @mwawrusch @erikerikson @kevinold

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:19 (14 by maintainers)

github_iconTop GitHub Comments

5reactions
jerwallacecommented, Apr 7, 2016

One really cool outcome of Lambda and ‘event driven compute’ is the emergence of completely new architectural patterns. There are a wide variety of potential use cases for Lambda, from simple glue scripts, workers to perform in-parallel data processing, security enforcement to the delivery of entire applications. This diversity of use cases leads to a diversity of architectural patterns. I could see instances where GraphQL and this more monolithic pattern would be beneficial, however, like @HyperBrain pointed out, there are cases where it would not. Here would be my suggestion moving forward - establish a ‘Serverless’ architecture center where you can collect and collaborate on these patterns. Something like a http://en.clouddesignpattern.org/index.php/Main_Page. Each pattern could have a diagram, description, discussion and a respective serverless boilerplate project to use as a jumping off point. Like OO design patterns, I could see organizations employing many different design patterns to meet their goals.

2reactions
pmuenscommented, Apr 8, 2016

Good points! Really like the idea about the FAQ section in the README.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding business logic - IBM
Edit each event (application event or screen customization) to which you want to add the link. On the Actions tab, click Add, select...
Read more >
object oriented - What really is the "business logic"?
The "business rules" of an application is usually the defined parameters of the program itself (such as how to handle input).
Read more >
A Guide to Understanding Business Logic and Software
Business logic is the process of describing how you wish to apply standards to different situations. In software, that's translated into business rules...
Read more >
Creating application services (application business logic)
A service API abstracts the business logic implementation by defining an API ... Open the hm-api/pom.xml file and add the XML extract from...
Read more >
Defining the application business logic through processes
You can invoke business logic for an application by calling processes of that application. Each process has a name, inputs, and outputs. For ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found