Sobes.tech

What is the difference between the RUN and CMD commands in a Dockerfile?

244

def get_current_user(user_id: int): user = users.get(user_id) if user is None: raise HTTPException(status_code=404, detail="User not found") return user @app.get("/users", response_model=list[User]) def list_users(): return [User(*user) for user in users.list()] @app.get("/users/me", response_model=User) def read_current_user(current_user: User = Depends(get_current_user)): return current_user

156

There are two services — registration and order management. A new user creates an order and immediately registers. How to link these events so that the order is not created if registration fails?

153

Are you familiar with distributed transactions? How do orchestration and choreography differ in microservices?

150

In what formats is data transmitted and stored when interacting with NoSQL databases?

145

What data transfer protocols are used in NoSQL databases (Redis, MongoDB, Elasticsearch)?

140

Does the order of fields in a composite index matter in relational databases?

133

Why is indexed search faster and by how much? Compare search without index, with B-tree index, and with hash index.

131

What is the difference between PUT and PATCH? How should the server respond if not all fields are sent with the PUT method? Provide a real case of using PATCH.

130

How to update a high-load microservice to a new version without losing requests? What to do if the database migration breaks the old version?

128

What non-relational DBMS do you know and for what tasks are they used?

125
/2