architecture

DDD - Does DAL access Domain Layer

◇◆丶佛笑我妖孽 提交于 2019-12-24 07:27:51
问题 I see some samples referencing the Domain Layer from DAL. I see that the repository interfaces are defined in the Domain Layer and since the DAL implements them, they need to reference the Domain Layer. The DAL also needs to know the Entities to return so the reference upstream. I thought that we only reference "downstream", can someone explain? 回答1: Yes, that's OK. Think about it like this: If you are going to change (replace) any layer, what layer will it be? It's highly unlikely that you'd

Isolate common code across generic functions

自古美人都是妖i 提交于 2019-12-24 06:49:28
问题 I have two functions in a class. The only differences are the parameter to the function (one taking a Func with a X and the other a Y) and the lines marked with asterisks. Is there any way to isolate those two lines with asterisks or have a common function, or rewrite the functions such that the try, catch block and last few statements are written only once? The objective here is to minimize code duplication. public T Do<T>(Func<X, T> something) { try { var manager = CoreInfrastructure

In client side MVC, who should handle client-server communication?

雨燕双飞 提交于 2019-12-24 06:14:15
问题 I'm working on a client/server product. Basically, server will transfer a document to client side to do editing. The client side has full MVC architecture. The document is the model. Now the problem are: There are some calculation in the model that need some resources in server. For performance reason, some part of the model should be lazy loaded. One example is the image in a document. It didn't load when opening the document, but there is something that load the image, once it loaded it

How to design a distributed application using a Message Broker and a Database?

前提是你 提交于 2019-12-24 05:44:06
问题 I would like to implement an distributed Point-Of-Sale system, somewhat like the one described in Point of sale app architecture advice. It is a distributed system with these charachteristics: The clients are mission critical , they should work even if the network connection or the server fails, but just for a few days or so. The clients must be easy to install. Each client has it's own local embedded database. The communication between the clients and the server is using a message queue. The

Message bus and Message queue understanding

时光怂恿深爱的人放手 提交于 2019-12-24 04:51:14
问题 I would like to know if my understanding of Message Bus and Message Queue workings is correct. First thing first, I need to clear the naming, a service bus is used interchangeably with message bus ? It is a publisher-subscriber type of system where messages are added let's say to a message collection by any number of publishers and from where any number of subscribers can read, am i right so far ? P1 --- /``````S1 \________ Service Bus Middleware ------+------ S2 / MESSAGE-COLLECTION \_____

How to develop MS CRM kind of application

对着背影说爱祢 提交于 2019-12-24 03:48:18
问题 I have worked with MS CRM. There we can design our custom entity graphically and then we can also build a visual form to perform CRUD operations on that entity. This feels so simple from end user's perspective. However I am interested to know how can I develop the similar kind of application where I design my table on the fly and the design UI on the fly. What I want to know is like how do they achieve all of this dynamically? If I have to create CRUD on one simple table, I need to write good

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

System design interview: how to design a chat system (e.g., Facebook Messenger, WeChat or WhatsApp)

守給你的承諾、 提交于 2019-12-24 03:10:51
System design interview: how to design a chat system (e.g., Messenger, WeChat or WhatsApp) Methodology: READ MF! For system design interview questions, normally we should follow the "READ MF!" steps. You can easily remember this as "Read! Mother Fucker!", similar to RTFM , with an attitude to your interviewer (Because if I can design this complicated system in 60 minutes, why would I waste my time interviewing here? JK) READ MF! (Requirement, Estimation, Architecture, Details, Miscellaneous, Future) Requirement clarification, keep it simple first and make some assumptions to make your life

What is the best way to check if I have a 32-bit or a 64-bit Linux?

自作多情 提交于 2019-12-24 03:06:04
问题 I have to check in CMake script if I have a 32-bit or a 64-bit Linux in order to know how to build a C++ program. Which command is the best choice : getconf LONG_BIT arch uname -m 回答1: Using CMake one possible way is to check the CMAKE_SIZEOF_VOID_P variable: if (CMAKE_SIZEOF_VOID_P EQUAL 8) message (STATUS "Compiling for 64-bit") endif() 回答2: I'd propose to use any two of the methods together . (or all three) Just for the backup, and to be cross platform. Another Linux distribution can use

Using a relational database and a key-value store in combination

喜你入骨 提交于 2019-12-24 02:47:33
问题 The requirements for the project I'm working seem to point to using both a relational database (e.g. postgre, MySQL) in combination with a key-value store (e.g. HBase, Cassandra). Our data almost breaks nicely into one of the two data models with the exception of a small amount of interdependence. This is not an attempt to cram a relational database into a key-value store; they are independent of each other. Are there any serious reasons to not do this? 回答1: I work in SQL DBMS territory, so