mirror of
https://github.com/swisscom/titans-java-assessment.git
synced 2026-12-04 12:08:45 +00:00
Read-only mirror of https://github.com/swisscom/titans-java-assessment — Swisscom. Issues & pull requests at the source.
- Groovy 81.1%
- Java 18.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docker | ||
| gradle/wrapper | ||
| src | ||
| .gitignore | ||
| build.gradle | ||
| gradlew | ||
| gradlew.bat | ||
| README.adoc | ||
| settings.gradle | ||
= Dockerbroker
== Assessment Task
Build a new https://spring.io/projects/spring-cloud-open-service-broker[Spring Cloud Service Broker] for provisioning new
https://hub.docker.com/_/mongo[MongoDB Database] instances with Docker.
The OSB (Open Service Broker) should be designed as an cloud native application.
To achieve this there is a need to be able to schedule tasks to be run on different instances (a possibility would be
https://spring.io/projects/spring-integration[Spring Integration] either with a memory queue or a real queuing engine like kafka or rabbitMQ).
Following to the
https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md[Open Service Broker Spec] it should be possible to
https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#provisioning[provision] and
https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#deprovisioning[deprovision] a database
(sample calls are prepared in the appendix, also a spring boot osb catalog configuration).
Focus of this assessment is to give you an opportunity to show your skills, ideas and working philosophy: therefor the how you implement the
code (immutables, null safety, streams, testing and best practices in general) is *more* important then how you implement it.
=== Primary Goals
[square]
* Implement a working Open Service Broker which can
https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#provisioning[provision] / https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#deprovisioning[deprovision] a
MongoDB Docker Image
* Implement Unit/Integration Tests (could use https://www.testcontainers.org/[testcontainers])
* Implement a Scheduling Engine (could be https://spring.io/projects/spring-integration[Spring Integration] or anything which works)
=== Stretch Goal
[square]
* Implement OSB reactive (maybe https://projectreactor.io/docs[projectreactor.io])
=== Kick Off Meeting
Please think about what you would have to research to complete this assessment. The research should be kept to a minimum,
so if possible we will either provide the information or adapt the assessment accordingly.
== Libraries
=== Docker Java API
see https://github.com/docker-java/docker-java/wiki[documentation] for further examples.
----
DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder()
.withDockerHost("unix:///var/run/docker.sock")
.build();
DockerClient dockerClient = DockerClientBuilder.getInstance(config).build();
Info info = dockerClient.infoCmd().exec();
CreateContainerResponse container = dockerClient.createContainerCmd("hello-world").exec();
dockerClient.startContainerCmd(container.getId()).exec();
dockerClient.stopContainerCmd(container.getId()).exec();
----