architecture

Is it bad idea to share (almost) identical data among microservices for item recomendation purposes

那年仲夏 提交于 2021-02-08 05:49:12
问题 I have a question about the architecture of application composed of microservices. I have few microservices, but those that are interesting in the context of this question are: Human Resources - here are stored all the user data such as username, sex, user's experience etc. Jobs - here are stored all the data about each job advertisement - job description, expected experience etc. So, I need to create new microservice (let's name it Recommender ) which sole purpose will be - based on the

Api gateway for Microservices with Google Cloud Functions

亡梦爱人 提交于 2021-02-08 03:42:25
问题 Inputs For example, we have a few services. Account service Product service Payment service Each service is a separate Google Cloud Function. Each service has its own HTTP API. For example, the account service has: https://REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/account/sign-up https://REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/account/sign-in https://REGION-FUNCTIONS_PROJECT_ID.cloudfunctions.net/account/reset-password etc Each service has its own swagger documentation endpoint

Design Kafka consumers and producers for scalability

Deadly 提交于 2021-02-07 10:50:30
问题 I want to design a solution for sending different kinds of e-mails to several providers. The general overview. I have several upstream providers Sendgrid, Zoho, Mailgun and etc. They will be used to send e-mails and etc. For example: E-mail for Register new user E-mail for Remove user E-mail for Space Quota limit (in general around 6 types of e-mails) Every type of e-mail should be generated into Producers, converted into Serialized Java Object and Send to the appropriate Kafka Consumer

Android LiveData and Room: getValue returning NULL

大兔子大兔子 提交于 2021-02-07 10:30:46
问题 When reading data from DB using ROOM and returning LiveData, getValue() method returns null. I have been unable to understand what is going wrong for a while now. Can you please assist with this issue? There is data in the database, it seems like it is more of an issue of how I am using LiveData objects. Activity: public class ExercisesViewActivity extends AppCompatActivity implements View.OnClickListener { private ExerciseViewModel exerciseViewModel; private ExercisesAdapter

ASP.Net MVC Where do you convert from Entities to ViewModels?

放肆的年华 提交于 2021-02-07 03:37:05
问题 Title pretty much explains it all, its the last thing I'm trying to work into our project. We are structured with a Service Library which contains a function like so. /// <summary> /// Returns a single category based on the specified ID. /// </summary> public Category GetCategory(int CategoryID) { var RetVal = _session.Single<Category>(x => x.ID == CategoryID); return RetVal; } Now Category is a Entity (We are using Entity Framework) we need to convert that to a CategoryViewModel. Now, how

ASP.Net MVC Where do you convert from Entities to ViewModels?

北战南征 提交于 2021-02-07 03:34:33
问题 Title pretty much explains it all, its the last thing I'm trying to work into our project. We are structured with a Service Library which contains a function like so. /// <summary> /// Returns a single category based on the specified ID. /// </summary> public Category GetCategory(int CategoryID) { var RetVal = _session.Single<Category>(x => x.ID == CategoryID); return RetVal; } Now Category is a Entity (We are using Entity Framework) we need to convert that to a CategoryViewModel. Now, how

How to check if a database link is valid in Oracle?

点点圈 提交于 2021-02-07 03:29:00
问题 I have a main database with only setup data at the headquarter and several databases at different branches.I created a database link for each branch server. In some case I would like to query all the valid links (as some links could be invalid due to connection problems or anything else),so my question is How to check if the database link is valid without getting in Connection timeout problems. Is there a SQL statement to let the oracle main server do that check and return only the valid

How to check if a database link is valid in Oracle?

a 夏天 提交于 2021-02-07 03:26:31
问题 I have a main database with only setup data at the headquarter and several databases at different branches.I created a database link for each branch server. In some case I would like to query all the valid links (as some links could be invalid due to connection problems or anything else),so my question is How to check if the database link is valid without getting in Connection timeout problems. Is there a SQL statement to let the oracle main server do that check and return only the valid

Why does Linux use getdents() on directories instead of read()?

给你一囗甜甜゛ 提交于 2021-02-06 11:22:30
问题 I was skimming through K&R C and I noticed that to read the entries in a directories, they used: while (read(dp->fd, (char *) &dirbuf, sizeof(dirbuf)) == sizeof(dirbuf)) /* code */ Where dirbuf was a system-specific directory structure, and dp->fd a valid file descriptor. On my system, dirbuf would have been a struct linux_dirent . Note that a struct linux_dirent has a flexible array member for the entry name, but let us assume, for the sake of simplicity, that it doesn't. (Dealing with the

Why does Linux use getdents() on directories instead of read()?

南笙酒味 提交于 2021-02-06 11:21:31
问题 I was skimming through K&R C and I noticed that to read the entries in a directories, they used: while (read(dp->fd, (char *) &dirbuf, sizeof(dirbuf)) == sizeof(dirbuf)) /* code */ Where dirbuf was a system-specific directory structure, and dp->fd a valid file descriptor. On my system, dirbuf would have been a struct linux_dirent . Note that a struct linux_dirent has a flexible array member for the entry name, but let us assume, for the sake of simplicity, that it doesn't. (Dealing with the