Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms https://framework.embarklabs.io/
Go to file
emizzle 173d53de2f fix(@embark/proxy): Fix contract event subscriptions
Fix the proxy’s handling of WebSocket connections when subscribing to contract events and node data using the `eth_subscribe` RPC request.

Previously, the client connection that the subscription data was sent to was often in a closed state. It was determined that this connection was the wrong connection to forward the data in the first place. The connection was in fact generally the connection created for the Ethereum service check which was then (correctly and subsequently) closed after it had finished its operation.

The flow of a proxy request handling a WebSocket “eth_subscribe” RPC request is now as follows:
1. A WebSocket RPC request `”eth_subscribe”` is sent from a client to the proxy.
2. Proxy forwards the request to the node by way of a new instance of `RequestManager`.
3. When the node receives an event matching the subscription, it sends the event data back to same socket connection it received the request on (ie the specific instance of `RequestManager`).
4. The `RequestManager` fires the `”data”` event containing the subscription data, and this event is picked up in the proxy.
5. The proxy then forwards the subscription data on to the originating WS client connection.

All other requests (ie non-WS or WS RPC requests that are not `eth_subscribe`) will be serviced to/from the node using a single `RequestManager` instance.

Co-authored-by: Pascal Precht <pascal.precht@gmail.com>
2019-10-28 13:00:18 -05:00
.github chore: introduce issue and pull request templates 2018-11-07 17:31:17 +01:00
dapps build: update babel and webpack dependencies (#1987) 2019-10-24 17:41:28 -04:00
packages fix(@embark/proxy): Fix contract event subscriptions 2019-10-28 13:00:18 -05:00
scripts build: phase 1 of introducing embark-collective 2019-10-01 13:28:13 -05:00
site site: update {hexo:{version}} in package.json to reflect the currently installed version 2019-10-25 11:53:59 -05:00
.editorconfig Add editor config 2018-10-22 19:25:16 +02:00
.eslintrc.json refactor(@embark/i18n): expose __ from embark-i18n, drop global __ 2019-05-08 11:01:16 +02:00
.gitattributes build: `* text=auto` -> `* text=auto eol=lf` 2019-09-15 15:17:45 -05:00
.gitignore build: `* text=auto` -> `* text=auto eol=lf` 2019-09-15 15:17:45 -05:00
.npmrc build: introduce a `prepare` script in embark's package.json 2018-12-03 16:24:10 -06:00
.yarnrc build: specify a high network timeout in root .yarnc 2019-02-14 01:26:22 -06:00
CHANGELOG.md chore(release): 4.1.1 2019-08-28 14:52:21 -05:00
CODE_OF_CONDUCT.md chore(@embark) remove extra line 2018-12-24 16:14:01 -05:00
CONTRIBUTING.md docs(contributing): Update the syntax of the header and scope 2019-03-22 13:27:46 -04:00
LICENSE add license 2015-07-10 20:41:45 -04:00
README.md docs: move root readme into packages/embark and symlink into root 2019-05-21 12:12:15 +02:00
azure-pipelines.yml build: bump all packages' engines settings (#1985) 2019-10-24 09:52:05 -04:00
babel.config.js build: update babel and webpack dependencies (#1987) 2019-10-24 17:41:28 -04:00
header.jpg docs: update header image for root README 2019-04-04 12:59:24 -04:00
lerna.json chore(release): 4.1.1 2019-08-28 14:52:21 -05:00
package.json build: bump all packages' engines settings (#1985) 2019-10-24 09:52:05 -04:00
tsconfig.json build: add "dom" in tsc compilerOptions.lib 2019-10-25 13:01:38 -05:00
tslint.json refactor(@embark/embark-typings) move typings to its own module 2019-02-06 11:07:44 -05:00
yarn.lock build(deps): add core-js@3 as a dep to all pkgs that have @babel/runtime-corejs3 dep 2019-10-28 11:40:48 -05:00

README.md

Embark

npm Gitter Build Status Open PRs Closed PRs GitHub commit activity the past week, 4 weeks, year Coverage Status Dependabot Status

What is Embark

Embark is a framework that allows you to easily develop and deploy Decentralized Applications (DApps).

A Decentralized Application is a serverless html5 application that uses one or more decentralized technologies.

Embark currently integrates with EVM blockchains (Ethereum), Decentralized Storages (IPFS), and Decentralized communication platforms (Whisper and Orbit). Swarm is supported for deployment.

With Embark you can:

Blockchain (Ethereum)

  • Automatically deploy contracts and make them available in your JS code. Embark watches for changes, and if you update a contract, Embark will automatically redeploy the contracts (if needed) and the dapp.
  • Contracts are available in JS with Promises.
  • Do Test Driven Development with Contracts using Javascript.
  • Keep track of deployed contracts; deploy only when truly needed.
  • Manage different chains (e.g testnet, private net, livenet)
  • Easily manage complex systems of interdependent contracts.

Decentralized Storage (IPFS, Swarm)

  • Easily Store & Retrieve Data on the DApp through EmbarkJS. Including uploading and retrieving files.
  • Deploy the full application to IPFS or Swarm.
  • Import and deploy contracts hosted on Swarm.

Decentralized Communication (Whisper, Orbit)

  • Easily send/receive messages through channels in P2P through Whisper or Orbit.

Web Technologies

  • Integrate with any web technology including React, Foundation, etc..
  • Use any build pipeline or tool you wish, including grunt, gulp and webpack.
$ npm -g install embark

See Complete Documentation.