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

  • Home
  • SEARCH
  • 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 822091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:44:56+00:00 2026-05-15T02:44:56+00:00

My Python server receives jobs that contain a list of the items to act

  • 0

My Python server receives jobs that contain a list of the items to act against, rather like a search query term; an example input:

(Customer:24 OR Customer:25 OR (Group:NW NOT Customer:26))

So when a job is submitted, I have to parse this recipient pattern and resolve all those customers that match, and create the job with that input.

To complicate matters, customers can join and leave groups at any time, and the job should be updated live when this happens.

So as groups change membership, I have to notify all currently-running jobs about it (and they do their thing).

How is best to parse, apply and store (in my RDBMS) this kind of list of constraints?

  • Parsing: eval(), hand-written FSM eating characters, yacc/bison/?, or?
  • applying: how would you store these constraints, and evaluate them?
  • storing: in a database, a row per term with a evaluation-order and a NOT/AND/OR op field; or as a blob?
  • 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-15T02:44:57+00:00Added an answer on May 15, 2026 at 2:44 am

    I suggest pyparsing (http://pyparsing.wikispaces.com/) which lets you describe a grammar neatly and gives you a tree filled with data. Then, hopefully, your syntax is close enough to SQL so that you can trivially form a “where” clause from the parsing results.

    You may pickle and store the parsed tree, or the unparsed requests, or ready-made SQL clauses. This depends on how often will you fetch and reuse them, and whether you need to inspect the database by other means and see the queries. I see no point in storing the queries in a non-blob form unless you want to run interesting selects against them — and if you do, you probably need an XML database or something else that supports trees easily.

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

Sidebar

Related Questions

I've implemented a HTTP server (CherryPy and Python) that receives an encrypted file from
I have a python server that listens on a couple sockets. At startup, I
My team's using a python-based wiki server that calls stored procedures on a SQL
I'd like to write a fairly simple server-side virtual filesystem in either Python (preferably)
I would like to write a python script that would upload any file I
I am building a aync single threaded server that receives data from clients. It
I want to create a server and client that sends and receives UDP packets
I have a Python application that, to be brief, receives data from a remote
I send binary data over websocket from python server: data = struct.pack('!BI', 2, 1)
I am trying to send data from PHP Client to Python Server. CLIENT <?php

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.