“Expiration” of a Domain Entity in Microservice Architecture

I want to implement an expiration functionality for a domain entity. For example:

User queries a Gift Code that should expire somewhere around 30 mins after creation.

I see several approaches to this problem:

  1. Create a Scheduler inside a Service which will run every 30mins in a separate execution thread and expire all Gift Codes. This approach seems not the best one in case of several running instances of a Service. They all will race for the update in database.
  2. Create a Scheduler service which will ping GiftCode service every 30mins. Request will be sent to a single instance of GiftCode service selected by some loadbalancer/discovery server.
  3. Expire Gift Code during its next query/update. This approach is not quite applicable because later some actions (ex. email sending) might be added to be executed after expiration.

My question is whether there might be a better solution to this problem than 3 above.

Europe: Do 90 days of Schengen apply automatically after expiration of Student visa?

This question might have already been answered but I cannot seem one to perfectly fit my situation. I am an albanian citizen and currently staying in Austria with a D Visa which is available for 6 months. It expires on June 30th. I have a flight to take on June 23rd to Italy where I need to stay till July 6th. Which means, my visa will expire when I’m in Italy. My question is, do my 90 days of Schengen apply directly after my visa expires or should I first go to Albania and then return for them to start being counted? If I wasn’t clear enough tell me and I will answer as soon as possible Thanks in advance

Traveling to Italy from USA with Italian Passport near Expiration

Traveling to Italy from the US with an Italian passport that will have less than 3 months left before expiration upon arrival in Italy and will also have a valid US Green Card with no expiration impending. I will return to US before six weeks before Italian Passport Expires.

a) will I have issues with departure from the US and entry into Italy ?

b) will I have issues with departure from Italy and re-entry into US ?

…just trying to figure out whether it is worth trying to renew passport before I leave for Italy

Thanks Rosa

Big bug: why does iCloud Keychain remember the wrong expiration month for all of my credit cards?

I’ve been adding credit cards to my iCloud Keychain for years, and after a few months, I notice that my payments receive errors when I use the autofill from iCloud.

The bug:

I’ve realized that iCloud Keychain consistently changes the expiration month (and nothing else) to one month earlier.

What I’ve tried:

I used to think that I’m entering it incorrectly the first time around. But then I went and purged all of them to be correct, but, alas, after some time, the months are incorrect again.

I’ve also tried deleting these cards and adding them fresh. To no avail.


(1) Should I be worried that someone has access to my account? Or is this just a (major) bug in the iCloud Keychain?

(2) How do I fix this for good? I’ve just gone and corrected all of the months again.

Assuming that everyone always performs a revocation check, do we still need expiration time in each certificate?

I understand that each public key certificate includes an expiration time, and a CRL is issued periodically, listing all currently revoked certificates. However, in class we were told to think about whether or not we still needed expiration time in each certificate assuming a revocation check is always performed. I feel like we would still need an expiration time in each certificate because then, how would we know when a certificate is revoked?

If anyone could help broaden my mindset, it would be much appreciated

What should happen when the user edits the expiration date for a credit card?

The UX for entering the month and year of a credit card expiration date can be tricky. I tried a few services (Netflix, Lyft, Uber) and found they were all buggy. Amazon avoids this by using drop-down fields. Cash App (from Square) avoids this by disallowing any edits except for backspacing from the end.

I’ve looked at related threads on this site and articles they link to, such as https://ux.stackexchange.com/a/98983 and The most intuitive way to input credit card expiry dates.

Some principles are widely accepted, such as automatically adding the / after the user types the first two digits. But I can’t find anything addressing my question.

Suppose the user types in an expiration date like 06/30, representing June of 2030. Then the user realizes they meant to type in 07 for the month. They put the cursor right after the 6 and backspace. What do they see? I think the two main options are:

  1. 0/30
  2. 03/0

These represent two different philosophies. #1 would treat month and day as separate fields that can be edited independently of each other. #2 would treat the expiration date as a single text field with a / after the second character.

Which is better UX? They both seem odd to the user, and would need less restrictive validation in editing than when originally typing.

If I was editing a phone number or social security number, I would use #2. It’s clearly one field. In something like the Square Cash App, where credit card number and expiration and CVV are all displayed in a single row, those are clearly separate fields and I would expect #1 (although again, in their case, they don’t allow moving the cursor and editing previous characters). If the month and year were physically in separate fields, they should be edited independently. But this case seems ambiguous.

If it matters, this is for an Android app.

What’s better UX? #1, #2, or something else?