User preferences with microservice architecture

1.4k Views Asked by At

Me and my team are implementing a product based on microservices architecture(every microservice has it's own data storage). We already have a couple of services deployed on AWS and we need to add an ability to save user preferences like:

  1. Saved filters to query data
  2. UI widget settings
  3. Columns order
  4. etc

I think that we have the following options to implement saving user-preferences in my case:

  1. Extend user profile(it is used to store companies and users, roles) service and add new items there
  2. Create new microservice for keeping only user preferences
  3. Use some of AWS services for that(I am still checking what is the best)

What we use for security:

  • AWS Cognito
  • SAML IDP
  • JWT tokens

We also have user-profile microservice(I mentioned earlier). It contains data received from other products like admin service.

What do you think? What is the best option for my case?

1

There are 1 best solutions below

0
agent420 On

You can use custom attributes (as suggested by @jarmod) if you only use Cognito userpools. But if you use other providers like Microsoft ADFS, Google, Facebook etc., you could look into Cognito Sync. Although Cognito Userpools now support some external providers, it may not be suited for your use case. So, you could integrate various Auth providers (including Userpool) in an Identity pool and use Cognito sync datasets to store preferences. In fact, that is the whole point of Sync, to provide cross device access to small datasets like user-preferences. This way if a user logs in with Userpool & later with Facebook, you could give an option to link both accounts in your application & merge the user preferences. It all depends on your use-case.