{"id":18554531,"url":"https://github.com/oracle/coherence-spring-sockshop-sample","last_synced_at":"2025-04-09T23:31:34.778Z","repository":{"id":42116429,"uuid":"408254377","full_name":"oracle/coherence-spring-sockshop-sample","owner":"oracle","description":"Coherence Spring Sockshop Demo","archived":false,"fork":false,"pushed_at":"2024-04-12T01:03:40.000Z","size":44510,"stargazers_count":7,"open_issues_count":0,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-14T04:11:04.401Z","etag":null,"topics":["coherence","sockshop","spring"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-09-19T22:52:05.000Z","updated_at":"2024-04-15T09:36:39.459Z","dependencies_parsed_at":"2023-10-02T19:35:17.891Z","dependency_job_id":"136848a5-7789-4c28-b63a-130eed28c362","html_url":"https://github.com/oracle/coherence-spring-sockshop-sample","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fcoherence-spring-sockshop-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fcoherence-spring-sockshop-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fcoherence-spring-sockshop-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fcoherence-spring-sockshop-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle","download_url":"https://codeload.github.com/oracle/coherence-spring-sockshop-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248129751,"owners_count":21052633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coherence","sockshop","spring"],"created_at":"2024-11-06T21:22:34.916Z","updated_at":"2025-04-09T23:31:29.767Z","avatar_url":"https://github.com/oracle.png","language":"Java","readme":"# Coherence Spring Sock Shop\n\nThis project is an implementation of a stateful, microservices based application that\nuses [Oracle Coherence CE](https://coherence.community/) as a scalable embedded data\nstore, and [Spring Boot](https://spring.io/projects/spring-boot) as application\nframework.\n\nThe application is an online store that sells socks, and is based\non the [SockShop Microservices Demo](https://microservices-demo.github.io)\noriginally written and published under Apache 2.0 license by [Weaveworks](https://go.weave.works/socks).\n\nYou can see a working demo of the original application [here](http://socks.weave.works/).\n\nThis demo still uses the original front end implementation provided by Weaveworks,\nbut all back end services have been re-implemented from scratch using Spring Boot\nand Oracle Coherence, in order to showcase some features of the [Coherence Spring](https://github.com/coherence-community/coherence-spring)\nintegration.\n\nWe also provide the implementations of the same application that use Micronaut or Helidon\nas the application framework, in case one of those is your framework of choice.\n\n* [Coherence Micronaut Sock Shop](https://github.com/oracle/coherence-micronaut-sockshop-sample)\n* [Coherence Helidon Sock Shop](https://github.com/oracle/coherence-helidon-sockshop-sample)\n\n# Table of Contents\n\n* [Architecture](#architecture)\n* [Project Structure](#project-structure)\n* [Pre-Requisites](#pre-requisites)\n* [How to Run](#how-to-run)\n* [Complete Application Deployment](./doc/complete-application-deployment.md)\n* [Integrating with Oracle OCI Application Performance Monitoring (APM)](./doc/oracle-cloud-apm.md)\n* [Development](./doc/development.md)\n* [License](#license)\n\n## Architecture\n\nThe application consists of 6 back end services (rewritten from the ground up on top of\nSpring Boot, implementing the API that the legacy `front-end` service expects).\n\n![Architecture Diagram](./doc/images/architecture.png)\n\n- **[Product Catalog](./catalog)**, which provides \nREST API that allows you to search product catalog and retrieve individual product details;\n\n- **[Shopping Cart](./carts)**, which provides \nREST API that allows you to manage customers' shopping carts;\n\n- **[Orders](./orders)**, which provides REST API \nthat allows customers to place orders;\n\n- **[Payment](./payment)**, which provides REST API \nthat allows you to process payments;\n\n- **[Shipping](./shipping)**, which provides REST API \nthat allows you to ship orders and track shipments;\n\n- **[Users](./users)**, which provides REST API \nthat allows you to manage customer information and provides registration and \nauthentication functionality for the customers.\n\nYou can find more details for each service within documentation pages for individual\nservices, which can be accessed using the links above.\n\n## Project Structure\n\nThe main [Sock Shop](.) repository also contains Kubernetes deployment files for the whole application,\ntop-level POM file which allows you to easily build the whole project and import it\ninto your favorite IDE.\n\n## How to Run\n\nKubernetes scripts depend on [Kustomize](https://kustomize.io/), so make sure that you have a newer\nversion of `kubectl` that supports it (at least `1.16` or above).\n   \nThe easiest way to try the demo is to use Kubernetes deployment scripts from this repo. If you do, you can simply run\nthe following commands from the `coherence-spring-sockshop` directory:\n\n* Install the Coherence Operator\n\n  Install the Coherence Operator using the instructions in the\n  [Coherence Operator Quick Start](https://oracle.github.io/coherence-operator/docs/latest/#/docs/about/03_quickstart)\n  documentation.\n\n* **Installing a Back-end**\n\n  We create a namespace called `sockshop`.\n\n    ```bash\n    $ kubectl create namespace sockshop\n    namespace/sockshop created\n    ```\n\n  Install the back-end into the `sockshop` namespace.\n\n    ```bash\n    $ kubectl --namespace sockshop apply -k k8s/coherence \n    ```\n\n  The `-k` parameter above will use `kubectl` with `kustomize` to merge all the files under the specified directory and\n  create all Kubernetes resources defined by them, such as deployments and services for each microservice.\n\nTIP: You can see the state of the pods using:\n\n```bash\nkubectl --namespace sockshop get pods\n```\n\n### (Optional) Install the Original WeaveSocks Front End\n\n\u003e Warning: The original WeaveSocks Front End has a few bugs, as well as some security issues, \n\u003e and it hasn't been actively maintained for a few years. However, if you want to deploy\n\u003e it nevertheless to see how it interacts with our back-end services, please follow\n\u003e the steps below.\n\nInstall the `front-end` service by running the following command:\n\n```bash\n$ kubectl apply -f k8s/optional/original-front-end.yaml --namespace sockshop\n```\n\nPort-forward to the `front-end` UI using the following\n\n**Mac/Linux**\n\n```bash\n$ export FRONT_END_POD=$(kubectl get pods --namespace sockshop -o jsonpath='{.items[?(@.metadata.labels.app == \"front-end\")].metadata.name}')\n$ kubectl port-forward --namespace sockshop $FRONT_END_POD 8079:8079\n```\n\n**Windows**\n\n```bash\nkubectl get pods --namespace sockshop -o jsonpath='{.items[?(@.metadata.labels.app == \"front-end\")].metadata.name}' \u003e pod.txt\nSET /P FRONT_END_POD=\u003cpod.txt\nkubectl port-forward --namespace sockshop %FRONT_END_POD% 8079:8079\n```\n\n\u003e Note: If you have installed into a namespace then add the `--namespace` option to all `kubectl` commands in these instructions.\n\nYou should be able to access the home page for the application by pointing your browser to http://localhost:8079/.\n\nYou should then be able to browse product catalog, add products to shopping cart, register as a new user, place an order,\nbrowse order history, etc.\n\nBy default, 3 users are already available:\n\n- username `Eve_Berger` with password `eve`\n- username `user` with password `password`\n- username `user1` with password `password`\n\nOnce you are finished, you can clean up the environment by executing the following:\n\n```bash\n$ kubectl delete -f k8s/optional/original-front-end.yaml --namespace sockshop\n$ kubectl delete -k k8s/coherence --namespace sockshop\n```\n\n### Scale Back-End\n\nIf you wish to scale the back-end you can issue the following command\n\nScale only the orders microservice:\n\n```bash\n$ kubectl --namespace sockshop scale coherence/orders --replicas=3\n```\n\nOr alternatively scale all the microservices:\n\n```bash\n$ for name in carts catalog orders payment shipping users\n    do kubectl --namespace sockshop scale coherence/$name --replicas=3\ndone\n```\n\n## Clean Local Docker/Kubernetes\n\n```bash\nkubectl delete --all pods --namespace=sockshop\ndocker system prune -a\n```\n\n## (Optional) Kubernetes Dashboard\n\nIt might be useful to get more visual insight into the Kubernetes deployment by using the\n[Kubernetes Dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/)\n\nFor logging in you will need a token which you can generate with:\n\n```bash\nkubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1==\"token:\"{print $2}'\n```\n\n## Complete Application Deployment\n\nThe [How to Run](#how-to-run) above shows how you can run the application locally, but that may not\nbe enough if you want to experiment by scaling individual services, look at tracing data in Jaeger,\nmonitor services via Prometheus and Grafana, or make API calls directly via Swagger UI.\n\nTo do all the above, you need to deploy the services into a managed Kubernetes cluster\nin the cloud, by following the same set of steps described above (except for port forwarding,\nwhich is not necessary), and performing a few additional steps.\n\n [Go to Complete Application Deployment section](./doc/complete-application-deployment.md)\n\n## Development\n\nIf you want to modify the demo, you will need to check out the code for the project, build it\nlocally, and (optionally) push new container images to the repository of your choice.\n\n [Go to Development section](./doc/development.md)\n \n## Contributing\n\nThis project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)\n\n## Security\n\nPlease consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process\n\n## License\n\nThe Universal Permissive License (UPL), Version 1.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fcoherence-spring-sockshop-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle%2Fcoherence-spring-sockshop-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fcoherence-spring-sockshop-sample/lists"}