Security updates have been issued by Debian (dropbear, php7.4, pixman, sysstat, and xorg-server), Fedora (mingw-expat, mingw-libtasn1, and mingw-pixman), Mageia (binutils/gdb, chromium-browser-stable, exiv2, libtiff, nodejs, pcre, pixman, wayland, and webkit2), Red Hat (device-mapper-multipath and libksba), SUSE (autotrace, busybox, libmodbus, php72, python-numpy, rustup, samba, varnish, xen, and xterm), and Ubuntu (thunderbird).
In Cloudflare’s S-1 document there’s a section that begins: “The Internet was not built for what it has become”.
That sentence expresses the idea that the Internet, which started as an experiment, has blossomed into something we all need to rely upon for our daily lives and work. And that more is needed than just the Internet as was designed; it needed security and performance and privacy.
Something similar can be said about the cloud: the cloud was not designed for what it must become.
The introduction of services like Amazon EC2 was undoubtedly a huge improvement on the old way of buying and installing racks and racks of servers and storage systems, and then maintaining them.
But by its nature the cloud was a virtualization of the older real world infrastructure and not a radical rethink of what computing should look like to meet the demands of Internet-scale businesses. It’s as if steam locomotives were replaced with efficient electric engines but still required a chimney on top and stopped to take on water every two hundred miles.
The cloud replaced the rituals of buying servers and installing operating systems with new and now familiar rituals of choosing regions, and provisioning virtual machines, and keeping code artificially warm.
But along the way glimpses of light are seen through the cloud in the form of lambdas, or edges, or functions, or serverless. All are trying to give a name to a model of cloud computing that promises to make developers highly productive at scaling from one to Internet-scale. It’s a model that rather than virtualizing machines or disks or wrapping things in containers says: “write code, we’ll run it, don’t sweat the details like scaling or location”.
We’re calling that the Supercloud.
The foundations of the Supercloud are compute and data services that make running any size application efficient and infinitely scalable without the baggage of the cloud as it exists today.
The foundations of the Supercloud
Some years ago a movement called NoSQL developed new ways of storing and processing data that didn’t rely on databases. Key-value stores and document stores flourished because rather than thinking about data at the granularity of databases or tables or even rows, they made a direct connection between code and data at a simple level.
You can think of NoSQL as a drive towards granularity. And it worked. NoSQL stores, KVs, object stores (like R2) abound. The rise of MapReduce for processing data is also about granularity; by breaking data processing into easily scaled pieces (the map and the reduce) it was possible to handle huge amounts of data efficiently and scale up and down as needed.
The same thing is happening for cloud code. Just as programmers didn’t always want to think in database-sized chunks, they shouldn’t have to think about VM- or container-sized chunks. It’s inefficient and has nothing to do with the actual job of writing code to create a service. It’s unnecessary work that distracts from the real value of programming something into existence.
In distributed programming theory, granularity has been around for a long time. The CSP model is of tiny processes performing tasks and passing data (it helped inspire the Go language); the Actor model has messages passed between multitudes of actors changing internal state; even the lambda calculus is about discrete functions acting on data.
Object-oriented programming has developers reasoning about objects (not virtual machines or disks). And in CORBA, and similar systems, there’s the concept of an object request broker allowing objects to run and by accessed remotely in a distributed system without knowing details of where or how the object executes.
The theory of computing points away from dedicated machines (virtual or real) and to code and data that run on the Supercloud handling the details of code execution and data locality automatically and efficiently.
So whether you write your code by breaking it up into functions or ship large pieces of functionality or entire programs, the foundations of the Supercloud means that your code benefits from its efficiency. And more.
The Supercloud advantage
The Supercloud makes scaling easy because no one has to think about how many VMs to provision, no one has to keep hot standby VMs in case there’s a flood of visitors. Just as MapReduce (which traces its heritage to the lambda calculus) scales up and down, so should general purpose computing.
And it’s not just about scaling. In the Supercloud both code and data are mobile and move around the network. Attach data to the code (such as with Durable Objects; hello Actor model) and you have a foundation for applications that can scale to any size and move close to users as needed to provide the best performance.
Alternatively, if your data is immovable, we move your code closer to it, no matter how many times you need to access it.
Not only that but working at this level of flexibility means that code enforcing a data privacy or data residence law about where data can be processed or stored can operate at the level of individual users or objects. The same code can behave differently and even be executed in a completely different country based on where its associated data is stored.
A Supercloud has two interesting effects on the cost of running a program. Firstly, it makes it more economical because you only run what you need. There’s never any need for committed VMs waiting for work, or idle machines you’re paying for just in case. Code either runs or it doesn’t. It scales up and down as needed. You only pay for precisely what you need.
Secondly, it creates a more efficient compute platform which is better for everyone. It forces the compute platform (e.g. us) to be as efficient as possible. We have to be able to start code quickly for performance and scale up reasons. We need to efficiently use CPUs because no customer is paying us to keep idle CPUs around. And it’s better for the environment because cloud machines run at very high levels of utilization. This level of efficiency is what allows our platform to scale to the 10 million requests that Cloudflare Workers processed in the time it took you to read the last word of this sentence.
And this compute platform scales well beyond a machine, or a data center, or a country. With the right software (which we’ve built) it scales to the size of the Internet. Software allocates resources automatically across the globe, moving connections, data and processing around for high efficiency and optimal end user experience.
Efficient compute and storage, a global network that’s everywhere everyone is, bound together by software that turns the globe into a single cloud. The Supercloud.
Welcome to the Supercloud
The Supercloud is performant, scalable, available, private, and cost-efficient. Choosing a region for your application, or provisioning virtual machines, or working out how to auto-scale containers, or worrying about cold starts seems ridiculous, hard, anachronistic, a waste of time, rigid and expensive.
Happily, Cloudflare’s been building the alternative to that traditional cloud into our network and our developer platform for years. The Supercloud. The term may be new, but that doesn’t mean that it’s not real. Today, we have over a million developers building on the Supercloud.
Each of those developers wants to get code running on one machine and perfect it. It’s so much easier to work that way. We just happen to have one machine that scales to the size of the Internet: a global, distributed supercomputer. It’s the Supercloud and we build our own products on it, and you can join those one million developers and build on it too.
We’ve been building the Supercloud for 12 years, and five years ago opened it up to developers through Cloudflare Workers. Cloudflare Workers was built for scale and performance since day one, by running on our global network.
And with that, welcome to the Supercloud and welcome to Cloudflare Developer Week 2022.
As is it the case with all of our Innovation Weeks, we’re excited to kick off another week of announcements, enabling more and more use cases to be built on the Supercloud. In fact, it’s building on the Workers developer platform that gives us the super powers to continue delivering new building blocks for our users. This week, we’re going not to just tell you about all the new tools you can play with, but also how we built many of them, how you can use them, and what our customers are building with them in production today.
Watch on Cloudflare TV
You can watch the complete segment of our weekly show This Week in Net here — or hear it in the audio/podcast format.
While scaling our new Feature Flagging product DevCycle, we’ve encountered an interesting challenge: our Cloudflare Workers-based infrastructure can handle way more instantaneous load than our traditional AWS infrastructure. This led us to rethink how we design our infrastructure to always use Cloudflare Workers for everything.
The origin of DevCycle
For almost 10 years, Taplytics has been a leading provider of no-code A/B testing and feature flagging solutions for product and marketing teams across a wide range of use cases for some of the largest consumer-facing companies in the world. So when we applied ourselves to build a new engineering-focused feature management product, DevCycle, we built upon our experience using Workers which have served over 140 billion requests for Taplytics customers.
The inspiration behind DevCycle is to build a focused feature management tool for engineering teams, empowering them to build their software more efficiently and deploy it faster. Helping engineering teams reach their goals, whether it be continuous deployment, lower change failure rate, or a faster recovery time. DevCycle is the culmination of our vision of how teams should use Feature Management to build high-quality software faster. We’ve used DevCycle to build DevCycle, enabling us to implement continuous deployment successfully.
DevCycle architecture
One of the first things we asked ourselves when ideating DevCycle was how we could get out of the business of managing 1000’s of vCPUs worth of AWS instances and move our core business logic closer to our end-user devices. Based on our experience with Cloudflare Workers at Taplytics we knew we wanted it to be a core part of our future infrastructure for DevCycle.
By using the global computing power of Workers and moving as much logic to the SDKs as possible with our local bucketing server-side SDKs, we were able to massively reduce or eliminate the latency of fetching feature flag configurations for our users. In addition, we used a shared WASM library across our Workers and local bucketing SDKs to dramatically reduce the amount of code we need to maintain per SDK, and increase the consistency of our platform. This architecture has also fundamentally changed our business’s cost structure to easily serve any customer of any scale.
The core architecture of DevCycle revolves around publishing and consuming JSON configuration files per project environment. The publishing side is managed in our AWS services, while Cloudflare manages the consumption of these config files at scale. This split in responsibilities allows for all high-scale requests to be managed by Cloudflare, while keeping our AWS services simple and low-scale.
“Workers are breaking our events pipeline”
One of the primary challenges as a feature management platform is that we don’t have direct control over the load from our customers’ applications using our SDKs; our systems need the ability to scale instantly to match their load. For example, we have a couple of large customers whose mobile traffic is primarily driven by push notifications, which causes massive instantaneous spikes in traffic to our APIs in the range of 10x increases in load. As you can imagine, any traditional auto-scaled API service and the load balancer cannot manage that type of increase in load. Thus, our choices are to dramatically increase the minimum size of our cluster and load balancer to handle these unknown load spikes, accept that some requests will be rate-limited, or move to an architecture that can handle this load.
Given that all our SDK API requests are already served with Workers, they have no problem scaling instantly to 10x+ their base load. Sadly we can’t say the same about the traditional parts of our infrastructure.
For each feature flag configuration request to a Worker, a corresponding events request is sent to our AWS events infrastructure. The events are received by our events API container in Kubernetes, where they are then published to Kafka and eventually ingested by Snowflake. While Cloudflare Workers have no problem handling instantaneous spikes in feature flag requests, the events system can’t keep up. Our cluster and events API containers need to be scaled up faster to prevent the existing instances from being overwhelmed. Even the load balancer has issues accepting the sudden increase. Cloudflare Workers just work too well in comparison to EC2 instances + EKS.
To solve this issue we are moving towards a new events Cloudflare Worker which will be able to handle the instantaneous events load from these requests and make use of the Kinesis Data Firehose to write events to our existing S3 bucket which is ingested by Snowflake. In the future, we look forward to testing out Cloudflare Queues writing to R2 once a Snowflake connector has been created. This architecture should allow us to ingest events at almost any scale and withstand instantaneous traffic spikes with a predictable and efficient cost structure.
Building without a database next to your code
Workers provide many benefits, including fast response times, infinite scalability, serverless architecture, and excellent up-time performance. However, if you want to see all these benefits, you need to architect your Workers to assume that you don’t have direct access to a centralized SQL / NoSQL database (or D1) like you would with a traditional API service. For example, suppose you build your workers to require reaching out to a database to fetch and update user data every time a request is made to your Workers. In that case, your request latency will be tied to the geographic distance between your Worker and the database plus the latency of the database. In addition, your Workers will be able to scale significantly beyond the number of database connections you can support, and your uptime will be tied to the uptime of your external database. Therefore, when architecting your systems to use Workers, we advise relying primarily on data sent as part of the API request and cacheable data on Cloudflare’s global network.
Cloudflare provides multiple products and services to help with data on their global network:
However, the lowest latency way of retrieving data from within a Worker is limited by a minimum 60-second TTL. So you’ll need to be ok with cached data that is 60 seconds stale.
Durable Objects: “provide low-latency coordination and consistent storage for the Workers platform through two features: global uniqueness and a transactional storage API.”
Ability to store user-level information closer to the end user.
Unfamiliar worker interface for accessing data for developers with SQL / NoSQL experience.
Each of these tools that Cloudflare provides has made building APIs far more accessible than when Workers launched initially; however, each service has aspects which need to be accounted for when architecting your systems. Being an open platform, you can also access any publically available database you want from a Worker. For example, we are making use of Macrometa for our EdgeDB product built into our Workers to help customers access their user data.
The predictable cost structure of Workers
One of the greatest advantages of moving most of our workloads towards Cloudflare Workers is the predictable cost structure that can scale 1:1 with our request loads and can be easily mapped to usage-based billing for our customers. In addition, we no longer have to run excess EC2 instances to handle random spikes in load, just in case they happen.
Too many SaaS services have opaque billing based on max usage or other metrics that don’t relate directly to their costs. Moving from our legacy AWS architecture with high fixed costs like databases and caching layers to Workers has resulted in our infrastructure spending is directly tied to using our APIs and SDKs. For DevCycle, this architecture has been over ~5x more cost-efficient to operate.
The future of DevCycle and Cloudflare
With DevCycle we will continue to invest in leveraging serverless computing and moving our core business logic as close to our users as possible, either on Cloudflare’s global network or locally within our SDKs. We’re excited to integrate even more deeply with the Cloudflare developer platform as new services evolve. We already see future use cases for R2, Queues and Durable Objects and look forward to what’s coming next from Cloudflare.
Message queues are a fundamental building block of cloud applications—and today the Cloudflare Queues open beta brings queues to every developer building for Region: Earth. Cloudflare Queues follows Cloudflare Workers and Cloudflare R2 in a long line of innovative services built for the Workers Developer Platform, enabling developers to build more complex applications without configuring networks, choosing regions, or estimating capacity. Best of all, like many other Cloudflare services, there are no egregious egress charges!
If you’ve ever purchased something online and seen a message like “you will receive confirmation of your order shortly,” you’ve interacted with a queue. When you completed your order, your shopping cart and information were stored and the order was placed into a queue. At some later point, the order fulfillment service picks and packs your items and hands it off to the shipping service—again, via a queue. Your order may sit for only a minute, or much longer if an item is out of stock or a warehouse is busy, and queues enable all of this functionality.
Message queues are great at decoupling components of applications, like the checkout and order fulfillment services for an ecommerce site. Decoupled services are easier to reason about, deploy, and implement, allowing you to ship features that delight your customers without worrying about synchronizing complex deployments.
Queues also allow you to batch and buffer calls to downstream services and APIs. This post shows you how to enroll in the open beta, walks you through a practical example of using Queues to build a log sink, and tells you how we built Queues using other Cloudflare services. You’ll also learn a bit about the roadmap for the open beta.
Getting started
Enrolling in the open beta
Open the Cloudflare dashboard and navigate to the Workers section. Select Queues from the Workers navigation menu and choose Enable Queues Beta.
Review your order and choose Proceed to Payment Details.
Note: If you are not already subscribed to a Workers Paid Plan, one will be added to your order automatically.
Enter your payment details and choose Complete Purchase. That’s it – you’re enrolled in the open beta! Choose Return to Queues on the confirmation page to return to the Cloudflare Queues home page.
Creating your first queue
After enabling the open beta, open the Queues home page and choose Create Queue. Name your queue `my-first-queue` and choose Create queue. That’s all there is to it!
The dash displays a confirmation message along with a list of all the queues in your account.
Note: As of the writing of this blog post each account is limited to ten queues. We intend to raise this limit as we build towards general availability.
Managing your queues with Wrangler
You can also manage your queues from the command line using Wrangler, the CLI for Cloudflare Workers. In this section, you build a simple but complete application implementing a log aggregator or sink to learn how to integrate Workers, Queues, and R2.
Setting up resources To create this application, you need access to a Cloudflare Workers account with a subscription plan, access to the Queues open beta, and an R2 plan.
Install and authenticate Wrangler then run wrangler queues create log-sink from the command line to create a queue for your application.
Run wrangler queues list and note that Wrangler displays your new queue.
Note: The following screenshots use the jq utility to format the JSON output of wrangler commands. You do not need to install jq to complete this application.
Finally, run wrangler r2 bucket create log-sink to create an R2 bucket to store your aggregated logs. After the bucket is created, run wrangler r2 bucket list to see your new bucket.
Creating your Worker Next, create a Workers application with two handlers: a fetch() handler to receive individual incoming log lines and a queue() handler to aggregate a batch of logs and write the batch to R2.
In an empty directory, run wrangler init to create a new Cloudflare Workers application. When prompted:
Choose “y” to create a new package.json
Choose “y” to use TypeScript
Choose “Fetch handler” to create a new Worker at src/index.ts
Open wrangler.toml and replace the contents with the following:
The [[queues.producers]] section creates a producer binding for the Worker at src/index.ts called BUFFER that refers to the log-sink queue. This Worker can place messages onto the log-sink queue by calling await env.BUFFER.send(log);
The [[queues.consumers]] section creates a consumer binding for the log-sink queue for your Worker. Once the log-sink queue has a batch ready to be processed (or consumed), the Workers runtime will look for the queue() event handler in src/index.ts and invoke it, passing the batch as an argument. The queue() function signature looks as follows:
The final binding in your wrangler.toml creates a binding for the log-sink R2 bucket that makes the bucket available to your Worker via env.LOG_BUCKET.
src/index.ts
Open src/index.ts and replace the contents with the following code:
The export interface Env section exposes the two bindings you defined in wrangler.toml: a queue named BUFFER and an R2 bucket named LOG_BUCKET.
The fetch() handler transforms the request body into JSON, adds the body to the BUFFER queue, then returns an HTTP 200 response with the message Success!
The `queue()` handler receives a batch of messages that each contain log entries, iterates through concatenating each log into a string buffer, then writes that buffer to the LOG_BUCKET R2 bucket using the current timestamp as the filename.
Publishing and running your application To publish your log sink application, run wrangler publish. Wrangler packages your application and its dependencies and deploys it to Cloudflare’s global network.
Note that the output of wrangler publish includes the BUFFER queue binding, indicating that this Worker is a producer and can place messages onto the queue. The final line of output also indicates that this Worker is a consumer for the log-sink queue and can read and remove messages from the queue.
Use your favorite API client, like curl, httpie, or Postman, to send JSON log entries to the published URL for your Worker via HTTP POST requests. Navigate to your log-sink R2 bucket in the Cloudflare dashboard and note that the logs prefix is now populated with aggregated logs from your request.
Download and open one of the logfiles to view the JSON array inside. That’s it – with fewer than 45 lines of code and config, you’ve built a log aggregator to ingest and store data in R2!
Buffering R2 writes with Queues in the real world
In the previous example, you create a simple Workers application that buffers data into batches before writing the batches to R2. This reduces the number of calls to the downstream service, reducing load on the service and saving you money.
UUID.rocks, the fastest UUIDv4-as-a-service, wanted to confirm whether their API truly generates unique IDs on every request. With 80,000 requests per day, it wasn’t trivial to find out. They decided to write every generated UUID to R2 to compare IDs across the entire population. However, writing directly to R2 at the rate UUIDs are generated is inefficient and expensive.
To reduce writes and costs, UUID.rocks introduced Cloudflare Queues into their UUID generation workflow. Each time a UUID is requested, a Worker places the value of the UUID into a queue. Once enough messages have been received, the buffered batch of JSON objects is written to R2. This avoids invoking an R2 write on every API call, saving costs and making the data easier to process later.
Like many of the Cloudflare services you use and love, we built Queues by composing other Cloudflare services like Workers and Durable Objects. This enabled us to rapidly solve two difficult challenges: securely invoking your Worker from our own service and maintaining a strongly consistent state at scale. Several recent Cloudflare innovations helped us overcome these challenges.
Securely invoking your Worker
In the Before Times (early 2022), invoking one Worker from another Worker meant a fresh HTTP call from inside your script. This was a brittle experience, requiring you to know your downstream endpoint at deployment time. Nested invocations ran as HTTP calls, passing all the way through the Cloudflare network a second time and adding latency to your request. It also meant security was on you – if you wanted to control how that second Worker was invoked, you had to create and implement your own authentication and authorization scheme.
Worker to Worker requests During Platform Week in May 2022, Service Worker Bindings entered general availability. With Service Worker Bindings, your Worker code has a binding to another Worker in your account that you invoke directly, avoiding the network penalty of a nested HTTP call. This removes the performance and security barriers discussed previously, but it still requires that you hard-code your nested Worker at compile time. You can think of this setup as “static dispatch,” where your Worker has a static reference to another Worker where it can dispatch events.
Dynamic dispatch As Service Worker Bindings entered general availability, we also launched a closed beta of Workers for Platforms, our tool suite to help make any product programmable. With Workers for Platforms, software as a service (SaaS) and platform providers can allow users to upload their own scripts and run them safely via Cloudflare Workers. User scripts are not known at compile time, but are dynamically dispatched at runtime.
With dynamic dispatch generally available, we now have the ability to discover and invoke Workers at runtime without the performance penalty of HTTP traffic over the network. We use dynamic dispatch to invoke your queue’s consumer Worker whenever a message or batch of messages is ready to be processed.
Consistent stateful data with Durable Objects
Another challenge we faced was storing messages durably without sacrificing performance. We took the design goal of ensuring that all messages were persisted to disk in multiple locations before we confirmed receipt of the message to the user. Again, we turned to an existing Cloudflare product—Durable Objects—which entered general availability nearly one year ago today.
Durable Objects are named instances of JavaScript classes that are guaranteed to be unique across Cloudflare’s entire network. Durable Objects process messages in-order and on a single-thread, allowing for coordination across messages and provide a strongly consistent storage API for key-value pairs. Offloading the hard problem of storing data durably in a distributed environment to Distributed Objects allowed us to reduce the time to build Queues and prepare it for open beta.
Open beta roadmap
Our open beta process empowers you to influence feature prioritization and delivery. We’ve set ambitious goals for ourselves on the path to general availability, most notably supporting unlimited throughput while maintaining 100% durability. We also have many other great features planned, like first-in first-out (FIFO) message processing and API compatibility layers to ease migrations, but we need your feedback to build what you need most, first.
Conclusion
Cloudflare Queues is a global message queue for the Workers developer. Building with Queues makes your applications more performant, resilient, and cost-effective—but we’re not done yet. Join the Open Beta today and share your feedback to help shape the Queues roadmap as we deliver application integration services for the next generation cloud.
Earlier this year, we announced our participation in a new W3C Community Group for the advancement of Web-interoperable API standards. Since then, this new WinterCG has been hard at work identifying the common API standards around which all JavaScript runtimes can build. Today I just want to give a peek at some work the WinterCG has been doing; and show off some of the improvements we have been making in the Workers runtime to increase alignment with Web Platform standards around event handling, task cancellation using AbortController, text encoding and decoding, URL parsing and pattern matching, and streams support.
The WinterCG Minimum Common Web Platform API
Right at the start of the WinterCG activity, the group took some time to evaluate and compare the various non-browser JavaScript runtimes such as Node.js, Deno, Bun, and Workers with the purpose of identifying the Web Platform APIs they all had in common. Following a very simple criteria, we looked at the standard APIs that were already implemented and supported by at least two of these runtimes and compiled those into a list that the WinterCG calls the “Minimum Common Web Platform API“. This list will serve as the basis for what the community group defines as the minimum set of Web Platform APIs that should be implemented consistently across runtimes that claim to be “Web-interoperable”.
Today, we are happy to say that the Workers runtime has compliant or nearly compliant implementations of every one of these WinterCG Minimum Common Web Platform APIs. Some of these APIs intentionally diverge from the standards either due to backwards compatibility concerns, Workers-specific features, or performance optimizations. Other APIs diverge still because we are still in the process of updating them to align with the specifications.
Improving standards compliance in the Workers runtime
The Workers runtime has, from the beginning, had the mission to align its developer experience with JavaScript and Web Platform standards as much as possible. Over the past year we have worked hard to continue advancing that mission forward both by improving the standards-compliance of existing APIs such as Event, EventTarget, URL, and streams; and the introduction of new Web Platform APIs such as URLPattern, encoding streams, and compression streams.
Event and EventTarget
The Workers runtime has provided an implementation of the Event and EventTarget Web Platform APIs from the very beginning. These were, however, only limited implementations of what the WHATWG DOM specification defines. Specifically, Workers had only implemented the bare minimum of the Event API that it itself needed to operate.
Today, the Event and EventTarget implementations in Workers provide a more complete implementation.
Let’s look at the official definition of Event as defined by the WHATWG DOM standard:
Web Platform API specifications are always written in terms of a definition language called Web IDL. Every attribute defined in the interface is a property that is exposed on the object. Event objects, then, are supposed to have properties like type, target, srcElement, currentTarget, bubbles, cancelable, returnValue, defaultPrevented, composed, isTrusted, and timeStamp. They are also expected to have methods such as composedPath(), stopPropagation(), and stopImmediatePropagation(). Because most of these were not immediately needed by Workers, most were not provided originally.
Today, all standard, non-legacy properties and methods defined by the specification are available for use:
While we were at it, we also fixed a long standing bug in the implementation of Event that prevented user code from properly subclassing the Event object to create their own custom event types. This change is protected by a compatibility flag that is now enabled by default for all Workers using a compatibility date on or past 2022-01-31.
class MyEvent extends Event {
constructor() {
super('my-event')
}
get type() { return super.type.toUpperCase() }
}
const myEvent = new MyEvent();
// Previously, this would print "my-event" instead of "MY-EVENT" as expected.
console.log(myEvent.type);
The EventTarget implementation has also been updated to support once handlers (event handlers that are triggered at-most once then automatically unregistered), cancelable handlers (using AbortSignal), and event listener objects, all in line with the standard.
Once handlers are key for preventing memory leaks in your applications when you know that a particular event is only ever going to be emitted once, or whenever you only care about handling it once. The stored reference to the function or object that is handling the event is removed immediately upon the first invocation, allowing the memory to be garbage collected.
Using a cancelable event handler
const ac = new AbortController();
addEventListener('foo', (event) => {
console.log('not printed at all');
}, {
signal: ac.signal
});
ac.abort();
dispatchEvent(new Event('foo'));
Using an event listener object
While passing a function to addEventListener() is the most common case, the standard actually allows an event listener to be an object with a handleEvent() method as well.
As illustrated in the cancelable event example above, we have also introduced an implementation of the AbortController and AbortSignal APIs into Workers. These provide a standard, and interoperable way of signaling cancellation of several kinds of tasks.
The AbortController/AbortSignal pattern is straightforward: An AbortSignal is just a type of EventTarget that will emit a single “abort” event when it is triggered:
const ac = new AbortController();
ac.signal.addEventListener('abort', (event) => {
console.log(event.reason); // 'just because'
}, { once: true });
ac.abort('just because');
The AbortController is used to actually trigger the abort event, optionally with a reason argument that is passed on to the event. The reason is typically an Error object but can be any JavaScript value.
The AbortSignal can only be triggered once, so the “abort” event should only ever be emitted once.
It is also possible to create AbortSignals that timeout after a specified period of time:
const signal = AbortSignal.timeout(10);
Or an AbortSignal that is pre-emptively triggered immediately on creation (these will never actually emit the “abort” event):
const signal = AbortSignal.abort('for reasons');
Currently, within Workers, AbortSignal and AbortController has been integrated with the EventTarget, fetch(), and streams APIs in alignment with the relevant standard specifications for each.
Using AbortSignal to cancel a fetch()
const ac = new AbortController();
const res = fetch('https://example.org', {
signal: ac.signal
});
ac.abort(new Error('canceled'))
try {
await res;
} catch (err) {
console.log(err);
}
TextEncoderStream and TextDecoderStream
The Workers runtime has long provided basic implementations of the TextEncoder and TextDecoder APIs. Initially, these were limited to only supporting encoding and decoding of UTF-8 text. The standard definition of TextDecoder, however, defines a much broader range of text encodings that are now fully supported by the Workers implementation. Per the standard, TextEncoder currently only supports UTF-8.
In addition to supporting the full range of encodings defined by the standard, Workers also now provides implementations of the TextEncoderStream and TextDecoderStream, which provide TransformStream implementations that apply encoding and decoding to streaming data:
const ds = new DecompressionStream('gzip');
const decompressedStream = blob.stream().pipeThrough(ds);
const cs = new CompressionStream('gzip');
const compressedStream = blob.stream().pipeThrough(cs);
These are TransformStream implementations that fully conform to the standard definitions. Use of the compression streams does not require a compatibility flag to enable.
URL and URLPattern
Similar to Event, there has been an implementation of the Web Platform standard URL API available within Workers from nearly the beginning. But also like Event, the implementation was not entirely compatible with the standard.
The incompatibilities were subtle, for instance, in the original implementation, the URL string “https://a//b//c//” would be parsed incorrectly as “https://a/b/c” (note that the extra empty path segments are removed) whereas the standard parsing algorithm would produce “https://a//b//c/” as a result. Such inconsistent results were causing interoperability issues with JavaScript written to run across multiple JavaScript runtimes and needed to be fixed.
A new implementation of the URL parsing algorithm has been provided, and as of October 31, 2022 it has been enabled by default for all newly deployed Workers. Older Workers can begin using the new implementation by updating their compatibility dates to 2022-10-31 or by enabling the url_standard compatibility flag.
Along with the updated URL implementation, Workers now provides an implementation of the standard URLPattern API.
URLPattern provides a regular-expression-like syntax for matching a URL string against a pattern. For instance, consider this example taken from the MDN documentation for URLPattern:
// Matching a pathname
let pattern1 = new URLPattern('https://example.com/books/:id')
// same as
let pattern2 = new URLPattern(
'/books/:id',
'https://example.com',
);
// or
let pattern3 = new URLPattern({
protocol: 'https',
hostname: 'example.com',
pathname: '/books/:id',
});
// or
let pattern4 = new URLPattern({
pathname: '/books/:id',
baseURL: 'https://example.com',
});
ReadableStream, WritableStream, and TransformStream
Last, but absolutely not least, our most significant effort over the past year has been providing new standards compliant implementations of the ReadableStream, WritableStream, and TransformStream APIs.
The Workers runtime has always provided an implementation of these objects but they were never fully conformant to the standard. User code was not capable of creating custom ReadableStream and WritableStream instances, and TransformStreams were limited to simple identity pass-throughs of bytes. The implementations have been updated now to near complete compliance with the standard (near complete because we still have a few edge cases and features we are working on).
The new streams implementation will be enabled by default in all new Workers as of November 30, 2022, or can be enabled earlier using the streams_enable_constructors and transformstream_enable_standard_constructor compatibility flags.
Creating a custom ReadableStream
async function handleRequest(request) {
const enc = new TextEncoder();
const rs = new ReadableStream({
pull(controller) {
controller.enqueue(enc.encode('hello world'));
controller.close();
}
});
return new Response(rs);
}
The new implementation supports both “regular” and “bytes” ReadableStream types, supports BYOB readers, and includes performance optimizations for both tee() and pipeThrough().
It has always been possible in Workers to call new TransformStream() (with no arguments) to create a limited version of a TransformStream that only accepts bytes and only acts as a pass-through, passing the bytes written to the writer on to the reader without any modification.
That original implementation is now available within Workers using the IdentityTransformStream class.
const { readable, writable } = new IdentityTransformStream();
const writer = writable.getWriter();
const reader = readable.getReader();
const enc = new TextEncoder();
const dec = new TextDecoder();
writer.write(enc.encode("hello world"));
const res = await reader.read();
console.log(dec.decode(res.value)); // "hello world"
If your code is using new TransformStream() today as this kind of pass-through, the new implementation will continue to work except for one very important difference: the old, non-standard implementation of new TransformStream() supported BYOB reads on the readable side (i.e. readable.getReader({ mode: 'byob' })). The new implementation (enabled via a compatibility flag and becoming the default on November 30 ) does not support BYOB reads as required by the stream standard.
What’s next
It is clear that we have made a lot of progress in improving the standards compliance of the Workers runtime over the past year, but there is far more to do. Next we will be turning our attention to the implementation of the fetch() and WebSockets APIs, as well as actively seeking closer alignment with other runtimes through collaboration in the Web-interoperable Runtimes Community Group.
If you are interested in helping drive the implementation of Web Platform APIs forward, and advancing interoperability between JavaScript runtime environments, the Workers Runtime team at Cloudflare is hiring! Reach out, or see our open positions here.
The International Committee of the Red Cross wants some digital equivalent to the iconic red cross, to alert would-be hackers that they are accessing a medical network.
The emblem wouldn’t provide technical cybersecurity protection to hospitals, Red Cross infrastructure or other medical providers, but it would signal to hackers that a cyberattack on those protected networks during an armed conflict would violate international humanitarian law, experts say, Tilman Rodenhäuser, a legal adviser to the International Committee of the Red Cross, said at a panel discussion hosted by the organization on Thursday.
I can think of all sorts of problems with this idea and many reasons why it won’t work, but those also apply to the physical red cross on buildings, vehicles, and people’s clothing. So let’s try it.
But we’ll see. If things don’t start calming down, this may be one
of those releases that need an extra week. It wasn’t a particularly
big merge window, but I don’t particularly like how the rc’s keep
being on the bigger side.
Измина още една седмица, в която сформирането на редовно правителство изглежда все така мираж в неопределеното бъдеще, а служебният кабинет взема решения, които може да имат дългосрочни последствия за България. Изневиделица се оказа, че Десислава Иванчева и Биляна Петрова са осъдени на последна инстанция и бяха вкарани моментално в затвора, без – по собствените им думи – дори да са успели да видят съдебното решение. По-голям скандал обаче се оказа фотосесия с певицата Рут Колева за модно списание, която разбуни патриотарски страсти, че поругала паметник в Перущица, който е построен по повод стогодишнината от Априлското въстание, но повече прославя тоталитарния режим. Въпреки че този паметник е запуснат от години, издраскан със слово на омразата и служи за тоалетна, в която се ползват и наркотици.
Междувременно Русия обяви, че се изтегля от Херсон (макар да продължава да го смята за своя територия след анексията в края на септември), и съответно Украйна навлезе в него. Става въпрос не само за самия град, а и за обширна област от западната част на Днепър, завладяна от руската армия. След изтеглянето ѝ цялата окупирана територия на Украйна ще бъде от източната част на реката, а снабдяването на Крим ще се затрудни допълнително.
На Русия е посветена и статията на Александър Нуцов „Войната – продължение на вътрешната политика с други средства“. В нея той представя хронология на единовластието на диктатора Владимир Путин от влизането му в политиката до наши дни, като използва израза на руския журналист и опозиционер Михаил Зигар за „колективния Путин“, който се съобразява с мнението и интересите на кръговете около президента. Идеята за „денацификация“ не е изобретение на самия Путин за оправдаване на войната срещу Украйна, а наричането на всичко прозападно „фашизъм“ и „нацизъм“ има далеч по-дълбоки корени в историята на Русия.
За здравето на българската демокрация е важно с чий мандат ще се състави следващото редовно правителство, казва Емилия Милчева в седмичния си политически коментар. Все повече погледи се насочват към третия мандат, фаворит за който е смятана партията на бившия служебен премиер Стефан Янев „Български възход“. Генерал Янев пък демонстрира готовност да се нагърби отново с поста на министър-председател, обратнопропорционална на последователността в политическите му възгледи. Той вече цитира не Путин, а Кенеди. Същевременно скоростта и размахът, с които четвъртият служебен кабинет изчегъртва назначенията на правителството на Кирил Петков, са забележителни. А България върви към неформална президентска република.
На 6 октомври 82-годишната Ани Ерно стана лауреатка на Нобеловата награда за литература. Новата ни авторка Меглена Боденска ни представя портрет на френската писателка, която има повече от 20 романа, но на български език са преведени само два от тях. Отличаването ѝ става в контекста на движението #MeToo, което хвърля сянка и върху Шведската академия. Ерно приема наградата като отговорност да продължи борбата срещу несправедливостите, извършвани не само спрямо жените, а и спрямо „доминираните“, казано с думите на френския социолог Пиер Бурдийо.
Научните новини, които ни представя Михаил Ангелов тази седмица, са за биотехнологиите в медицината, които присъстват вече не само в научната фантастика, а и в клиничните лаборатории. За изучаването на болестта на Батен например вече се правят изследвания не само върху мишки, но и върху овце, защото измененията в техния мозък вследствие на заболяването повече приличат на тези в човешкия. Американска компания пък е започнала клинично изпитване на генна терапия за лечение на пациенти с ХИВ. Заедно с тези новини Михаил насочва нашия поглед и към звездите – последните снимки от телескопа „Джеймс Уеб“ ни дават по-ясна представа за процесите на възникване на нови космически тела, а изследването на повърхността на Марс ни разкрива нови тайни на пустинната планета.
В рубриката „На второ четене“ Севда Семер ни препоръчва романа на Колсън Уайтхед „Момчетата от Никел“. Това е книга, просмукана от дълбок мрак, която се базира на истинската история на поправително училище във Флорида, функционирало цели 111 години въпреки данните за ужасяващо насилие от страна на надзирателите върху децата, включително стотина убийства. Момчета, предимно чернокожи, са „осъдени“ от обществото да се озоват в този интернат, независимо от способностите и житейските си амбиции. Романът, в който има много болка, но и надежда, носи на автора си втора награда „Пулицър“.
Нали си знаете, че няма да ви оставя без лични препоръки? Този път те са по повод падането на тоталитарния режим, което на 10 ноември навърши Христова възраст. Нямам конкретна препоръка, по-скоро ми идват наум доста филми, които по един или друг начин критикуват периода преди 1989 г. Ако ви се гледат сериозни или трагични филми – „Вчера“, „Маргарит и Маргарита“, „Да обичаш на инат“, „Една жена на 33“, „Понеделник сутрин“… Ако предпочитате комедии – „Преброяване на дивите зайци“ и „Кит“… Това е само малка част от многото филми, които разкриват фалша и двойните стандарти на онези времена.
Измина още една седмица, в която сформирането на редовно правителство изглежда все така мираж в неопределеното бъдеще, а служебният кабинет взема решения, които може да имат дългосрочни последствия за България. Изневиделица се оказа, че Десислава Иванчева и Биляна Петрова са осъдени на последна инстанция и бяха вкарани моментално в затвора, без – по собствените им думи – дори да са успели да видят съдебното решение. По-голям скандал обаче се оказа фотосесия с певицата Рут Колева за модно списание, която разбуни патриотарски страсти, че поругала паметник в Перущица, който е построен по повод стогодишнината от Априлското въстание, но повече прославя тоталитарния режим. Въпреки че този паметник е запуснат от години, издраскан със слово на омразата и служи за тоалетна, в която се ползват и наркотици.
Междувременно Русия обяви, че се изтегля от Херсон (макар да продължава да го смята за своя територия след анексията в края на септември), и съответно Украйна навлезе в него. Става въпрос не само за самия град, а и за обширна област от западната част на Днепър, завладяна от руската армия. След изтеглянето ѝ цялата окупирана територия на Украйна ще бъде от източната част на реката, а снабдяването на Крим ще се затрудни допълнително.
На Русия е посветена и статията на Александър Нуцов „Войната – продължение на вътрешната политика с други средства“. В нея той представя хронология на единовластието на диктатора Владимир Путин от влизането му в политиката до наши дни, като използва израза на руския журналист и опозиционер Михаил Зигар за „колективния Путин“, който се съобразява с мнението и интересите на кръговете около президента. Идеята за „денацификация“ не е изобретение на самия Путин за оправдаване на войната срещу Украйна, а наричането на всичко прозападно „фашизъм“ и „нацизъм“ има далеч по-дълбоки корени в историята на Русия.
За здравето на българската демокрация е важно с чий мандат ще се състави следващото редовно правителство, казва Емилия Милчева в седмичния си политически коментар. Все повече погледи се насочват към третия мандат, фаворит за който е смятана партията на бившия служебен премиер Стефан Янев „Български възход“. Генерал Янев пък демонстрира готовност да се нагърби отново с поста на министър-председател, обратнопропорционална на последователността в политическите му възгледи. Той вече цитира не Путин, а Кенеди. Същевременно скоростта и размахът, с които четвъртият служебен кабинет изчегъртва назначенията на правителството на Кирил Петков, са забележителни. А България върви към неформална президентска република.
На 6 октомври 82-годишната Ани Ерно стана лауреатка на Нобеловата награда за литература. Новата ни авторка Меглена Боденска ни представя портрет на френската писателка, която има повече от 20 романа, но на български език са преведени само два от тях. Отличаването ѝ става в контекста на движението #MeToo, което хвърля сянка и върху Шведската академия. Ерно приема наградата като отговорност да продължи борбата срещу несправедливостите, извършвани не само спрямо жените, а и спрямо „доминираните“, казано с думите на френския социолог Пиер Бурдийо.
Научните новини, които ни представя Михаил Ангелов тази седмица, са за биотехнологиите в медицината, които присъстват вече не само в научната фантастика, а и в клиничните лаборатории. За изучаването на болестта на Батен например вече се правят изследвания не само върху мишки, но и върху овце, защото измененията в техния мозък вследствие на заболяването повече приличат на тези в човешкия. Американска компания пък е започнала клинично изпитване на генна терапия за лечение на пациенти с ХИВ. Заедно с тези новини Михаил насочва нашия поглед и към звездите – последните снимки от телескопа „Джеймс Уеб“ ни дават по-ясна представа за процесите на възникване на нови космически тела, а изследването на повърхността на Марс ни разкрива нови тайни на пустинната планета.
В рубриката „На второ четене“ Севда Семер ни препоръчва романа на Колсън Уайтхед „Момчетата от Никел“. Това е книга, просмукана от дълбок мрак, която се базира на истинската история на поправително училище във Флорида, функционирало цели 111 години въпреки данните за ужасяващо насилие от страна на надзирателите върху децата, включително стотина убийства. Момчета, предимно чернокожи, са „осъдени“ от обществото да се озоват в този интернат, независимо от способностите и житейските си амбиции. Романът, в който има много болка, но и надежда, носи на автора си втора награда „Пулицър“.
Нали си знаете, че няма да ви оставя без лични препоръки? Този път те са по повод падането на тоталитарния режим, което на 10 ноември навърши Христова възраст. Нямам конкретна препоръка, по-скоро ми идват наум доста филми, които по един или друг начин критикуват периода преди 1989 г. Ако ви се гледат сериозни или трагични филми – „Вчера“, „Маргарит и Маргарита“, „Да обичаш на инат“, „Една жена на 33“, „Понеделник сутрин“… Ако предпочитате комедии – „Преброяване на дивите зайци“ и „Кит“… Това е само малка част от многото филми, които разкриват фалша и двойните стандарти на онези времена.
За здравето на българската демокрация е важно с чий мандат ще се състави следващото редовно правителство. Належащата необходимост от такова вече проличава в комуникацията между седемте политически сили в 48-мия парламент. Изглежда, че ГЕРБ са прежалили първия мандат, следователно надежди се възлагат на втория и третия, за който политици предизвестяват, че може да бъде връчен на партия „Български възход“, създадена от президентския човек Стефан Янев.
Винаги готов
Бившият бригаден генерал Янев отговаря в стила на военен – „Винаги готов!“ и за премиер, и за правителство. Той вече не цитира Путин, а Кенеди, и дори е обект на ХЕЙТ (написано от него с главни букви), задето БВ е подкрепила изпращането на оръжие за Украйна. За няколко месеца се е трансформирал от русофил, за когото натовските войски са „чуждестранни“, в надежден евро-атлантик, комуто може да се повери управлението на България – за трети път, след като беше премиер в две поредни служебни правителства за седем месеца през 2021 г.
Управление начело с Янев едва ли ще се заеме с кадровите промени, извършени от четвъртия назначен от Радев кабинет – поне не с всички. Така и редовното правителство, ръководено от „Продължаваме промяната“, не смени шефовете на спецслужбите, поставени от третия служебен кабинет. Президентската хватка върху сектор „Сигурност“ не е вдигана.
Скоростта и размахът, с които четвъртият служебен кабинет изчегъртва назначенията на предшественика си –
правителството на ПП, са забележителни. Още в първите си дни направи това, което са вършили и останалите преди него – смени повечето областни управители и полицейски шефове по места. Но не му беше достатъчно – премина и към митниците и данъчните. Близо половината от тях, разкри „Свободна Европа“, са бивши кадри на армията, МВР, ДАНС и бившия репресивен апарат на комунистическата власт – Държавна сигурност. Към момента с нови ръководства са дирекции в министерства, агенции, комисии, държавни дружества и предприятия. „Подновен“ е мениджмънтът на АЕЦ „Козлодуй“ и „Булгаргаз“, както и на Агенция „Пътна инфраструктура“, след като обяви поръчка за поддръжка на пътища за 2,4 млрд. лв.
Кабинетът на Гълъб Донев подмени управата на Българската агенция по безопасност на храните, разкрила аферата на ГКПП „Капитан Андреево“ с частната лаборатория. Вкара двама нови членове в надзора на Българската банка за развитие, единият от които – Росен Карадимов – беше началник на кабинета на премиера на тройната коалиция Сергей Станишев, а името му се завъртя преди години в лобисткия скандал „Хохегер“. (Петер Хохегер стана известен, след като се разбра, че е лобирал за влизането на България в ЕС срещу хонорар от над 1,5 млн. евро по два договора от 2006 и 2008 г., подписани от кабинета „Станишев“.) Правителството на Донев отпуши назначения на консули и посланици, спрени от кабинета на Кирил Петков. „Капитал“ разнищи ударните смени на бордове на държавни предприятия, без конкурс, със статут на временно управляващи.
Освен до назначенията обаче, служебният кабинет се разпростря и до значими икономически и финансови решения.
Удължи до 2046 г. концесията на пристанище „Росенец“ в полза на „Лукойл Нефтохим Бургас“, договорът за която е бил сключен по време на първия мандат на Бойко Борисов като премиер. Направи го въпреки европейския регламент за ограничителни мерки за Русия заради войната в Украйна, забраняващ концесии на руснаци или руски компании, в т.ч. и на такива, които действат от името или в интерес на руснаци. С това действие обаче най-голямата частна компания в Русия получава изгодна концесия за две десетилетия напред и повишава шансовете си, ако продаде бизнеса, да спечели по-добра цена. Наред с това служебният кабинет се опита да издейства пробив в дерогацията, която ЕС даде на България, с възможността да продължи да ползва руски петрол до 2024 г. – поиска и износ на продукти, произведени с тази суровина. Европейската комисия отряза София.
Докъде
Докъде може и докъде не може да действа едно служебно правителство, назначено от президента? Правителството е с временен характер, казва Конституционният съд в известното си тълкувателно решение от 1992 г. – „предназначението му е да управлява текущите въпроси на вътрешната и външната политика на страната до провеждането на законодателни избори и съставянето на правителство от новоизбраното Народно събрание“. Управлява като редовно, но с ограничено време.
Спадат ли кадровите промени към „текущите въпроси“ е въпросът на въпросите.
Кабинетът не може да сключва международни договори, например за изтребители, тъй като те изискват одобрение от парламента. Но може да яхне метлата на уволненията и назначенията – и силният реваншизъм е отличителна черта на дейността на Донев и сие.
Първото служебно правителство на Румен Радев през 2017 г. начело с проф. Огнян Герджиков се придържаше основно към организирането на изборите. Макар че в един запис на разговор, публикуван от прокуратурата, хазартният бос Васил Божков казва как в първото му правителство на Радев „повече от половината бяха хора на Шиши“.
В ситуацията, в която е България – изправена пред почти сигурно краткотрайно съществуване на следващо редовно правителство, – президентските кадри най-вероятно ще се запазят. Така под конституционното определение за парламентарна република
ще има една неформална президентска република.
Вторият президентски кабинет, в който министри бяха настоящите лидери на ПП Кирил Петков и Асен Василев, също извърши промени в редица институции и държавни фирми – в името на премахване на модела на ГЕРБ.
Въпросът с правомощията на служебното правителство обаче не трябва да зависи от личността на Румен Радев или обвързаностите на Борисов. Ако нямаше служебно управление, кабинетът на ГЕРБ щеше да организира изборите през 2021 г. и кой знае какво щеше да се получи предвид известните през годините манипулации. Но проблемът с купуването на гласове и изборните фалшификации не следва да се обвързва с необходимостта от служебен кабинет – това е проблем за разрешаване от органите на реда и правосъдната система.
Когато изглеждаше, че Радев се бори срещу задкулисието и „мафията, вън“, смените имаха своето обществено оправдание – и одобрение. Но въпросът какво може и какво не може да извършва служебното правителство, изисква друг тип дискусии, изведени на платформата на върховенството на правото. Независимо че се назначава от единствената личност на национално ниво, избрана мажоритарно в България, то провежда кадрова политика, съгласувана единствено с (неизвестни) кръгове около държавния глава. И това няма нищо общо с демократичната легитимност.
Заглавна снимка: Стопкадър от видеоклип с обръщението на президента Румен Радев пред 48-мото НС на 19 октомври 2022 г.
За здравето на българската демокрация е важно с чий мандат ще се състави следващото редовно правителство. Належащата необходимост от такова вече проличава в комуникацията между седемте политически сили в 48-мия парламент. Изглежда, че ГЕРБ са прежалили първия мандат, следователно надежди се възлагат на втория и третия, за който политици предизвестяват, че може да бъде връчен на партия „Български възход“, създадена от президентския човек Стефан Янев.
Винаги готов
Бившият бригаден генерал Янев отговаря в стила на военен – „Винаги готов!“ и за премиер, и за правителство. Тойвече не цитира Путин, а Кенеди, и дори е обект на ХЕЙТ (написано от него с главни букви), задето БВ е подкрепила изпращането на оръжие за Украйна. За няколко месеца се е трансформирал от русофил, за когото натовските войски са „чуждестранни“, в надежден евро-атлантик, комуто може да се повери управлението на България – за трети път, след като беше премиер в две поредни служебни правителства за седем месеца през 2021 г.
Управление начело с Янев едва ли ще се заеме с кадровите промени, извършени от четвъртия назначен от Радев кабинет – поне не с всички. Така и редовното правителство, ръководено от „Продължаваме промяната“, не смени шефовете на спецслужбите, поставени от третия служебен кабинет. Президентската хватка върху сектор „Сигурност“ не е вдигана.
Скоростта и размахът, с които четвъртият служебен кабинет изчегъртва назначенията на предшественика си –
правителството на ПП, са забележителни. Още в първите си дни направи това, което са вършили и останалите преди него – смени повечето областни управители и полицейски шефове по места. Но не му беше достатъчно – премина и към митниците и данъчните. Близо половината от тях, разкри „Свободна Европа“, са бивши кадри на армията, МВР, ДАНС и бившия репресивен апарат на комунистическата власт – Държавна сигурност. Към момента с нови ръководства са дирекции в министерства, агенции, комисии, държавни дружества и предприятия. „Подновен“ е мениджмънтът на АЕЦ „Козлодуй“ и „Булгаргаз“, както и на Агенция „Пътна инфраструктура“, след като обяви поръчка за поддръжка на пътища за 2,4 млрд. лв.
Кабинетът на Гълъб Донев подмени управата на Българската агенция по безопасност на храните, разкрила аферата на ГКПП „Капитан Андреево“ с частната лаборатория. Вкара двама нови членове в надзора на Българската банка за развитие, единият от които – Росен Карадимов – беше началник на кабинета на премиера на тройната коалиция Сергей Станишев, а името му се завъртя преди години в лобисткия скандал „Хохегер“. (Петер Хохегер стана известен, след като се разбра, че е лобирал за влизането на България в ЕС срещу хонорар от над 1,5 млн. евро по два договора от 2006 и 2008 г., подписани от кабинета „Станишев“.) Правителството на Донев отпушиназначения на консули и посланици, спрени от кабинета на Кирил Петков. „Капитал“ разнищи ударните смени на бордове на държавни предприятия, без конкурс, със статут на временно управляващи.
Освен до назначенията обаче, служебният кабинет се разпростря и до значими икономически и финансови решения.
Удължи до 2046 г. концесията на пристанище „Росенец“ в полза на „Лукойл Нефтохим Бургас“, договорът за която е бил сключен по време на първия мандат на Бойко Борисов като премиер. Направи го въпреки европейския регламент за ограничителни мерки за Русия заради войната в Украйна, забраняващ концесии на руснаци или руски компании, в т.ч. и на такива, които действат от името или в интерес на руснаци. С това действие обаче най-голямата частна компания в Русия получава изгодна концесия за две десетилетия напред и повишава шансовете си, ако продаде бизнеса, да спечели по-добра цена. Наред с това служебният кабинет се опита да издейства пробив в дерогацията, която ЕС даде на България, с възможността да продължи да ползва руски петрол до 2024 г. – поиска и износ на продукти, произведени с тази суровина. Европейската комисия отряза София.
Докъде
Докъде може и докъде не може да действа едно служебно правителство, назначено от президента? Правителството е с временен характер, казва Конституционният съд в известното си тълкувателно решение от 1992 г. – „предназначението му е да управлява текущите въпроси на вътрешната и външната политика на страната до провеждането на законодателни избори и съставянето на правителство от новоизбраното Народно събрание“. Управлява като редовно, но с ограничено време.
Спадат ли кадровите промени към „текущите въпроси“ е въпросът на въпросите.
Кабинетът не може да сключва международни договори, например за изтребители, тъй като те изискват одобрение от парламента. Но може да яхне метлата на уволненията и назначенията – и силният реваншизъм е отличителна черта на дейността на Донев и сие.
Първото служебно правителство на Румен Радев през 2017 г. начело с проф. Огнян Герджиков се придържаше основно към организирането на изборите. Макар че в един запис на разговор, публикуван от прокуратурата, хазартният бос Васил Божков казва как в първото му правителство на Радев „повече от половината бяха хора на Шиши“.
В ситуацията, в която е България – изправена пред почти сигурно краткотрайно съществуване на следващо редовно правителство, – президентските кадри най-вероятно ще се запазят. Така под конституционното определение за парламентарна република
ще има една неформална президентска република.
Вторият президентски кабинет, в който министри бяха настоящите лидери на ПП Кирил Петков и Асен Василев, също извърши промени в редица институции и държавни фирми – в името на премахване на модела на ГЕРБ.
Въпросът с правомощията на служебното правителство обаче не трябва да зависи от личността на Румен Радев или обвързаностите на Борисов. Ако нямаше служебно управление, кабинетът на ГЕРБ щеше да организира изборите през 2021 г. и кой знае какво щеше да се получи предвид известните през годините манипулации. Но проблемът с купуването на гласове и изборните фалшификации не следва да се обвързва с необходимостта от служебен кабинет – това е проблем за разрешаване от органите на реда и правосъдната система.
Когато изглеждаше, че Радев се бори срещу задкулисието и „мафията, вън“, смените имаха своето обществено оправдание – и одобрение. Но въпросът какво може и какво не може да извършва служебното правителство, изисква друг тип дискусии, изведени на платформата на върховенството на правото. Независимо че се назначава от единствената личност на национално ниво, избрана мажоритарно в България, то провежда кадрова политика, съгласувана единствено с (неизвестни) кръгове около държавния глава. И това няма нищо общо с демократичната легитимност.
The collective thoughts of the interwebz
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.