Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Sessions" with Google Cloud Endpoints

This question is only to confirm that I'm clear about this concept.

As far as I understand, Google Cloud Endpoints are kind of Google's implementation of REST services, so that they can't keep any "session" data in memory, therefore:

  • Users must send authentication data with each request.
  • All the data I want to use later on must be persisted, namely, with each API request I receive, I have to access the Datastore, do something and store the data again.

Is this correct? And if so, is this actually good in terms of performance?

like image 752
MikO Avatar asked Mar 20 '13 11:03

MikO


People also ask

What is session in BigQuery?

You can capture your SQL activities in a BigQuery session. Temporary tables and variables can be used throughout the session to interactively build one or more queries. Multiple sessions can be active at the same time and the history for each session is saved.

What is session in Dialogflow?

A session represents a conversation between a Dialogflow agent and an end-user. You create a session at the beginning of a conversation and use it for each turn of the conversation. Once the conversation has ended, you discontinue using the session.

Is Dialogflow an API?

Stay organized with collections Save and categorize content based on your preferences. Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices).


1 Answers

Yes you can use session, only put another Paramether in your API method with HttpServlet:

@ApiMethod
public MyResponse getResponse( HttpServletRequest req, @Named("infoId") String infoId ) {
    // Use 'req' as you would in a servlet, e.g.
    String ipAddress = req.getRemoteAddr();
    ...
}
like image 127
Douglas Correa Avatar answered Oct 20 '22 00:10

Douglas Correa