Hi, Jeff.

Do you mean load all of them into "instance memory"? I am not sure how much
instance memory I have in app engine. That should work, but need to measure
the startup time of instances. When a lot of requests come in, each
instance has to keep these copy of constants in their instance memory.


Jeff Schnitzer <[email protected]> 於 2016年6月10日 星期五寫道:

> Just a few thousand constants? Even if each was 1k (!), you’re talking
> about a few megabytes of RAM. Why not just load them from CSV into RAM and
> keep them there?
>
> Jeff
>
> On Wed, Jun 8, 2016 at 8:20 PM, YuRen Lin <[email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote:
>
>> Hi, all
>>
>> I am in the game industry and use Google App Engine as my backend server.
>> My problem is we do the game logic calculation in the server side and use
>> thousands of Constants which read from csv files. Our current solution is
>> to read CSV files and store them into the datastore. Then when a request
>> comes, the servlet checks memcache first, if miss read from datastore. This
>> is done automatically by Objectify. I am wondering if there is other more
>> effective way to do this.
>>
>> Other solutions include:
>> 1. store all constants in the servlet as int array. But I think the
>> launch overhead may be a lot, since there are thousands more constants.
>> 2. read constant from csv files each time the servlet needs it. I don't
>> think this is a good idea.
>>
>>
>> Thanks in advance. First time to post here.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected]
>> <javascript:_e(%7B%7D,'cvml','google-appengine%[email protected]');>
>> .
>> To post to this group, send email to [email protected]
>> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
>> Visit this group at https://groups.google.com/group/google-appengine.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-appengine/9046e0b0-68d3-4337-bdd6-d681ae15b028%40googlegroups.com
>> <https://groups.google.com/d/msgid/google-appengine/9046e0b0-68d3-4337-bdd6-d681ae15b028%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-appengine/Ap8z5OsgiFg/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected]
> <javascript:_e(%7B%7D,'cvml','google-appengine%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/CADK-0uiy3JKukPDMZLnABNdUv0ZnM2WWXRKz%3DWqb-Bi5W_tQTA%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-appengine/CADK-0uiy3JKukPDMZLnABNdUv0ZnM2WWXRKz%3DWqb-Bi5W_tQTA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
----
YuRen Lin
Skype: yuren892
QQ: 2254642234

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CADQfWybpGHzn2e6VN%3DQdMC9HQj98c%2BvX1b5rS0tJ9ocoq_in2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to