-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Service linger time and batch serving #239
Comments
A few options come to mind for batched servicing. Option 1: Multiple serversIn a sense what batch processing means is that there are multiple abstract servers, which may at times mean multiple servers in Ciw being used to represent a single thing in real life that can complete multiple jobs simultaneously. This allows having multiple jobs being completed simultaneously. In Ciw this can be done by passing an argument to the Option 2: Sequential distributionThe first approach involves using A sequence of Option 3: Custom distributionIf you need something like option 2 but you would rather sample the service times during the simulation than precompute them, then you can design your own custom distribution as per the docs. |
I might have to think more service lingering time. One simple option is to include the lingering time into the Ciw node's service time. That would be fine if you're trying to get the rate of flow of messages right, but wouldn't help if you wanted to estimate something like the difference between the service time and lingering time. Otherwise I think you'll have to look at patching where you set the server to be off duty for some amount of time right after the completion of a service. |
Hi @ZacAttack I think you can do this with custom service disciplines. Please see the test case It should be simply to add another check that says, if number of customers above a threshold, just take the customer at the head of the queue, regardless of their current waiting time. One drawback of this method is that customers are only chosen when the |
I'm trying to model a system which uses a Kafka producer.
A Kafka producer works with a queue size and a linger time. A Kafka producer will send messages to a broker if one of two criteria are met. Either there are messages in queue on the producer and a linger time has passed, or, the number of messages in the queue has exceeded some amount.
Thinking through this in ciw terms, it seems like a slotted service that is capacitated would give me the behavior of linger time. However, I need to forgo this behavior if the queue size gets large enough. I'm not sure I'm seeing a clear way from the docs to simulate either the queue size behavior or the dual behavior of the serving node.
Welcome to any suggestions.
The text was updated successfully, but these errors were encountered: