Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
github.com/cooldryplace/cart
Hey, people want to buy products.
Building this microservice to scale better.
Cut a piece from the monolith and serve chilled.
Have to be generated. So I have generated a client with GoDoc. Client documentation
The package structure is simple for a reason. Currently, this is a straightforward service, so almost everything is in a single package, where business logic, data storage, and API code is located in separate files. Later if service will become more complex, there will be a need for better granularity and code isolation. But for now, I feel like this is the right balance.
In the future packages structure will be derived from domains, and not from the functionality that code provides. An example would be:
Not:
@rakyll Style guideline for Go packages
Carts rely on other microservices.
Some microservices rely on Cart.
To run all tests: go test github.com/cooldryplace/cart/...
.
To skip integration tests: go test --short github.com/cooldryplace/cart/...
.
The current integration test does not cover cases when storage or other dependency fails.
Currently, only API and client metrics are implemented. This already allows measuring availability and latency. In the future, I can add more specific metrics that will not be used in SLO implementations but will be in dashboards. To pinpoint the root cause of a problem during incidents. So we alert based on SLIs, look at the dashboard, and know where and why it happens.
Adding spans here and there will help to identify bottlenecks. I use Opencensus with Stackdriver exporter for this.
The current DB schema does not allow us to shard data. FKs and autoincrement are in the way. The suggested next step is to handle constraints in the application code. Start using UUIDs.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.