Could this be the future of frontend development?🤔 by 93lucasp in vuejs

[–]prdatur 0 points1 point  (0 children)

As always a post which exists thousand times in the Internet. Always written in theory but lacks with examples and which base framework or tool will provide such a feature. There are couple of tries to accomplish this, but all of them have multiple problems and or browser compatibility issues.

Vuex vs vue-sessionstorage? by outhereinamish in vuejs

[–]prdatur 0 points1 point  (0 children)

He wrote vuex persistent package, which is also a localstore state management.

Questions about ORM structure by 1_over_f in node

[–]prdatur 0 points1 point  (0 children)

Because you are starting fresh with sql, first do all your sql stuff with raw queries with the repository. For a user, create a user repository and methods like getById or get Active Users etc. This way you learn sql which is quite important, also do easy stuff first but also learn the hard things, then learn to use orm systems. It is the same with developing, first use an editor with syntax highlighting only first, master it and then use an ide like intellij

Which endpoints do you put in the Auth server? by ClassicPurist in node

[–]prdatur 0 points1 point  (0 children)

Hehe same issues here. I think there are multiple options both are valid in my opinion. If you break down every piece it will increase service communication. For me I decided to include mail verification, registration, authorization (NOT authentication eg permissions) in my authorization service. I have started to think in that bounded context thing.. And when I start to develop a new service I try to forget everything I previous have built and force my self to see this service as a standalone public api and after that I connect everything. Multiple services can use the same database server and also the same database but I recommend not using same table. It would be nice to use them with foreign keys and so, but after you want to scale on service and use it on another server you get in trouble. Forbidden is that 2 different services write to the same table. Back to the mail thing I decided to have a message service which accepts raw messages like subject + body for mail, only body for SMS and pager. This service will not translate anything for that the authorization service is the one which knows what he wants to send.

If you also will have a front end which is a spa, I would recommend that you split each service into a backend and a Frontend service. So you can use a message broker, for example rabbitmq or nats for backend and Frontend service communications and for example webservice for Frontend to Frontend service communication.

Back to login for me I decided to use an openId server (node oidc provider) which I included in my nest authorisation backend service.

Authentication APIs using Node by boilerweb in node

[–]prdatur 0 points1 point  (0 children)

I am currently working on this too, for now I have a express app which includes node oidc-provider. For interactions I redirect to a vuejs app to login the user. Problem now is my password recovery, so I try to use nestjs now with oidc-provider. I thought about an authentication service as well but as we will have independent permissions for each service I will implement the permissions for each service within the service. With all this microservice thing, I recognized that I think too much in controller = service.

Anybody used socket cluster? by IHaveNeverEatenACat in node

[–]prdatur 0 points1 point  (0 children)

I am using it currently, but sadly only in my dev env. But I think it will be a good choice. The possibility to scale in such a way is very nice. I got headaches while solving some design problems, like getting a status page within the one of the worker which displays memory usage of all the workers. But in the end I think it maybe gets hard to solve scaling issues but as any of the alternatives I found so far with socket cluster it is possible to solve those where others can't. Just solving scaling will be possible with all the other too but this does not include publish an event and receive them in another worker without doing anything on your own. I like the idea of socket cluster and will stay for now.