You can use Java, and is quite popular, but it's relatively slow start up time makes it slightly less suitable for some platforms as others. Graal's AOT compilation helps reduce start up time to a fraction of Hotspot's startup, but things like reflection can cause issues.
To be honest any workload I would have in mind for this would be to offload tasks that don't need real time or generally aren't user facing.
My previous company used aws lambdas for a currency system with background heartbeats and time memory (for playback of DRM protected videos) the load was high but latency want a problem (to be fair most lambdas were hot anyway because of load). We also used them for systems that would have an 'explosive' load (pay per view systems that are never used except pretty much on the night of the event)
If latency isn't an issue, then, sure Java is fine.
I started on a project with low usage running as multiple Spring microservices on GAE. By the time GAE had started up the request routing proxy and started up the end point service GAE had timed out the request. The time out is 60 seconds. That's not a suitable use of Java on serverless. (I migrated to a GCE instance)
Your comment demonstrates your lack of knowledge of the situation. But then how could you know about a system based on two sentences? I didn't say I had a 60 seconds service start up. I said I had multiple interconnected services that combined took more than 60 seconds.
6
u/lovett1991 Jan 09 '20
Did not realise you could use java in serverless! Thought it was for all these fancy JavaScript people.