system-design

ElasticSearch vs MongoDB vs Cassandra for mailer logs

夙愿已清 提交于 2019-12-26 02:43:06
问题 I have a mailer system where in we send 1-2 lakhs mail everyday and then we store all the clicks / opens actions of those mail. This is currently working fine in MySQL. But now with increasing traffic, we are facing some performance issue with Mysql. So we are thinking of shifting to Elastic / Cassandra / Mongo. My possible queries include a) Getting user which have opened / clicked a specific mail or not. b) Calculating open rate / click rate for mail I think cassandra might not fit here

How is it possible for a Hyperledger Sawtooth Validator node to have 'number of peers greater than the maximum connectivity' in the Sawtooth Network?

主宰稳场 提交于 2019-12-24 03:44:18
问题 Below statement is from this documentation. The network component continues to perform a peer search if its number of peers is less than the minimum connectivity. The network component rejects peering attempts if its number of peers is equal to or greater than the maximum connectivity. Question: As the documentation says, number of peers is equal to or greater than the maximum connectivity, If a node is allowed to have a 'maximum number of peers', say N, how can the 'number of peers' be

Need clarification in documentation of Hyperledger Sawtooth Architecture Guide : Validator Peer to Peer (P2P) Network

安稳与你 提交于 2019-12-11 15:56:07
问题 I would like to understand the below statementS from this documentation. Part 1: The network component continues to perform a peer search if its number of peers is less than the minimum connectivity. The network component rejects peering attempts if its number of peers is equal to or greater than the maximum connectivity. Part 2: Even if maximum peer connections is reached, a network service should still accept and respond to a reasonable number of connections (for the purposes of other node

BOOST ASIO multi-io_service RPC framework design RFC

安稳与你 提交于 2019-12-11 05:29:49
问题 I am working on a RPC framework, I want to use a multi io_service design to decouple the io_objects that perform the IO (front-end) from the the threads that perform the RPC work (the back-end). The front-end should be single threaded and the back-end should have a thread pool. I was considering a design to get the front-end and back-end to synchronise using a condition variables. However, it seems boost::thread and boost::asio do not comingle --i.e., it seems condition variable async_wait

What is the differences between Traditional code-based engineering and model-driven engineering approaches?

时光怂恿深爱的人放手 提交于 2019-12-07 12:43:09
问题 I've found this paragraph in the literature but I didn't understand the meaning of it Design practice is moving from traditional code-based engineering, with a strong division of work along the development life cycle, to model-driven engineering approaches where all people in the design flow can have their saying on the models. Any help would be very appreciated 回答1: I am not sure that I agree with the way the sentence was written, but then I may be missing some context and, in any case, it

How to design a distributed job scheduler? [closed]

巧了我就是萌 提交于 2019-12-04 04:59:04
I want to design a job scheduler cluster, which contains several hosts to do cron job scheduling. For example, a job which needs run every 5 minutes is submitted to the cluster, the cluster should point out which host to fire next run, making sure: Disaster tolerance: if not all of the hosts are down, the job should be fired successfully. Validity: only one host to fire next job run. Due to disaster tolerance, job cannot bind to a specific host. One way is all the hosts polling a DB table(certainly with lock), this guaranteed only one host gets the next job run. Since it often locks table, is

How to overcome shortcomings in reporting from EAV database?

末鹿安然 提交于 2019-11-30 14:09:10
问题 The major shortcomings with Entity-Attribute-Value database designs in SQL all seem to be related to being able to query and report on the data efficiently and quickly. Most of the information I read on the subject warn against implementing EAV due to these problems and the commonality of querying/reporting for almost all applications. I am currently designing a system where the fields for one of the entities are not known at design/compile time and are defined by the end-user of the system.

How to overcome shortcomings in reporting from EAV database?

女生的网名这么多〃 提交于 2019-11-30 09:39:24
The major shortcomings with Entity-Attribute-Value database designs in SQL all seem to be related to being able to query and report on the data efficiently and quickly. Most of the information I read on the subject warn against implementing EAV due to these problems and the commonality of querying/reporting for almost all applications. I am currently designing a system where the fields for one of the entities are not known at design/compile time and are defined by the end-user of the system. EAV seems like a good fit for this requirement but due to the problems I've read about, I am hesitant

How to properly use class extensions in Swift?

纵饮孤独 提交于 2019-11-28 07:34:45
In Swift, I have historically used extensions to extend closed types and provide handy, logic-less functionality, like animations, math extensions etc. However, since extensions are hard dependencies sprinkled all over your code-base, I always think three times before implementing something as an extension. Lately, though, I have seen that Apple suggests using extensions to an even greater extent, e.g. implementing protocols as separate extensions. That is, if you have a class A that implement protocol B, you end up with this design: class A { // Initializers, stored properties etc. }

How to increase my “advanced” knowledge of PHP further? (quickly) [closed]

别来无恙 提交于 2019-11-27 09:58:50
I have been working with PHP for years and gotten a very good grasp of the language, created many advanced and not-so-advanced systems that are working very well. The problem I'm running into is that I only learn when I find a need for something that I haven't learned before. This causes me to look up solutions and other code that handles the problem, and so I will learn about a new function or structure that I hadn't seen before. It is in this way that I have learned many of my better techniques (such as studying classes put out by Amazon, Google or other major companies). The main problem