{"id":17963,"library":"studio","title":"Studio.js: Microservices Framework","description":"Studio.js is a lightweight, *abandoned* Node.js microservices framework (version 0.13.5, last updated March 2017) designed to facilitate reactive application development. Inspired by the actor model and reactive manifesto principles, it aimed to simplify asynchronous programming using Bluebird A+ promises and generators (before native `async/await` became widespread in Node.js). Key features included zero-configuration clusterization, real-time metrics, and a \"let-it-crash\" approach to error handling, all while abstracting away complex concepts into simple function-based services. The framework focused on creating decoupled, fault-tolerant, and scalable systems using a concise API. However, due to its lack of maintenance, it is not recommended for new projects and poses compatibility and security risks with modern Node.js environments, relying on outdated paradigms for concurrency and module loading. Its release cadence was sporadic, culminating in its abandonment prior to a 1.0 release.","status":"abandoned","version":"0.13.5","language":"javascript","source_language":"en","source_url":"https://github.com/ericholiveira/studio","tags":["javascript","functional","programming","async","generators","micro-services","micro-service","micro","service"],"install":[{"cmd":"npm install studio","lang":"bash","label":"npm"},{"cmd":"yarn add studio","lang":"bash","label":"yarn"},{"cmd":"pnpm add studio","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for its A+ Promises implementation, central to Studio.js's asynchronous control flow.","package":"bluebird"}],"imports":[{"note":"This package is CommonJS-only. Direct ES module `import` statements will fail without a CJS wrapper or bundler and are not recommended due to abandonment.","wrong":"import studio from 'studio';","symbol":"studio","correct":"const studio = require('studio');"},{"note":"`service` is a method of the main `studio` object, not a top-level named export. It's used to define microservices.","wrong":"import { service } from 'studio';","symbol":"studio.service","correct":"const studio = require('studio');\nstudio.service('myService', (args) => { /* ... */ });"},{"note":"`call` is a method of the `studio` object, used to invoke a defined microservice and receive a Promise.","wrong":"import { call } from 'studio';","symbol":"studio.call","correct":"const studio = require('studio');\nstudio.call('myService', arg1, arg2).then(result => { /* ... */ });"}],"quickstart":{"code":"const studio = require('studio');\n\n// Define a simple service named 'sum'\nstudio.service('sum', function(a, b) {\n  console.log(`Service 'sum' received: ${a}, ${b}`);\n  return Promise.resolve(a + b); // Studio uses Promises (often Bluebird)\n});\n\n// Define another service named 'greet' using an async function syntax\n// Note: This relies on Node.js support for async/await, or transpilation,\n// as Studio's core pre-dates native async/await prevalence.\nstudio.service('greet', async function(name) {\n    return `Hello, ${name}! Welcome to Studio.js.`;\n});\n\n// Call the 'sum' service\nstudio.call('sum', 5, 3)\n  .then(result => {\n    console.log('Result of sum:', result); // Expected: 8\n  })\n  .catch(err => {\n    console.error('Error calling sum:', err);\n  });\n\n// Call the 'greet' service\nstudio.call('greet', 'Developer')\n  .then(message => {\n    console.log('Result of greet:', message); // Expected: Hello, Developer! Welcome to Studio.js.\n  })\n  .catch(err => {\n    console.error('Error calling greet:', err);\n  });\n\n// Example of publishing a message (fire-and-forget pattern)\nstudio.service('logMessage', function(message) {\n  console.log('[LOG SERVICE]:', message);\n});\n\nstudio.publish('logMessage', 'This is a broadcast message from the quickstart!');\n\nconsole.log('\\nStudio.js services initialized and called.\\n(Check console for service outputs)');","lang":"javascript","description":"Demonstrates defining and invoking Studio.js services using `studio.service`, `studio.call`, and `studio.publish` for basic message processing."},"warnings":[{"fix":"Do not use for new projects. Migrate existing projects to actively maintained microservices frameworks. Continuing to use this library poses significant risks.","message":"This package is *abandoned* and has not received updates since March 2017 (version 0.13.5). It is not compatible with modern Node.js development practices, ESM modules, or recent language features, and may contain unpatched vulnerabilities.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Use `const studio = require('studio');` in CommonJS modules. For ES modules, a CJS-wrapper is technically possible but not recommended for an abandoned library.","message":"Studio.js is a CommonJS-only package. Attempting to `import` it directly in an ES module environment will result in a `SyntaxError` or `ReferenceError: require is not defined`.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Understand that services might need to explicitly return Bluebird promises or be structured to fit the generator-based flow. Direct use of native `async/await` might require careful testing for compatibility.","message":"The framework relies on Bluebird promises and JavaScript generators for asynchronous control flow, predating widespread native `async/await` support in Node.js. While `async`/`await` might work with transpilation, the core `studio` internal mechanisms are built around older promise patterns, which might lead to unexpected behavior or less efficient execution compared to modern async patterns.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Avoid relying on Studio.js's built-in clustering for production environments. Use external, modern solutions for service discovery, load balancing, and inter-service communication.","message":"The \"zero-configuration clusterization\" and RPC features implemented in Studio.js are built on older Node.js networking primitives and may not be compatible or secure with recent Node.js versions or cloud-native deployment patterns (e.g., Kubernetes, serverless).","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Immediately discontinue use in any security-critical environment. Audit existing deployments for vulnerabilities and plan migration to a maintained alternative.","message":"Due to its abandoned status, Studio.js has not received security patches or updates for nearly a decade. Using it in production introduces significant security risks, including potential supply chain vulnerabilities from outdated dependencies or unpatched exploits in its own codebase.","severity":"breaking","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-23T00:00:00.000Z","next_check":"2026-07-22T00:00:00.000Z","problems":[{"fix":"Ensure your Node.js environment is configured for CommonJS modules, or rename your file to `.cjs`. Do not attempt to use direct `import` statements for this library.","cause":"Attempting to use `require()` in an ES module file (e.g., a `.mjs` file or a file where `type: module` is set in `package.json`).","error":"ReferenceError: require is not defined"},{"fix":"Ensure `const studio = require('studio');` is at the top of your CommonJS module and that the `studio` package is correctly installed (`npm install studio`).","cause":"The `studio` object was not correctly imported or initialized, often meaning `studio` is `undefined` or `null`.","error":"TypeError: studio.service is not a function"},{"fix":"Ensure all service functions return a `Promise.resolve()` or `Promise.reject()`, or are `async` functions that implicitly return a Promise, and handle all internal asynchronous operations appropriately to ensure the returned Promise eventually settles.","cause":"A service function defined with `studio.service` did not explicitly return a Promise, or the returned Promise was never resolved/rejected.","error":"Service call hangs indefinitely or does not resolve."},{"fix":"These warnings are inherent to using an abandoned framework with modern Node.js. There is no direct fix within Studio.js itself. This serves as a strong indicator to migrate away from Studio.js.","cause":"Studio.js uses older Node.js APIs or internal modules that have since been deprecated or removed in newer Node.js versions.","error":"(node:xyz) DeprecationWarning: current URL stream is deprecated."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}