Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6965759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:06:10+00:00 2026-05-27T16:06:10+00:00

It seems the only way to make the GAE Channel API financially viable is

  • 0

It seems the only way to make the GAE Channel API financially viable is to implement some kind of pooling mechanism (one of the senior app engine product managers even told me this when I emailed them about the exorbitant price) to reuse channels that have not yet expired.

I’ve been brainstorming ways (places) to implement a channel pool, but each method I think of has some pretty serious drawbacks.

Static memory of a Servlet — Good, but will drop quite a bit of open channels when a new VM instance opens and/or a client gets passed from one VM to another.

Memcache — At least the memory is globally accessible from all VMs, but now the possibility of dropping a very viable channel is possibly greater due to inactivity and memory pressure.

Backend Instance — Probably the best option in terms of reliability, but now the expense of running the backend will eat up all the savings of implementing the pool in the first place!

Is there a better place/way of implementing a channel pool across VMs that I’m missing, or am I unnecessarily hung up on the drawbacks of my options here? I really hope there is, or it looks like my app will have to revert to polling (which is looking marginally cheaper in my preliminary metrics).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:06:11+00:00Added an answer on May 27, 2026 at 4:06 pm

    Here’s what I’d do (I’m actually considering writing this library after seeing your question. I need it too):

    Create a taskpool module with the following API.

    client_id, token = taskpool.get()
    
    # Setup a heartbeat in the client JS, maybe every minute. 
    # Also call this every time the client indicates presence
    taskpool.ping(client_id)
    
    taskpool.release(client_id)
    

    Implementation:

    • Store the client_id and token in an entity, with a status indicating whether it’s being used, last ping time, and creation time. Let the client_id be the key. Also consider using NDB. Free memcaching.

    get() checks if there are unused tokens and returns one if it finds it. Otherwise create a new one, store and return it.

    ping() updates the last ping time for that token. Instead of polling, let the client send in a ping every [heartbeat] time.

    release() marks the token as unused.

    Run a task / cron every [heartbeat] seconds to find the tokens which haven’t gotten a ping in a while – and set them as unused.

    When clients report a closed token, perform a get().

    Keep in mind, though, that a loss in security is a by-product of any kind of token pooling. If a malicious client has held on to a token and stopped sending heartbeats, it might later be able to listen in on the messages being passed to the new client once the token is re-purposed. This isn’t a problem if you’re on a fully public site, but keep it in mind anyway.

    I will update this answer if and when I write this up as a library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I've read seems to indicate that the only way to do it is
it seems that on Rails or erb, the only way to output anything is
After much reading it seems that, really, the only way to read a number
So far, reflection seems to be the only way to dynamically check if two
It seems the best (only?) way to rotate an MPMoviePlayerController to landscape is to
I am experiencing a odd problem. My OnItemSelectedListener seems only works one time, i
Is there a way to make the jquery validator check a field one by
It seems like the only way to do this is to pass the -i
partials and helpers seem to do similar things to me. only the way u
Seems only a module's missing, but I've wrote the in the package.json file, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.