Skip to content

#473 serveless implementation using aws compute engine and serverless fram…#714

Merged
iluwatar merged 14 commits intoiluwatar:masterfrom
dheeraj-mummareddy:master
Apr 8, 2018
Merged

#473 serveless implementation using aws compute engine and serverless fram…#714
iluwatar merged 14 commits intoiluwatar:masterfrom
dheeraj-mummareddy:master

Conversation

@dheeraj-mummareddy
Copy link
Contributor

serveless implementation using aws compute engine and serverless framework

  • serverless example implementation using aws compute engine and serverless framework
  • function creates an info endpoint which provides data from lambda context
  • resolves: Serverless pattern #473 Serverless pattern

Pull request description

  • Implementation and documentation using aws compute engine and serverless framework

@roman-marcu
Copy link

Hi, AWS is a Serverless FaaS technique, but what about BaaS? According to https://martinfowler.com/articles/serverless.html serverless is not just about moving server side code into some ephemeral function, but also integration of third party remote application services directly into the front-end of our app, as an example for BaaS https://firebase.google.com/docs/database/.

It would be nice to add a gateway API and to do 2 calls, one for AWS(FaaS) and other for firebase, or others,(BaaS).

@dheeraj-mummareddy
Copy link
Contributor Author

dheeraj-mummareddy commented Feb 13, 2018

@roman-marcu acknowledge, will add BaaS endpoints... API gateway is already configured in the stack which is created by serverless framework, will expand documentation, please take a look at http section in serverless yaml
https://serverless.com/framework/docs/providers/aws/events/apigateway/

@iluwatar
Copy link
Owner

iluwatar commented Mar 4, 2018

@dheeraj-mummareddy the pull request has conflicts. Can you check it?

@dheeraj-mummareddy
Copy link
Contributor Author

@iluwatar the PR is ready for review, the build passes locally but is not healthy in travis and looks like its failing for all other commits too. Is someone looking at the failure?

[INFO] throttling ......................................... FAILURE [ 2.287 s]

@iluwatar
Copy link
Owner

It is a known issue #643, still unresolved

categories: Architectural
tags:
- Java
- Difficulty-Intermittent
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Difficulty-Intermediate?

Copy link
Contributor Author

@dheeraj-mummareddy dheeraj-mummareddy Mar 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iluwatar I feel like the difficulty level is Intermediate based on the complexity to adopt, but let me know your thoughts?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean literally, Difficulty-Intermittent is wrong...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iluwatar good catch, I think I copied the initial template from EIP patter, yup...will fix that with an other PR.

* Serviceful operations
* Automated operations
* monitored applications
* Innovation mindset
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any links that would explain more about these katas? The terms alone are not enough.

## AWS lambda function implementation

AWS lambda SDK provides pre-defined interface `com.amazonaws.services.lambda.runtime
.RequestHandler` to implement our lambda function.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to AWS lambda SDK?

* cloud watch (log groups)
* API Gateway (ApiGatewayRestApi)
* Lambda function
* DynamoDB collection
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling, cloud formation -> CloudFormation, cloud watch -> CloudWatch

import java.io.Serializable;

/**
* Address Object
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address class, not an object

import java.io.Serializable;

/**
* Person Request
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Person class, not a request

import static org.mockito.Mockito.verify;

/**
* Created by dheeraj.mummar on 3/5/18.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain what the class does

import static org.mockito.Mockito.*;

/**
* Created by dheeraj.mummar on 3/4/18.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain what the class does

import static org.mockito.Mockito.when;

/**
* LambdaInfoApiHandlerTest
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain what the class does

@iluwatar
Copy link
Owner

@dheeraj-mummareddy are you working on this? Please comment when you want another review.

@dheeraj-mummareddy
Copy link
Contributor Author

@iluwatar yes, its ready for review. Thanks!

Copy link
Owner

@iluwatar iluwatar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • the package of the tests is misspelled java.com.illuwatar
  • not every new file has the required license header, run the build to generate them

categories: Architectural
tags:
- Java
- Difficulty-Intermittent
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean literally, Difficulty-Intermittent is wrong...

<parent>
<groupId>com.iluwatar</groupId>
<artifactId>java-design-patterns</artifactId>
<version>1.19.0-SNAPSHOT</version>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be updated to 1.20.0-SNAPSHOT

@iluwatar
Copy link
Owner

iluwatar commented Apr 8, 2018

@dheeraj-mummareddy please comment when the (minor) changes are done so we can proceed with the merge

@dheeraj-mummareddy
Copy link
Contributor Author

@iluwatar change have been fixed.

@iluwatar iluwatar merged commit 379a825 into iluwatar:master Apr 8, 2018
@iluwatar
Copy link
Owner

iluwatar commented Apr 8, 2018

Good work @dheeraj-mummareddy thank you very much for this contribution 👍

@iluwatar
Copy link
Owner

@all-contributors please add @dheeraj-mummareddy for code

@allcontributors
Copy link
Contributor

@iluwatar

I've put up a pull request to add @dheeraj-mummareddy! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serverless pattern

3 participants