183 Matching Annotations
  1. Apr 2024
  2. Dec 2023
  3. Oct 2023
    1. While the interface among services is HTTP, the networking is not. In fact, there is no networking! Unlike the typical “microservice architecture,” where services communicate over a network and can suffer from latency or interruption, service bindings are a zero-cost abstraction. When you deploy a service, we build a dependency graph of its service bindings, then package all of those services into a single deployment. When one service invokes another, there is no network delay; the request is executed immediately.This zero-cost model enables teams to share and reuse code within their organizations, without sacrificing latency or performance.
  4. Sep 2023
  5. Aug 2023
    1. ```toml type = "webpack" webpack_config = "webpack.config.js"

      these will be used in production

      vars = { WORKER_ENV = "production", SENTRY_ENABLED = true }

      [env.local]

      these will be used only when --env=local

      vars = { WORKER_ENV = "local", SENTRY_ENABLED = false } ```

      wrangler dev --env=local

    1. ```js // Auth Worker

      export default { async fetch(request, env) { // Read x-custom-token header and make sure it matches SECRET_TOKEN if (request.headers.get('x-custom-token') === env.SECRET_TOKEN) { return new Response('Request allowed', { status: 200 }); } else { return new Response('x-custom-token does not match, request not allowed', { status: 403 }); } }, }; ```

      ```js // Gateway Worker

      export default { async fetch(request, env) { // Fetch AUTH service and pass request const authResponse = await env.auth.fetch(request.clone());

      // Return response from the AUTH service if the response status is not 200
      // It would return 403 'x-custom-token does not match, request not allowed' response in such case
      if (authResponse.status !== 200) {
        return authResponse;
      }
      
      // Request allowed
      // You can write application logic here
      // In this case we delegate the logic to an `application` Worker
      return await env.application.fetch(request)
      

      }, }; ```

  6. Jul 2023
    1. The Hibernation API allows a Durable Object that is not currently running an event handler, such as handling a WebSocket message, HTTP request, or alarm, to be removed from memory while keeping its WebSockets connected (“hibernation”).
  7. Jun 2023
  8. May 2023
    1. Hey! Thanks for raising this. As pointed out earlier in the thread, the workerd npm distribution is currently incompatible with Debian 11 "Bullseye", so won't work with any distro based off that (e.g. Ubuntu 20.04). Debian 12 "Bookworm" based distros (e.g. Ubuntu 22.04) should work, provided you apt install libc++1. We're working on getting a statically linked version of workerd published that should work on older Linux versions. No timeline on when this will be available though.
    1. Figured it out. Cache-Control header is required.

      js const headers = { 'Cache-Control': 'public, max-age=604800' }; const request = new Request('https://foobar.com/') const cacheResponse = new Response('bar',{ headers }) const cache = caches.default await cache.put(request, cacheResponse) const response = await cache.match(request);

    1. 🥳

      ```js import { connect } from 'cloudflare:sockets';

      export default { async fetch(req: Request) { const gopherAddr = "gopher.floodgap.com:70"; const url = new URL(req.url);

      try {
        const socket = connect(gopherAddr);
      
        const writer = socket.writable.getWriter()
        const encoder = new TextEncoder();
        const encoded = encoder.encode(url.pathname + "\r\n");
        await writer.write(encoded);
      
        return new Response(socket.readable, { headers: { "Content-Type": "text/plain" } });
      } catch (error) {
        return new Response("Socket connection failed: " + error, { status: 500 });
      }
      

      } }; ts connect(address: SocketAddress | string, options?: SocketOptions): Socket

      declare interface Socket { get readable(): ReadableStream; get writable(): WritableStream; get closed(): Promise<void>; close(): Promise<void>; startTls(): Socket; }

      declare interface SocketOptions { secureTransport?: string; allowHalfOpen: boolean; }

      declare interface SocketAddress { hostname: string; port: number; } ```

  9. Apr 2023
    1. From this striving, otherwise than in the case of the intellectuals, there results also another statement of the problem, and new perspectives are opened. In this way conceptions are formed regarding the regulation of the mutual relations of human beings in social production, conceptions which to the intellectual elements appear incomprehensible and which they declare to be utopian and unrealizable. But these conceptions have already unfolded a powerful force in the revolutionary uprisings of the wage-workers, of the modern proletarians. This force was shown first on a major scale in the Paris Commune, which sought to overcome the centralized authority of the State through the self-administration of the communes. It was the cause also of Marx’s giving up his idea (expressed in the Communist Manifesto) that state economy would lead to the disappearance of class society. In the workers’ and soldiers’ councils of the Russian and German revolutions of 1917-23, it arose once more to a mighty and at times all-mastering power. And in future no proletarian-revolutionary movement is conceivable in which it will not play a more and more prominent and finally all-mastering role. It is the self-activity of the broad working masses which manifests itself in the workers’ councils. Here is nothing utopian any longer; it is actual reality. In the workers’ councils the proletariat has shaped the organizational form in which it conducts its struggle for liberation.
    1. Nonetheless, there remains still an unbalanced contradiction between on one hand Marx's characterization of the Paris Commune as the finally discovered "political form" for accomplishing the economic and social self-liberation of the working class and, on the other hand, his emphasis at the same time that the suitability of the commune for this purpose rests mainly on its formlessness; that is, on its indeterminateness and openness to multiple interpretations. It appears there is only one point at which Marx's position is perfectly clear and to which he professed at this time under the influence of certain political theories he had in the meantime come up against and which were incorporated in this original political concept-and not least under the practical impression of the enormous experience of the Paris Commune itself. While in the Communist Manifesto of 1847-48 and likewise in the Inaugural Address to the International Workers' Association in 1864, he still had only spoken of the necessity “for the proletariat to conquer political power” now the experiences of the Paris Commune provided him with the proof that "the working class can not simply appropriate the ready-made state machinery and put it into motion for its own purposes, but it must smash the existing bourgeois state machinery in a revolutionary way." This sentence has since been regarded as an essential main proposition and core of the whole political theory of Marxism, especially since in 1917 Lenin at once theoretically restored the unadulterated Marxian theory of the state in his work "State and Revolution" and practically realized it through carrying through the October Revolution as its executor. But obviously nothing positive is at all yet said about the formal character of the new revolutionary supreme state power of the proletariat with the merely negative determination that the state power cannot simply "appropriate the state machinery" of the previous bourgeois state "for the working class and set it in motion for their own purposes." So we must ask: for which reasons does the "Commune" in its particular, determinate form represent the finally discovered political form of government for the working class, as Marx puts it in his Civil War, and as Engels characterizes it once more at great length in his introduction to the third edition of the Civil War twenty years later? Whatever gave Marx and Engels, those fiery admirers of the centralized system of revolutionary bourgeois dictatorship realized by the great French Revolution, the idea to regard precisely the "Commune" as the "political form" of the revolutionary dictatorship of the proletariat, when it appeared to be the complete opposite to that system?
  10. Mar 2023
    1. HTML templating and streaming response library for Worker Runtimes such as Cloudflare Workers.

      js function handleRequest(event: FetchEvent) { return new HTMLResponse(pageLayout('Hello World!', html` <h1>Hello World!</h1> ${async () => { const timeStamp = new Date( await fetch('https://time.api/now').then(r => r.text()) ); return html`<p>The current time is ${timeEl(timeStamp)}.</p>` }} `)); }

  11. Feb 2023
    1. ```js import type { EntryContext } from "@remix-run/cloudflare"; import { RemixServer } from "@remix-run/react"; import isbot from "isbot"; import { renderToReadableStream } from "react-dom/server";

      const ABORT_DELAY = 5000;

      const handleRequest = async ( request: Request, responseStatusCode: number, responseHeaders: Headers, remixContext: EntryContext ) => { let didError = false;

      const stream = await renderToReadableStream( <RemixServer context={remixContext} url={request.url} abortDelay={ABORT_DELAY} />, { onError: (error: unknown) => { didError = true; console.error(error);

          // You can also log crash/error report
        },
        signal: AbortSignal.timeout(ABORT_DELAY),
      }
      

      );

      if (isbot(request.headers.get("user-agent"))) { await stream.allReady; }

      responseHeaders.set("Content-Type", "text/html"); return new Response(stream, { headers: responseHeaders, status: didError ? 500 : responseStatusCode, }); };

      export default handleRequest; ```

  12. Jan 2023
  13. Dec 2022
  14. Nov 2022
    1. He has a warehouse of notecards with ideas and stories and quotes and facts and bits of research, which get pulled and pieced together then proofread and revised and trimmed and inspected and packaged and then shipped.

      While the ancients thought of the commonplace as a storehouse of value or a treasury, modern knowledge workers and content creators might analogize it to a factory where one stores up ideas in a warehouse space where they can be easily accessed, put into a production line where those ideas can be assembled, revised, proofread, and then package and distributed to consumers (readers).

      (summary)

  15. Oct 2022
    1. The reason theytreasure their smallest experiences is because, in thecourse of a lifetime, a modem man has so very littlepersonal experience, and yet experience is so important asa source of good intellectual work.

      The antecedent for "they" here is "accomplished thinkers".

    2. whether he knows it or not, the intellec-tual workman forms his own self as he works towards theperfection of his craft.

      Here Mills seems to be defining (in 1952) an "intellectual workman" as an academic, but he doesn't go as broad as a more modern "knowledge worker" (2022) which includes those who broadly do thinking in industry as well as in academia. His older phrase also has a more gendered flavor to it that knowledge worker doesn't have now.

  16. Sep 2022
  17. Aug 2022
  18. Jul 2022
    1. Many of the workers reported that first thing in themorning, or after any interruption in their thought(like a ‘phone call), they have the “where was 1?”problem in a complex and ill-defined space of ideas.The layout of physical materials on their desk givesthem powerful and immediate contextual cues torecover a complex set of threads without difilcultyand delay, “this is my whole context, these are mypersonal piles”

      Following interruptions by colleagues or phone calls at work, people may frequently ask themselves "where was I?" more frequently than "what was I doing?" This colloquialism isn't surprising as our memories for visual items and location are much stronger than actions. Knowledge workers will look around at their environments for contextual clues for what they were doing and find them in piles of paper on their desks, tabs in their computer browser, or even documents (physical or virtual) on their desktops.

    2. Mander, R., Salomon, G. and Wong, Y. A PileMetaphor for Supporting Casual Organisationof Information. Proceedings of Human Factorsin Computing Systems CHI’92, pp 627-634,1992.

      The quote from this paper references Mander 1992:

      It seems that knowledge workers use physical space, such as desks or floors, as a temporary holding pattern for inputs and ideas which they cannot yet categorise or even decide how they might use [12].

      leads me to believe that the original paper has information which supports office workers using their physical environments as thinking and memory spaces much as indigenous peoples have for their knowledge management systems using orality and memory.

    3. Many knowledge workers have extremely cluttereddesks and floors and yet are seriously disrupted bychanges made to this apparent “muddle” or byneeding to move offices regularly. This supportsearlier studies of otllce work [10, 11]. It seems thatthis apparent “muddle” plays a number of importantroles for them in their work:-

      For scholars of orality, the value of the messiness in many knowledge workers' work spaces is probably not surprising. It's likely that these workers are using their local environment as oral cultures have since time immemorial. They're creating physical songlines or memory palaces in their local environment to which they're spatially attaching memories of the work they're doing, performing, or need to perform. This allows them to offload some of their memory work, storage, and retention to items in their physical space.

    4. Unfortunately, many corporate software programsaim to level or standardise the differences betweenindividual workers. In supporting knowledgeworkers, we should be careful to provide tools whichenable diversification of individuals’ outputs.Word-processors satisfi this criterion; tools whichembed a model of a knowledge worker’s task in thesoftware do not.

      Tools which allow for flexibility and creativity are better for knowledge workers than those which attempt to crystalize their tasks into ruts. This may tend to force the outputs in a programmatic way and thereby dramatically decrease the potential for innovative outputs. If the tools force the automation of thought without a concurrent increase in creativity then one may as well rely on manual labor for their thinking.


      This may be one of the major flaws of tools for thought in the educational technology space. They often attempt to facilitate the delivery of education in an automated way which dramatically decreases the creativity of the students and the value of the overall outputs. While attempting to automate education may suit the needs of institutions which are delivering the education, particularly with respect to the overall cost of delivery, the automation itself is dramatically at odds with the desire to expand upon ideas and continue innovation for all participants involved. Students also require diverse modes of input (seen/heard) as well as internal processing followed by subsequent outputs (written/drawn/sculpted/painted, spoken/sung, movement/dance). Many teachers don't excel at providing all of these neurodiverse modes and most educational technology tools are even less flexible, thus requiring an even larger panoply of them (often not interoperable because of corporate siloing for competitive reasons) to provide reasonable replacements. Given their ultimate costs, providing a variety of these tools may only serve to increase the overall costs of delivering education or risk diminishing the overall quality. Educators and institutions not watching out for these traps will tend to serve only a small portion of their intended audiences, and even those may be served poorly as they only receive a limited variety of modalities of inputs and outputs. As an example Western cultures' overreliance on primary literacy modes is their Achilles' heel.


      Tools for thought should actively attempt to increase the potential solution spaces available to their users, while later still allowing for focusing of attention. How can we better allow for the divergence of ideas and later convergence? Better, how might we allow for regular and repeated cycles of divergence and convergence? Advanced zettelkasten note taking techniques (which also allow for drawing, visual, auditory and other modalities beyond just basic literacy) seem to allow for this sort of practice over long periods of time, particularly when coupled with outputs which are then published for public consumption and divergence/convergence cycles by others.

      This may also point out some of the stagnation allowed by social media whose primary modes is neither convergence nor divergence. While they allow for the transmission/communication portion, they primarily don't actively encourage their users to closely evaluate the transmitted ideas, internalize them, or ultimately expand upon them. Their primary mode is for maximizing on time of attention (including base emotions including excitement and fear) and the lowest levels of interaction and engagement (likes, retweets, short gut reaction commentary).

    5. the definingcharacteristic of knowledge workers is that they arethemselves changed by the information theyprocess.’ So, the workers interviewed saw theirvalue to an organisation being to understand a bodyof knowledge and generate new information fromthis understanding which changed either theorganisation or its customer in a direct way.

      a more refined and nuanced definition of knowledge workers than Peter Drucker's 1973 definition.

    6. I thereforeidentified twelve knowledge workers in a range ofU. S, and European companies, Their job functionsincluded: design, advertising, marketing,management consultancy, broadcasting, law, financeand research.

      Areas of knowledge work (as determined in 1994 at least) included design, advertising, marketing, management consultancy, broadcasting, law, finance, and research.

    7. In the rest of this section, wherever I say “knowledge worker”, I strictly mean only the small set I sampled.

      CAUTION!

      Built in assumptions which may not extrapolate.


      This caveat is also a strong indication of the state-of-the-art of the level of knowledge worker research in 1994.

    8. Peter Drucker, the distinguished commentator onorganisation and management, has popularised theterm “knowledge worker” to describe the role of agrowing percentage of employees in businessorganisations: “The manual worker is yesterday..,..The basic capital resource, the fundamentalinvestment, but also the cost centre for a developedeconomy is the knowledge worker who puts to work

      what he has learned in systematic education, that is, concepts, ideas and theories, rather than the man who puts to work manual skill or muscle, ” [5]. 5. Drucker, P. F. Management: Tasks, Responsibilities and Practices, Harper & Row; New York, 1973.

      Influential management consultant, educator, and author Peter Drucker helped to popularize the concept of the "knowledge worker" by way of his book Management: Tasks, Responsibilities and Practices (Harper & Row, 1973).


      Who/where is the origin of the neologism/idea of "knowledge worker"?

  19. Jun 2022
    1. Weber left home and lived in poverty while working as a street-corner evangelist and social activist for two years with the evangelical Church Army Workers, an organization similar to the Salvation Army, preaching and singing hymns on street corners and singing and playing the organ in rescue missions in red-light districts in Pittsburgh and New York,[13][33] until the Church Army Workers disbanded in 1900.

      This is interesting background given her subsequent blockbuster film Where are My Children? (Universal Studios, 1916) which covered abortion and birth control.

      https://en.wikipedia.org/wiki/Lois_Weber

    1. The Essential Habits ofDigital Organizers

      This chapter is too entailed with productivity advice, which can be useful to some, but isn't as note taking focused for those who probably need more of that.

      What is the differentiator between knowledge workers, knowledge creators, students, researchers, academics. How do we even clearly delineate knowledge worker as a concept. It feels far too nebulous which makes it more difficult to differentiate systems for them to use for improving productivity and efficiency.

  20. May 2022
  21. Apr 2022
    1. Eric Topol. (2021, April 23). Just published @TheLancet: Effect of vaccine in >23,000 health care workers https://t.co/ohy3VyHM3C Dose response: No vaccine 977 infections; 1 dose 71 infections; 2 doses 9 infections (14|8|4 per 10,000 person-days) "can prevent both symptomatic and asymptomatic infection " https://t.co/EybVBFmXrU [Tweet]. @EricTopol. https://twitter.com/EricTopol/status/1385729322472730626

    1. Kamlesh Khunti. (2021, February 14). Our pre-print publication on #COVIDVaccine hesitancy in health care workers. Vaccination rates: White 70% South Asian 59% Black 37% ⬆️ rates in Allied HCPs & administrative/exe staff vs Drs Urgently need to identify barriers & overcome these https://t.co/hBYJFCBzyi https://t.co/OLeNZrswcN [Tweet]. @kamleshkhunti. https://twitter.com/kamleshkhunti/status/1360926907978682372

    1. Cache using fetch

      Determine how to cache a resource by setting TTLs, custom cache keys, and cache headers in a fetch request.

      ```js async function handleRequest(request) { const url = new URL(request.url);

      // Only use the path for the cache key, removing query strings // and always store using HTTPS, for example, https://www.example.com/file-uri-here const someCustomKey = https://${url.hostname}${url.pathname};

      let response = await fetch(request, { cf: { // Always cache this fetch regardless of content type // for a max of 5 seconds before revalidating the resource cacheTtl: 5, cacheEverything: true, //Enterprise only feature, see Cache API for other plans cacheKey: someCustomKey, }, }); // Reconstruct the Response object to make its headers mutable. response = new Response(response.body, response);

      // Set cache control headers to cache on browser for 25 minutes response.headers.set('Cache-Control', 'max-age=1500'); return response; }

      addEventListener('fetch', event => { return event.respondWith(handleRequest(event.request)); }); ```


      Caching HTML resources

      Setting the cache level to Cache Everything will override the default cacheability of the asset. For time-to-live (TTL), Cloudflare will still rely on headers set by the origin.

      js // Force Cloudflare to cache an asset fetch(event.request, { cf: { cacheEverything: true } });

  22. Mar 2022
  23. Feb 2022
  24. Jan 2022
  25. Oct 2021
    1. Its cooperatives employ more than 70,000 people in Spain, making it one of the nation’s largest sources of paychecks. They have annual revenues of more than 12 billion euros ($14.5 billion).
    2. Mondragón
  26. Sep 2021
    1. Three days before Labor Day, on Friday, September 2, 1921, the U.S. Army intervened on the side of coal companies against striking coal miners, marking the end of the Battle of Blair Mountain in southern West Virginia. The battle was the climax of two decades of low-intensity warfare across the coalfields of Appalachia, as the West Virginia miners sought to unionize and mining companies used violent tactics to undermine their efforts. The struggle turned deadly.
  27. Aug 2021
  28. Jul 2021
    1. So these two classes, rising professionals and sinking workers, which a couple of generations ago were close in income and not so far apart in mores, no longer believe they belong to the same country. But they can’t escape each other, and their coexistence breeds condescension, resentment, and shame.

      This rings true to me. How can we reverse this tide?

    1. If we believe everyday work to be mindless, then that will affect the work we create in the future.
    2. Joe learned the most efficient way to use his body by acquiring a set of routines that were quick and preserved energy. Otherwise he would never have survived on the line.

      Sometime in the past six months I ran across a description of how migrant workers do this sort of activity in farming contexts. That article also pointed out the fact that the average person couldn't do this sort of work and that there was extreme value in it.

  29. Jun 2021
  30. May 2021
    1. Service workers act as proxy servers that handle network requests inside your app. This makes it possible to make your app work offline, but even if you don't need offline support (or can't realistically implement it because of the type of app you're building), it's often worth using service workers to speed up navigation by precaching your built JS and CSS.
    1. Hall, V. J., Foulkes, S., Saei, A., Andrews, N., Oguti, B., Charlett, A., Wellington, E., Stowe, J., Gillson, N., Atti, A., Islam, J., Karagiannis, I., Munro, K., Khawam, J., Chand, M. A., Brown, C. S., Ramsay, M., Lopez-Bernal, J., Hopkins, S., … Heeney, J. L. (2021). COVID-19 vaccine coverage in health-care workers in England and effectiveness of BNT162b2 mRNA vaccine against infection (SIREN): A prospective, multicentre, cohort study. The Lancet, 0(0). https://doi.org/10.1016/S0140-6736(21)00790-X

  31. Apr 2021
    1. indifference to human drivers

      Our week 8 module on Web 2.0 and the gig economy discussed this in more depth, and Barron alludes to this dynamic elsewhere in the article when describing both the typical user of an app like seamless and the typical profile of the gig economy worker who actually delivers their food - I appreciate the critiques of app design and user infantilization he is making here, but the article could have also discussed in more depth how these design choices help these companies to obfuscate and divert attention from the way they impact people besides the consumer. There is a whole class people whose primary interaction with these apps is on the back end- as struggling small business owners dependent on positive yelp reviews, delivery people, and rideshare drivers - maybe that is outside the purview of this article, but it would have been nice to see this angle explored a bit more.

  32. Mar 2021
    1. However, if these timeouts are moved into a web worker, they should run to time and not get de-prioritised by the browser.
  33. Feb 2021
    1. A miracle is a universal blessing from God through me to all my brothers. It is the privilege of the forgiven to forgive.

      The Prince of Peace, also known as Jesus or Jeshua or simply J calls YOU! To join his Holy Crusade in undoing your ego!

      I need devoted teachers who share my aim of healing the mind. T-4.1.13

      Once you have developed a thought system of any kind, you live by it and teach it. Your capacity for allegiance to a thought system may be misplaced, but it is still a form of faith and can be redirected. T-6.in.2

      You have been called, together with your brother, to the most holy function this world contains. T-18.1.13

  34. Jan 2021
    1. v1 tabs tightly couple to their v1 Cache; v2 tabs tightly couple to their v2 Cache. This tight coupling makes them “application caches.” The app must be completely shut down (all tabs closed) in order to upgrade atomically to the newest cache of code.
    1. If a Service Worker fails, it’s possible to break an entire website in ways that we can’t fix on the server side (or at least, not right away). Imagine this: your site appears to be down, but refreshing the page won’t help, because the browser isn’t even talking to your server; it’s just talking to your broken Service Worker.
    2. As programmers, we sometimes have to work on tricky stuff, but then we say, “Well, it’s not rocket science.” But Service Workers are rocket science.
  35. Dec 2020
  36. Nov 2020
    1. Service Workers are very powerful. They allow offline functionality, push notifications, content caching, and more. They have a short lifetime, and the way they work is by waking up when they get an event (e.g., network requests, push notifications, connectivity changes) and then they start running only as long as the process needs it.
    2. Service Workers are also helpful for offline caching and performance. You can write code to cache your application shell to work offline and populate its content using JavaScript.
  37. Oct 2020
  38. Sep 2020
  39. Aug 2020
    1. Von Gaudecker. H. M., Holler. R., Janys. L., Siflinger. B., Zimpelmann. C. (2020). Labour Supply in the Early Stages of the COVID-19 Pandemic: Empirical Evidence on Hours, Home Office, and Expectations. Institute of labor economics. Retrieved from: https://covid-19.iza.org/publications/dp13158/

  40. Jun 2020
  41. May 2020
  42. Feb 2020
  43. Jul 2019
    1. Amazon announced that it will hire nearly 12,000 new employees across Europe in 2019, taking its permanent workforce in Europe to nearly 95,000 by the end of 2019. Amazon pledged to upskill 100,000 of its employees across the U.S. by 2025, dedicating over $700 million to provide employees across its corporate offices, tech hubs, fulfillment centers, retail stores, and transportation network with access to training programs that will help them move into more highly-skilled roles within or outside of the company. Programs include Machine Learning University, Amazon Technical Academy, and Career Choice.

      More workers that can practically be enslaved in 55-hour-work weeks and sleep standing up: yeay!

  44. Oct 2018
  45. Sep 2018
  46. Jul 2017
    1. In distributed mode, you start many worker processes using the same group.id and they automatically coordinate to schedule execution of connectors and tasks across all available workers. I

      Distributed workers.

      group.id = "SHOUDL BE THE SAME FOR ALL WORKERS"