SpringOne Tour Conference in Istanbul was really great on day 2. You can read the summary of the day 1 here.
SpringOne Tour Rocks!
If you are a Spring developer, you should attend the next events. I guarantee that you will be satisfied.
You can check out the tweets that I shared during the two days from my twitter account.
I know you are excited as I was. Let’s see what happened on the last day.
Different from the first day, there have only been presentations on day 2. But, this was very good for filling ourselves with tons of information about the cloud technologies.
9.00am – Continuous Deployment to the Cloud
CD and CI are two of the most important topics in programming. James Weaver has talked about the Spring Cloud Pipelines. Thus, this information provided us how to automate our deployments.
Main Topics of Continuous Deployment to the Cloud
- Spring Cloud Pipelines is a very good tool to use
- It provides a template of a pipeline to automate the process
- Based on the good practices of the successful projects
- The pipeline and deployment can be managed by code
- Supports Concourse, Jenkins, Bash, Maven, and Gradle
- Four environments: Build, test, stage, and prod
- Types of tests: Unit, API test, Smoke test, Integration test, Rollback test, End-to-end test
- Uses contract testing
- It’s advised to deploy frequently
- Deployment pipeline should test rollback
- It’s better to fail the pipeline as soon as possible
- Standardising provides lower support cost and higher chances for employee rotation
- Smoke testing means only testing the few critical parts on production
- Originally, smoke testing comes from testing the water pipes with smoke if there are any leaks
- If you have to roll-back, do not roll-back DB but the app itself
In the light of the above bullets, we have enhanced our knowledge on CI & CD. Spring Cloud Pipelines is very handy for developers.
9.55am – Spring Cloud Gateway
After James, Nate Schutta kicked in with Spring Cloud Gateway. He is a very good presenter. I liked the way he presents very fast. The human brain is better with fast information (movies). Also, the texts are only one or two sentences at a time on the presentation. Congratulations!
Main Topics of Spring Cloud Gateway
- Gateways provide routing, security, rate limiting, load balancing, request aggregation and more
- We have to be cautious while using API Gateways
- It has a bit of gray area
- We mustn’t sneak business logic into it
- Just like the downsides ESB has, API Gateway has too
- The same faults may happen here
- Netflix has provided a great Gateway project named Zuul 1
- But, it was a blocking API and not developer friendly
- After Zuul 1, Netflix provided Zuul 2
- They have learned lessons
- They provided a non-blocking API, supported HTTP-2
- Zuul 2 is not backward compatible to Zuul 1
- Spring Cloud Gateway is a very powerful tool
- It has a non-blocking IO
- It supports reactive requests
- It has handler-mapping that detects which code handles which request
- You can configure routes in Java
- You can route on path, host or parameters
- It has filters: rewrite, add flags, headers, parameters
Spring Cloud Gateway properties
- Spring Cloud Gateway is programmer centric
- Java & Spring centric
- Instead of providing one tool, it gives a variety of tools
- It’s an app that programmer can deploy
- Supports anything in Zuul 1
- No performance issues
- Many companies rely on it
- It is used on many apps production environment
- It uses Java 8 predicates
- It is configurable with .yml files
In summary, SCG is very programmer friendly. It can be configured easily thus programmers don’t have to wait for the Gateway API to be updated.
11.55am – Machine Learning Exposed
Again, the turn was at James Weaver. He has mentioned the basic topics on machine learning and AI.
Main Topics of Machine Learning Exposed
- Machine learning algorithm can classify things by more than one properties
- There is a supervised learning regression problem
- In playground.tensorflow.org you can investigate how the algorithm works
- It visualizes the process
- Neural Network consists of three parts: the input layer, hidden layer, and output layer
- One genre of Neural Network is a fully connected network
- Deep Neural Network: Neural network with multiple hidden layers
- You can find the sample codes at https://github.com/JavaFXpert/visual-neural-net-server
- You can find the sample client at https://github.com/JavaFXpert/ng2-spring-websocket-client
- There are Machine Learning code samples in the projects
- You can play with A.I. Duet at https://experiments.withgoogle.com/ai/ai-duet/view/
That was the third presentation from James and I can guarantee that he is full of knowledge.
12.05am – Spring Boot & Spring Cloud on Pivotal Application Service
In the third place, Fabio Marinelli has explained us about the properties of Spring Cloud on Pivotal Application Service. In summary, it is a very handy tool if you build and deploy Spring Boot apps on the cloud. It is like AWS but specialized with Spring Boot apps.
Main Topics of Spring Boot & Spring Cloud on Pivotal Application Service
- Pivotal Application Service is a Spring One platform
- Pivotal Web Services is like Amazon Web Services
- You are able to set Spring Boot applications like EC2 instances on AWS
- You can investigate logs easily
- The apps are served secured with HTTPS
- You can change application configurations easily
- The traces are easily investigated
- There is a dashboard screen to see threads of the applications
- A screen describes mappings that show which app handles which request
- You can easily update code and your application
- A marketplace section provides you a wide range of tools to boost up your applications
- There are apps like auto-scaler or circuit-breaker in the marketplace
- You can access the sample project at https://github.com/fmarinelli/spring-music
- The platform provides easy setup for pipelines
- The Pivotal Web Services is a secured place
- It supports Jenkins, Concourse, Maven, and Gradle
- You can keep up to date with the following links: https://run.pivotal.io/, https://network.pivotal.io/, https://roadmap-registration.cfapps.io
If you are a Spring Boot developer, you should really try Pivotal Web Services. It will boost your productivity with the Spring Boot helper components.
2.00pm – Using Spinnaker to Create a Development Workflow on Kubernetes
Next, the turn was for Paul Czarkowski. He presented us the basic concepts of Kubernetes, Pivotal Container Service (PKS) and Spinnaker.
Main Topics of Using Spinnaker to Create a Development Workflow on Kubernetes
- Pivotal Container Service (PKS) is a very useful tool
- It uses Google Cloud
- It creates K8s clusters and runs clusters
- PKS uses BOSH, a powerful release engineering toolchain
- One pod can have more than one container
- Replica Set manages pods
- Deployment manages replica sets
- Stateful Set manages deployments
- Volumes are storage components for pods. They share the same lifecycle with pods
- Service manages pods by metadata
- It manages connectivity and service discovery
- Ingress manages LB, virtual hosting, SSL, and DNS
- Config Maps enable to manage secrets and passwords used in pods
- Kubernetes manifest describes app structure on K8s
- Helm is a powerful package manager for K8s
- It is acquired by K8s
- Applications are managed with Chart projects
- Helm client helps to deploy and run Charts
- Tiller Server runs in the cluster and converts Charts to running apps
- Spinnaker is a powerful tool to manage K8s clusters
- It is developed by Netflix
- It has two main functionalities: Cluster Management & Deployment Management
The presentation had a very high importance. Kubernetes is a very popular platform for a high number of companies.
2.50pm – Evolving to Cloud Native
Straightaway, Nate Schutta came again. As I told you before, I really like Nate’s style. He is like a machine gun! He kills it!
Main Topics of Evolving to Cloud Native
- When you build for the cloud, you mustn’t deal with the infrastructure
- “Here is my code, run it on the cloud”
- The speed matters
- Your industry is not immune
- Monolithic apps hurt
- Combine simple things to get complex results
- If you can’t build monolithic, what makes you believe that you can build microservices?
- Stateless apps have a serverless architecture. It can be made as a Faas (Function as a service)
- When you are able, build your apps as Faas as much as you can
- But, in the real world, focus on the business problems; not the infrastructure
- Plan your journey, Serverless is not always right
- How many users? How many requests?
- Calculate everything!
The Twelve-Factor App
Important to realize that the twelve factors of an app that it must have are the best practices collected from successful projects. You can find them here and also below.
Codebase – One codebase tracked in revision control, many deploys
Dependencies – Explicitly declare and isolate dependencies
Config – Store config in the environment
Backing services – Treat backing services as attached resources
Build, release, run – Strictly separate build and run stages
Processes – Execute the app as one or more stateless processes
Port binding – Export services via port binding
Concurrency – Scale-out via the process model
Disposability – Maximize robustness with fast startup and graceful shutdown
Dev/prod parity – Keep development, staging, and production as similar as possible
Logs – Treat logs as event streams
Admin processes – Run admin/management tasks as one-off processes
Two Pizza Team Approach
In the meanwhile, Nate also mentioned the Two Pizza Team Approach. According to the theory, a team must not be larger than two pizzas can feed. It is like 6 or 7 persons per team. So that, the team always can communicate effectively. When the size increases, the communication is broken. You can calculate the links in a group with this formula: n * (n – 1) / 2. Here, n is the number of people. Let’s say you have a team of 6 members. The size of the links is 15. When the team has 12 members the link is 66. Here, you can see it increases accelerated. You can read more about the approach in this link.
4.10pm – Cloud Event-Driven Architectures with Spring Cloud Stream 2.0
Finally, Jakub Pilimon entered the stage. He told us about the Event-Driven architecture and the Spring Cloud Stream 2.0.
Main Topics of Cloud Event-Driven Architectures with Spring Cloud Stream 2.0
- Event-driven architecture is very important
- Originally, in the apps, everything is an event
- So, we can build apps constructed from events
- The main usage area is finance
- You can build events and handle them with messages and stream
- This also provides to use AMQP systems like RabbitMQ and Kafka effectively
- Originally, the founder of OOP said that a proper name for the structure is MOP (Message Oriented Architecture)
- In OOP, you mainly process messages between objects
- Jakub tested the Java components with Groovy, it was cool
- He mentioned the foldLeft method of the functional programming
- Next, he showed a sample in java with the method
In the meanwhile, Jakub got his hands dirty with coding. He showed a good event-driven architecture in Java.
In summary, thank you very much for the presentation Jakub, they were very valuable information. You can access the sample project links from below.
Sample Projects on Github
In conclusion, we had a great time on the SpringOne Tour. Above all, the information was great, the presenters were awesome. I don’t have to mention that the Spring is itself awesome! Spring Boot is really Bootiful! Please come again SpringOne team!