- Bernd Zuther
Everyone has a plan until they get punched in the face.
public class TopSellerRecommendationPanel extends AbstractShopBasePanel { @SpringBean private FeatureToggleBean featureToggleBean; ... @Override protected void onConfigure() { super.onConfigure(); setVisible(featureToggleBean.isTopSellerFeatureEnabled()); } ... }
if every service has to be updated at the same time it’s not loosely coupled
be conservative in what you do, be liberal in what you accept from others
{ firstname: "Bernd", lastname: "Zuther", street: "Elsenheimerstraße 55a", city: "München", zip: 80687 }
{ firstname: "Bernd", lastname: "Zuther", birthday: "1983/08/15", street: "Elsenheimerstraße 55a", city: "München", zip: 80687 }
{ firstname: "Bernd", lastname: "Zuther", birthday: "1983/08/15", addresses : [{ street: "Elsenheimerstraße 55a", city: "München", zip: 80687, type: "WORK" }] }
{ firstname: "Bernd", lastname: "Zuther", birthday: "1983/08/15", street: "Elsenheimerstraße 55a", city: "München", zip: 80687, addresses : [{ street: "Elsenheimerstraße 55a", city: "München", zip: 80687, type: "WORK" }] }
bz@cc1 $ docker build -t zutherb/product-service . bz@cc1 $ docker push zutherb/product-service bz@cc2 $ docker pull zutherb/product-service bz@cc2 $ docker run zutherb/product-service bz@cc2 $ docker ps CONTAINER ID IMAGE COMMAND CREATED 87bb5524067d zutherb/product-service:latest "/product-0.6/bin/pr 14 seconds
bz@cc ~$ docker run -d --name mongodb mongo 705084daa3f852ec796c8d6b13bac882d56d95c261b4a4f8993b43c5fb2f846c bz@cc ~$ docker run -d --name redis redis 784ebde0e867adb18663e3011b3c1cabe990a0c906396fc306eac669345628cf bz@cc ~$ docker run -d -P --name cart --link redis:redis zutherb/cart-service 438b2657c7a5c733787fb32b7d28e1a0b84ba9e10d19a8a015c6f24085455011 bz@cc ~$ docker run -d -P -p 8080:8080 --name shop --link cart:cart \ --link mongodb:mongodb zutherb/monolithic-shop 9926e187faa215ac9044603d51adbd8d679d8076b4a349ebbc9917dade6d560e bz@cc $ docker exec 9926e187faa215ac9044603d51adbd8d679d8076b4a349ebbc9917dade6d560e env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=87bb5524067d MONGODB_PORT_27017_TCP=tcp://172.17.0.28:27017 MONGODB_PORT_27017_TCP_ADDR=172.17.0.28 MONGODB_PORT_27017_TCP_PORT=27017 MONGODB_PORT_27017_TCP_PROTO=tcp
Pro | Contra |
---|---|
You needn't care where work is executed | No description of the whole application (in contrast to docker compose) and for deployment scenario |
You needn't care about dependencies | Failures analysis will get harder |
Service discovery | Master is a single point of failure |
Process Supervisor | Few tools and documentation is available |
Pro | Contra |
---|---|
Description of the whole application and for deployment scenario | Many components that has to be understood |
You needn't care where work is executed | Failures analysis will get harder |
High Availability | |
Process Supervisor | |
Service Discovery |
MDC.put("correlationId", "A8FFA290"); Logger logger = LoggerFactory.getLogger(SimpleMDC.class); logger.info("Create Order");
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <layout> <Pattern>[%X{correlationId}] - %m%n</Pattern> </layout> </appender>
Pro | Needs |
---|---|
supports A/B testing | monitoring |
effective technologies | centralized logging |
solution orientation | fully automated deployment pipeline |
incremental migration | cluster management |
organization must be ready |