Sobes.tech

What to do if the database loads at 100% every 30 minutes? How to solve the heavy analytical query problem?

Middle+
235

How to process parallel balance deduction operations sequentially to avoid double deduction (race condition)?

Middle+
232

Why did you choose an object for storing subscribers? How does unsubscription through filter work? What is the algorithm complexity of filter?

Middle+
199

/* * Implement an EventEmitter. * With methods emit and on. * * on(eventName: string | Symbol, callback: (payload?: any) => void): * () => void; * Takes an event name and a callback function. * The function subscribes to the event. * The result of the function should be an unsubscribe function. * * emit(eventName: string | Symbol, payload?: any): void * Takes an event name and a payload that will * be passed to each listener of eventName; the function triggers the event. * If no listener is found, it should throw an exception. * * ------------------------------------------------------ * * Example: * const myEmitter = new EventEmitter(); * * const unSubscribe = myEmitter.on('event', (payload) => { * console.log('an event occurred!!!', payload); */

Middle+
191

What are the purposes of indexes in PostgreSQL?

Middle+
185

Tell about the principles of ACID in relational databases.

Middle+
174

// [DATABASE] Design a database for users and their electronic wallets. // A user can own multiple electronic wallets in different currencies, but cannot own two wallets in the same currency. // Possible currencies: USD/EUR/RUB. The wallet should contain the current balance; // Currencies should have an additional name in Russian.

Middle+
173

What are connection pools in the context of working with databases, and what are they used for?

Middle+
173

What are FK and UNIQUE constraints in a database?

Middle+
167

What levels of transaction isolation do you know and what do they mean?

Middle+
164

Why choose FLOAT type for balance? How does it differ from DECIMAL? What changes if INTEGER is used?

Middle+
160

Tell us about your experience with monitoring and logging (Grafana, Kibana)

Middle+
153

// 2. Formulate a query to select users who do not have a EUR wallet.

Middle+
152

What is the difference between synchronous and asynchronous code?

Middle+
152

What is the difference between Map and WeakMap?

Middle+
151

What is Node.js and what does it consist of?

Middle+
150

// The user may own multiple electronic wallets in different currencies, but cannot own two wallets in the same currency. // Possible currencies: USD/EUR/RUB. The wallet must contain the current balance; // Currencies should have an additional name in Russian. // ADD Currency -> BTC/ETH/TON // ADD language ES/FR/EN User { id int PK string email string } Currency { code varchar(3) PK // USD, EUR, RUB name_ru string optional type enum('fiat', 'crypto') } CurrencyTranslations { } Wallet { user_id FK (User.id) currency_code FK (Currency.code) balance decimal }

Middle+
138

Name the promise methods (Promise.resolve, Promise.reject, and others)

Middle+
133

What is an EventEmitter and how does it work?

Middle+
128

What type of relationship will there be between the books and authors tables?

Middle+
118