Cosmos Db is not a relational database, but we can use it for relational data, for example, eCommerce data. A few key patterns for successful data modeling in Cosmos DB are Select partition key wisely: Consider max document size, max partition size, and the most common query pattern. Choose the partition to let the query… Continue reading Cosmos DB Data Model example
Cloud can be productive but is not cheap
For the new project to analyze Edgar document, which is where companies in the US announces their annual report, quarterly report, etc by law. Many investors consider this data as a valuable investment data resource. Challenge Volume: To analyze the Edgar document, the volume is the first challenge. The number of announcements in Edgar is… Continue reading Cloud can be productive but is not cheap
Azure Event service cheat sheet
Storage Queue: Queue. large and slow messages. e.g. dead-letter event. Service Bus: Transactional message. At-most-once delivery. Event Hub: IoT, log data, stream data Event Grid: Link events from the event source to the event handler (e.g. function). Pub/Sub. 1 to Many delivery.
DateTime – How to properly save and read date time in ASP.Net
There could be many ways of saving DateTime in an App. The simplest way is storing it as it is typed in by users if the website’s users are within a single country. If a website is serviced globally, confusion starts. Normally users might assume the date-time is local time. For example, if a user… Continue reading DateTime – How to properly save and read date time in ASP.Net
Design Pattern – Composite
Let’s refactor further the previous code sample using the composite pattern. See the link(https://www.dofactory.com/net/composite-design-pattern) for the details of what is a composite pattern. Let’s bring back the last code here. var availableCommands = new ICommand[] { new UpdatePrice(_stockPriceManager, stocksToRead, _appSettings.DaysToReadFromWeb), new UpdateStats(_stockPriceManager, stocksToAnalyze), new SimulateCommand(_stockPriceManager, stocksToAnalyze, _marketWatchRepository, investDay, _tradeOption, _logger, _appSettings) }; if (runOption ==… Continue reading Design Pattern – Composite