Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Measuring Time on the server side? Best practice for turn based game

Avatar

Level 3

Hello,

What would be the best practice to measure time in a turn based game?

I was looking at room timeout, but to use that it would mean that for each turn I have to put the users in a new room?

Is there a solution where I can measure time serverside and keep users in the same room?

If yes I could use php, if not, we would need java that can measure a running process time.

Cheers,

G

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi There,

You could definitely use PHP or Java - we provide server integration

libraries for either. I don't exactly know what the use case is, so I can't

comment on what makes the most sense, but if it's not info that needs to be

totally secured, measuring on the client(s) can be a viable approach too.

nigel

View solution in original post

3 Replies

Avatar

Level 3

I think I found it! It will be the Baton class for workflow which has timeout as well.

Avatar

Correct answer by
Former Community Member

Hi There,

You could definitely use PHP or Java - we provide server integration

libraries for either. I don't exactly know what the use case is, so I can't

comment on what makes the most sense, but if it's not info that needs to be

totally secured, measuring on the client(s) can be a viable approach too.

nigel

Avatar

Level 3

Thanks Nigel, yes we just realized the Baton class measures timeout on the client side not the server side (meaning Adobe servers)

We will do this on our own server.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----